/* ==========================
   RESERVATION SUCCESS MODAL
   ========================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 1001;
  background: var(--color-primary);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(212, 175, 55, 0.2);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--secondary-color);
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1002;
}

.modal-close:hover {
  color: var(--text-color);
  transform: rotate(90deg);
}

.modal-header {
  text-align: center;
  padding: 40px 30px 20px;
  border-bottom: 1px solid var(--secondary-color);
}

.success-icon {
  font-size: 64px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header h2 {
  font-size: 28px;
  color: var(--text-color);
  margin: 0;
  font-weight: 600;
}

.modal-body {
  padding: 30px;
  text-align: center;
}

.confirmation-text {
  color: var(--text-color);
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.confirmation-details {
  background: rgba(212, 175, 55, 0.1);
  border-left: 4px solid var(--secondary-color);
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
  text-align: left;
}

.confirmation-details p {
  color: var(--secondary-color);
  font-weight: 500;
  margin: 8px 0;
  font-size: 14px;
}

.confirmation-email {
  color: var(--secondary-color);
  font-size: 14px;
  margin-top: 15px;
  font-weight: 500;
}

.modal-actions {
  padding: 20px 30px;
  border-top: 1px solid var(--secondary-color);
  display: flex;
  justify-content: center;
  gap: 15px;
}

.modal-actions .btn {
  min-width: 150px;
}

.success-modal .modal-content {
  max-width: 500px;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-width: 450px;
  }

  .modal-header {
    padding: 30px 20px 15px;
  }

  .success-icon {
    font-size: 48px;
  }

  .modal-header h2 {
    font-size: 24px;
  }

  .modal-body {
    padding: 20px;
  }

  .confirmation-details {
    padding: 12px;
  }

  .confirmation-details p {
    font-size: 13px;
  }

  .modal-close {
    top: 15px;
    right: 15px;
    font-size: 20px;
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 100%;
    border-radius: 0;
    max-width: none;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .success-icon {
    font-size: 40px;
  }

  .confirmation-text {
    font-size: 14px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

/* ==========================
   FORM VALIDATION ERRORS
   ========================== */

.form-input {
  transition: all 0.3s ease;
}

.form-input.input-error {
  border-color: #ff6b6b !important;
  background-color: rgba(255, 107, 107, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-input.input-error:focus {
  border-color: #ff4757 !important;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15);
}

.error-message {
  display: block;
  font-size: 12px;
  color: #ff6b6b;
  margin-top: 4px;
  font-weight: 500;
  animation: slideDown 0.2s ease-out;
}

.error-message.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================
   ERROR MODAL STYLING
   ========================== */

#reservationErrorModal {
  animation: fadeIn 0.3s ease-out;
}

#reservationErrorModal.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#reservationErrorModal .relative {
  animation: slideUp 0.4s ease-out;
}

#error-message-text {
  display: block;
  line-height: 1.6;
}

/* Loading spinner for submit button */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Accessibility improvements */
.form-input:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 0;
}

.form-input.input-error:focus-visible {
  outline: 2px solid #ff6b6b;
  outline-offset: 2px;
}
