/* ============================================================
   RESERVATION SECTION
   Dark glassmorphism · Custom selects · Validation states
   ============================================================ */

.reservation {
  position: relative;
  background: var(--color-sand-light);
  padding-block: clamp(5rem, 9vw, 9rem);
  overflow: hidden;
}

/* ── Background photo ── */
.reservation__bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.reservation__bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3) saturate(0.6);
}

/* ── Centered content ── */
.reservation__inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin-inline: auto;
  text-align: center;
}

.reservation__title {
  color: var(--color-white);
  margin-block: 1rem 0.75rem;
}

.reservation__subtitle {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 2.5rem;
}

/* ── Glass form card ── */
.reservation__form {
  background: rgba(250, 247, 242, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4vw, 3rem);
  text-align: left;
}

/* ── Two-column row ── */
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ── Field group ── */
.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative; /* for error message positioning */
}

/* ── Label ── */
.form__label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* ── Base input / textarea ── */
.form__input,
.form__textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  outline: none;
  transition:
    border-color 0.2s ease,
    background   0.2s ease,
    box-shadow   0.2s ease;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Focus — orange accent */
.form__input:focus,
.form__textarea:focus {
  border-color: var(--color-sunset-warm);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(232, 162, 101, 0.18);
}

/* Date input — colour the calendar icon white */
.form__input[type="date"] {
  color-scheme: dark;
}

/* Textarea */
.form__textarea {
  resize: none;
  height: 90px;
  margin-bottom: 0;
}

/* ── Custom Select ──────────────────────────────────────
   Remove browser default: appearance:none hides the
   native arrow. We inject a custom SVG arrow via
   background-image so the select looks identical to
   the text inputs while remaining fully functional.
   ─────────────────────────────────────────────────── */
.form__select {
  width: 100%;
  padding: 0.85rem 2.75rem 0.85rem 1rem; /* right padding for arrow */
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.08);

  /* Custom chevron arrow — white, pointing down */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.55)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 18px;

  /* Hide browser default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow   0.2s ease;
}

/* Select placeholder (disabled first option) */
.form__select option[disabled] {
  color: rgba(255, 255, 255, 0.35);
}

/* Select options dropdown panel */
.form__select option {
  background: #1B4F72; /* var(--color-ocean-deep) */
  color: #ffffff;
  font-weight: 300;
}

/* Focus — orange accent matches inputs */
.form__select:focus {
  border-color: var(--color-sunset-warm);
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(232, 162, 101, 0.18);

  /* Update arrow colour on focus */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(232,162,101,0.9)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Hover — subtle brightening */
.form__select:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background-color: rgba(255, 255, 255, 0.11);
}

/* Firefox: remove dotted focus ring */
.form__select:-moz-focusring {
  color: transparent;
  text-shadow: 0 0 0 var(--color-white);
}

/* ── Validation error state ── */
.form__group--error .form__input,
.form__group--error .form__select,
.form__group--error .form__textarea {
  border-color: rgba(255, 100, 80, 0.8);
  background: rgba(255, 80, 60, 0.06);
}

.form__group--error .form__input:focus,
.form__group--error .form__select:focus,
.form__group--error .form__textarea:focus {
  border-color: rgba(255, 120, 100, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 100, 80, 0.15);
}

/* Error message text */
.form__error {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255, 150, 130, 1);
  letter-spacing: 0.03em;
  margin-top: 0.1rem;
}

/* ── Submit button ── */
.form__submit {
  width: 100%;
  margin-top: 1.25rem;
  padding: 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  background: var(--color-sunset);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition:
    background  0.2s ease,
    transform   0.15s ease,
    box-shadow  0.2s ease;
  box-shadow: 0 4px 20px rgba(212, 114, 74, 0.4);
}

.form__submit:hover:not(:disabled) {
  background: var(--color-wood);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(139, 94, 60, 0.45);
}

.form__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Mobile ── */
@media (max-width: 560px) {
  .form__row {
    grid-template-columns: 1fr;
  }
}
