/* Chessury Modal System Styles */

#chessury-modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: all;
}

.modal-overlay.modal-show {
  background: rgba(0, 0, 0, 0.7);
  opacity: 1;
}

.modal-overlay.modal-show .modal-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-container {
  transform: scale(0.9) translateY(-20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
}

.modal-content {
  background: linear-gradient(
    135deg,
    rgb(var(--color-dark-bg-lighter)) 0%,
    rgb(var(--color-dark-bg-darker)) 100%
  );
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(139, 92, 46, 0.3);
  overflow: hidden;
}

.modal-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(139, 92, 46, 0.2);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: modalIconPulse 2s ease-in-out infinite;
}

@keyframes modalIconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgb(var(--color-wood-400));
  margin: 0;
}

.modal-body {
  padding: 1.5rem 2rem;
}

.modal-message {
  font-size: 1.125rem;
  line-height: 1.75;
  color: rgb(var(--color-gray-300));
  margin: 0;
  text-align: center;
}

.modal-footer {
  padding: 1rem 2rem 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.modal-btn {
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.modal-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.modal-btn:hover::before {
  width: 300px;
  height: 300px;
}

.modal-btn:active {
  transform: scale(0.95);
}

.btn-cancel {
  background: rgb(var(--color-gray-600));
  color: rgb(var(--color-gray-100));
}

.btn-cancel:hover {
  background: rgb(var(--color-gray-700));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  background: linear-gradient(
    135deg,
    rgb(var(--color-wood-600)),
    rgb(var(--color-wood-700))
  );
  color: white;
  box-shadow: 0 4px 6px rgba(139, 92, 46, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(
    135deg,
    rgb(var(--color-wood-700)),
    rgb(var(--color-wood-800))
  );
  box-shadow: 0 6px 20px rgba(139, 92, 46, 0.4);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  box-shadow: 0 4px 6px rgba(22, 163, 74, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #15803d, #166534);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
  transform: translateY(-2px);
}

.btn-warning {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: white;
  box-shadow: 0 4px 6px rgba(234, 88, 12, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #c2410c, #9a3412);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .modal-container {
    width: 95%;
  }

  .modal-header {
    padding: 1.5rem 1.5rem 0.75rem;
  }

  .modal-icon {
    font-size: 2.5rem;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .modal-body {
    padding: 1rem 1.5rem;
  }

  .modal-message {
    font-size: 1rem;
  }

  .modal-footer {
    padding: 0.75rem 1.5rem 1.5rem;
    flex-direction: column;
  }

  .modal-btn {
    width: 100%;
    min-width: unset;
  }
}

/* CSS Variables for colors - these should match your Tailwind config */
:root {
  --color-dark-bg-lighter: 31, 41, 55;
  --color-dark-bg-darker: 17, 24, 39;
  --color-wood-400: 180, 117, 64;
  --color-wood-600: 139, 92, 46;
  --color-wood-700: 120, 79, 40;
  --color-wood-800: 101, 67, 33;
  --color-gray-100: 243, 244, 246;
  --color-gray-300: 209, 213, 219;
  --color-gray-600: 75, 85, 99;
  --color-gray-700: 55, 65, 81;
}
