/* ============================================================
   "Make an enquiry" modal (element 09)
   Band-contextual enquiry form, opened from the bandEnquiry
   "Fill Out Enquiry Form" button. Sibling of the callback modal
   (element 08) - same shell, same skin, different fields. Copy and
   tokens are locked from 09-enquiry-form/element-handoff.md; the
   shared donor tokens (focus ring .55, #1B1B1C CTA text, site amber
   gradient, #6E6E76 close grey) always win over the drifted export.

   Authored MOBILE-FIRST: the base rules ARE the bottom-sheet state;
   the centred desktop modal applies from the site's 960px breakpoint
   up. Never build desktop then subtract.
   ============================================================ */

.cen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
}

.cen[hidden] {
  display: none;
}

.cen__scrim {
  position: absolute;
  inset: 0;
  background: rgba(27, 27, 28, 0.55);
  animation: cenScrimIn 0.2s ease both;
}

/* ---- Shell: mobile bottom sheet ---- */
.cen__shell {
  position: relative;
  width: 100%;
  /* vh fallback; dvh tracks the visible viewport on iOS (toolbars). */
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -18px 50px -12px rgba(27, 27, 28, 0.4);
  /* Top padding lives on notch + sticky head so scrolled content cannot
     peek above the close button. */
  padding: 0 20px calc(22px + env(safe-area-inset-bottom));
  animation: cenSheetIn 0.26s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.cen__notch {
  display: block;
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: #e2dad3;
  margin: 14px auto 14px;
}

/* ---- Header ---- */
.cen__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
  /* Span full shell width (cancel horizontal padding) so fields scroll under. */
  margin: 0 -20px 20px;
  padding: 0 20px 4px;
}

.cen__tile {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(243, 162, 60, 0.13);
}

.cen__tile-check {
  display: none;
}

.cen__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e7e0db;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6e6e76;
  padding: 0;
  flex: 0 0 auto;
  transition: background 0.15s ease, color 0.15s ease;
}

.cen__close:hover {
  background: #f6f1ed;
  color: #1b1b1c;
}

.cen__close:focus-visible {
  border-color: #a23fb0;
  box-shadow: 0 0 0 3px rgba(162, 63, 176, 0.55);
  outline: none;
  color: #1b1b1c;
}

/* ---- Copy ---- */
.cen__heading {
  margin: 0;
  font-weight: 700;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #1b1b1c;
  text-wrap: balance;
}

.cen__subline {
  margin: 9px 0 0;
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.55;
  color: #6e6e76;
}

/* ---- Form ---- */
.cen__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 22px;
}

.cen__field {
  display: flex;
  flex-direction: column;
}

/* Name + contact rows stack on mobile. */
.cen__row {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cen__row .cen__field {
  flex: 1 1 0;
  min-width: 0;
}

.cen__label {
  margin-bottom: 9px;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a4348;
}

.cen__input {
  width: 100%;
  box-sizing: border-box;
  height: 52px;
  padding: 0 15px;
  border-radius: 13px;
  border: 1px solid #e5ded8;
  background: #ffffff;
  font-family: inherit;
  font-weight: 400;
  font-size: 16px;
  color: #1b1b1c;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cen__input::placeholder {
  color: #6e6e76;
  opacity: 1;
}

.cen__input:focus,
.cen__input:focus-visible {
  outline: none;
  border-color: #a23fb0;
  box-shadow: 0 0 0 3px rgba(162, 63, 176, 0.55);
}

.cen__input.cen--error {
  border-color: #c2503a;
}

.cen__textarea {
  height: auto;
  min-height: 124px;
  padding: 13px 15px;
  line-height: 1.5;
  resize: vertical;
}

.cen__error {
  margin: 7px 0 0;
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.35;
  color: #b0472f;
}

.cen__form-error {
  margin: 0;
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.35;
  color: #b0472f;
}

.cen__form .cf-turnstile {
  width: 100%;
  max-width: 100%;
}

/* ---- CTA ---- */
.cen__cta {
  position: relative;
  width: 100%;
  height: 58px;
  border: none;
  border-radius: 14px;
  /* Site amber token (btn-yellow-arrow / reinforce-cta), dark text. */
  background: linear-gradient(180deg, #fecc66, #f7a547);
  color: #1b1b1c;
  font-family: inherit;
  font-weight: 600;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  margin-top: 4px;
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.cen__cta:hover {
  filter: brightness(1.03);
}

.cen__cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(162, 63, 176, 0.55);
}

.cen__cta-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(27, 27, 28, 0.28);
  border-top-color: #1b1b1c;
  animation: cenSpin 0.7s linear infinite;
}

/* Submitting: swap arrow for spinner, dim + disable. */
.cen.cen--submitting .cen__cta {
  opacity: 0.92;
  cursor: default;
}

.cen.cen--submitting .cen__cta-arrow {
  display: none;
}

.cen.cen--submitting .cen__cta-spinner {
  display: inline-block;
}

/* ---- Success ---- */
.cen.cen--success .cen__tile {
  background: rgba(46, 158, 91, 0.12);
}

.cen.cen--success .cen__tile-envelope {
  display: none;
}

.cen.cen--success .cen__tile-check {
  display: block;
}

.cen__success-actions {
  border-top: 1px solid #efe9e4;
  margin-top: 26px;
  padding-top: 8px;
  display: flex;
  justify-content: center;
}

.cen__text-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  color: #1b1b1c;
  padding: 12px 22px;
  cursor: pointer;
  border-radius: 10px;
}

.cen__text-btn:hover {
  background: #f6f1ed;
}

.cen__text-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(162, 63, 176, 0.55);
}

/* ---- Desktop: centred modal (site <960px breakpoint) ---- */
@media (min-width: 960px) {
  .cen {
    align-items: center;
    padding: 24px;
  }

  .cen__shell {
    width: 480px;
    max-width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: 22px;
    box-shadow: 0 30px 70px -22px rgba(27, 27, 28, 0.42),
      0 8px 24px -10px rgba(27, 27, 28, 0.16);
    padding: 0 34px 34px;
    animation: cenModalIn 0.2s ease both;
  }

  .cen__notch {
    display: none;
  }

  .cen__head {
    margin: 0 -34px 20px;
    padding: 30px 34px 4px;
  }

  .cen__row {
    flex-direction: row;
    gap: 16px;
  }

  .cen__textarea {
    min-height: 144px;
  }
}

/* ---- Motion ---- */
@keyframes cenScrimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cenSheetIn {
  from { transform: translateY(100%); }
  to { transform: none; }
}

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

@keyframes cenSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cen__scrim,
  .cen__shell {
    animation: none !important;
  }

  .cen__cta-spinner {
    animation: none !important;
  }
}
