/* ============================================
   FORM / RESERVATION PAGE STYLES
   ============================================ */

/* Main Form Styles */
form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 2rem) 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Fieldset */
form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Legend / Labels */
form legend {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  background: rgba(30, 30, 30, 0.65);
  padding: 0.75rem 1rem;
  border-radius: 10px 10px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  width: 100%;
  display: block;
}

/* Form Groups */
form .form-group {
  background: rgba(30, 30, 30, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 1rem;
}

/* Input Fields */
form .form-control,
form input[type='text'],
form input[type='email'],
form input[type='date'],
form input[type='time'],
form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background: rgba(40, 40, 40, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  outline: none;
  transition: all var(--transition-fast);
}

form .form-control:focus,
form input[type='text']:focus,
form input[type='email']:focus,
form input[type='date']:focus,
form input[type='time']:focus,
form textarea:focus {
  border-color: var(--gold);
  background: rgba(50, 50, 50, 0.8);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

form textarea {
  min-height: 100px;
  resize: vertical;
}

/* Date and Time inputs side by side */
form .form-group:has(input[type='date']) {
  display: flex;
  gap: 1rem;
}

form input[type='date'],
form input[type='time'] {
  flex: 1;
  cursor: pointer;
}

/* Placeholder styling */
form input::placeholder,
form textarea::placeholder {
  color: var(--white-faint);
}

/* Checkbox and Radio styles */
form .checkbox,
form .radio {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  width: 100%;
}

form .checkbox:last-child,
form .radio:last-child {
  margin-bottom: 0;
}

form .checkbox label,
form .radio label,
form .radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--white-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
  background: transparent;
  padding: 0.5rem 0;
  margin: 0;
  width: 100%;
  min-height: 44px; /* Touch-friendly target size */
}

form .checkbox label:hover,
form .radio label:hover,
form .radio-label:hover {
  color: var(--white);
}

form input[type='checkbox'],
form input[type='radio'] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  cursor: pointer;
  accent-color: var(--gold);
  flex-shrink: 0;
}

/* Other/Custom input in checkbox */
form .checkbox input[type='text'],
form .radio-label input[type='text'] {
  max-width: 200px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

/* Submit Button */
form input[type='submit'],
form .btn-primary {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--black);
  background: linear-gradient(
    135deg,
    var(--gold) 0%,
    var(--gold-light) 50%,
    var(--gold) 100%
  );
  background-size: 200% 200%;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  margin: 1.5rem auto 0;
}

form input[type='submit']:hover,
form .btn-primary:hover {
  background-position: 100% 100%;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

/* Hidden inputs */
form input[type='hidden'] {
  display: none;
}

/* Submit Button Loading State */
form .btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

form .btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

form .btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

form .spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Form Messages */
.form-message {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 12px;
  margin-top: 1rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-message svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.form-message.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.form-message.success svg {
  color: #22c55e;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.form-message.error svg {
  color: #ef4444;
}

.form-message strong {
  color: var(--white);
}

/* ============================================
   RESPONSIVE - Form Page
   ============================================ */

@media screen and (max-width: 768px) {
  .button-container {
    height: var(--header-height);
    gap: 0;
    padding: 0 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
  }

  .button-container .custom-button {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    letter-spacing: 1px;
  }

  form {
    padding: calc(var(--header-height) + 1rem) 1rem 2rem;
    gap: 1.25rem;
  }

  form legend {
    font-size: 0.8rem;
    padding: 0.6rem 0.875rem;
  }

  form .form-group {
    padding: 0.875rem;
  }

  form .form-control,
  form input[type='text'],
  form input[type='email'],
  form input[type='date'],
  form input[type='time'],
  form textarea {
    padding: 0.75rem;
    font-size: 0.95rem;
  }

  form .form-group:has(input[type='date']) {
    flex-direction: column;
    gap: 0.75rem;
  }

  form input[type='submit'] {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  .button-container .custom-button {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }

  form legend {
    font-size: 0.75rem;
  }

  form .checkbox label,
  form .radio label,
  form .radio-label {
    font-size: 0.9rem;
  }
}
