/* Premium Sailing: enquiry form, shown on the navy .contact band. Builds on base.css. */

.enquiry { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; margin: 0; }
.enquiry fieldset { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.enquiry[hidden], .enquiry fieldset[hidden] { display: none; }
.js .enquiry fieldset:not([hidden]) { animation: group-in 500ms var(--ease) both; }
@keyframes group-in { from { opacity: 0; transform: translateY(-6px); } }
.enquiry legend { padding: 0; }
.enquiry legend.f__label { margin-bottom: 8px; }

.f { display: grid; gap: 8px; align-content: start; min-width: 0; }
.f--full { grid-column: 1 / -1; }
.f label, .f .f__label, .enquiry legend.f__label { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.9); }
.f label small { letter-spacing: 0.12em; text-transform: none; font-size: 0.75rem; opacity: 0.7; }
.f input, .f select, .f textarea {
  width: 100%; min-height: 52px; padding: 0 16px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.08); color: var(--white);
  font-size: 1rem; /* 16px+ prevents iOS zoom on focus */
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease), box-shadow 200ms var(--ease);
  -webkit-appearance: none; appearance: none;
}
.f textarea { min-height: 128px; padding: 14px 16px; line-height: 1.5; resize: vertical; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.4) transparent; }
.f select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' 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 14px center; background-size: 18px;
}
.f select option, .f select optgroup { color: var(--graphite); background: var(--white); }
.f input:hover, .f select:hover, .f textarea:hover { border-color: rgba(255, 255, 255, 0.5); }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--white); background-color: rgba(255, 255, 255, 0.14); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3); }
.f [aria-invalid="true"] { border-color: #ffc9c9; }
.f__error { margin: 0; font-size: 0.875rem; line-height: 1.45; color: #ffe0e0; }
.f__error:empty { display: none; }
.f__hint { margin: 0; font-size: 0.8125rem; line-height: 1.45; color: rgba(255, 255, 255, 0.7); }

/* ---------- Week picker: a field that opens a month calendar in a popover ---------- */
.week { position: relative; }
.week__field {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7);
  font-size: 1rem; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 100ms ease-out;
}
.week__field.has-value { color: var(--white); }
.week__field:hover { border-color: rgba(255, 255, 255, 0.5); }
.week__field:active { transform: scale(0.99); }
.week__field:focus-visible, .week__field[aria-expanded="true"] { outline: none; border-color: var(--white); background-color: rgba(255, 255, 255, 0.14); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3); }
.week__field[aria-invalid="true"] { border-color: #ffc9c9; }
.week__icon { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.week__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Popover: white card anchored under the field, fades and scales from it (critically damped, no overshoot) */
.cal {
  position: absolute; z-index: 20; top: calc(100% - 4px); left: 0; width: min(100%, 360px);
  padding: 16px 16px 14px; border-radius: 18px; background: var(--white); color: var(--navy);
  box-shadow: 0 24px 60px -18px rgba(3, 25, 45, 0.55), 0 0 0 1px var(--hairline);
  opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top left;
  transition: opacity 200ms var(--ease), transform 220ms var(--ease);
  max-height: 70vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(140, 165, 190, 0.7) transparent;
}
.cal.is-open { opacity: 1; transform: none; }
.cal[hidden] { display: none; }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal__month { margin: 0; font-size: 0.8125rem; letter-spacing: 0.2em; text-transform: uppercase; }
.cal__nav {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--hairline);
  background: none; color: var(--navy); cursor: pointer; transition: border-color 200ms var(--ease), transform 100ms ease-out;
}
.cal__nav:hover:not([aria-disabled="true"]) { border-color: var(--navy); }
.cal__nav:active:not([aria-disabled="true"]) { transform: scale(0.94); }
.cal__nav[aria-disabled="true"] { opacity: 0.3; cursor: default; }
.cal__nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cal__grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal__grid th { padding: 6px 0; font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite); opacity: 0.7; }
.cal__grid td { padding: 2px 0; text-align: center; }
.cal__day {
  width: 100%; height: 40px; border: 0; border-radius: 0; background: transparent; color: rgba(81, 83, 82, 0.38);
  font-size: 0.9375rem; font-variant-numeric: tabular-nums; cursor: default; -webkit-tap-highlight-color: transparent;
}
.cal__day.is-valid { color: var(--navy); font-weight: 700; cursor: pointer; }
.cal__day.is-valid:hover { box-shadow: inset 0 0 0 1px var(--navy); border-radius: 999px; }
.cal__day.is-today { text-decoration: underline; text-underline-offset: 4px; }
.cal__day.is-preview { background: rgba(9, 73, 125, 0.06); }
.cal__day.is-range { background: rgba(9, 73, 125, 0.12); color: var(--navy); }
.cal__day.is-start, .cal__day.is-end { background: var(--navy); color: var(--white); border-radius: 999px; }
.cal__day:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; border-radius: 999px; }
.cal__note { margin: 10px 2px 0; font-size: 0.8125rem; line-height: 1.45; color: var(--graphite); }
@media (max-width: 599px) { .cal { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .cal { transform: none !important; transition: opacity 150ms ease; } }

/* Boat type: segmented chips (radios), filtered per offer */
.enquiry fieldset.boat { display: grid; grid-template-columns: 1fr; gap: 8px; }
.chips label[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.9);
  transition: background-color 250ms var(--ease), color 250ms var(--ease), border-color 250ms var(--ease), transform 100ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.chips label:hover { border-color: rgba(255, 255, 255, 0.6); }
.chips label:active { transform: scale(0.97); }
.chips input:checked + label { background: var(--white); color: var(--navy); border-color: var(--white); }
.chips input:focus-visible + label { outline: 2px solid var(--white); outline-offset: 3px; }

.enquiry__foot { grid-column: 1 / -1; display: grid; gap: 14px; margin-top: 4px; }
.enquiry__submit { width: 100%; min-height: 52px; }
.enquiry__submit[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.enquiry__status { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--white); }
.enquiry__status:empty { display: none; }
.enquiry__consent { margin: 0; font-size: 0.8125rem; line-height: 1.55; color: rgba(255, 255, 255, 0.72); }
.enquiry__consent a, .enquiry-nojs a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.5); }
.enquiry-nojs { margin: 0; font-weight: 300; font-size: 1.0625rem; line-height: 1.6; color: rgba(255, 255, 255, 0.9); }

.enquiry-done { outline: none; }
.enquiry-done:not([hidden]) { animation: group-in 700ms var(--ease) both; }
.enquiry-done .title { color: var(--white); margin: 12px 0 12px; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.enquiry-done p:not(.eyebrow) { margin: 0; font-weight: 300; font-size: 1.0625rem; color: rgba(255, 255, 255, 0.88); }

@media (max-width: 599px) {
  .enquiry, .enquiry fieldset { grid-template-columns: 1fr; }
}
@media (prefers-contrast: more) {
  .f input, .f select, .f textarea, .chips label { border-color: var(--white); }
}
@media (prefers-reduced-motion: reduce) {
  .js .enquiry fieldset:not([hidden]), .enquiry-done:not([hidden]) { animation: none; }
}
