/* ============================================================
   Booking with Promo — companion CSS
   Only what Tailwind utilities on Drupal-rendered markup can't
   reach: radio→chip / checkbox→pill transforms (input+label
   sibling styling), stage reveal animation, done-state collapse,
   and defensive resets against theme/CMS-injected margins.
   ============================================================ */

/* Defensive resets (theme + CMS margin drift) */
.webform-submission-booking-with-promo-form .promo-stage .form-item { margin: 0; }
.webform-submission-booking-with-promo-form .promo-stage p { margin: 0; }
.webform-submission-booking-with-promo-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.webform-submission-booking-with-promo-form legend { padding: 0; }

/* Stage reveal (native #states + JS both toggle display) */
@keyframes promoReveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.promo-stage { animation: promoReveal .5s cubic-bezier(.22,.9,.3,1); }

/* --- Shade radios → chips --- */
.promo-chips .form-radios { display: grid; gap: 10px; }
.promo-chips .form-item input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.promo-chips .form-item label {
  display: flex; align-items: center; gap: 12px; width: 100%;
  font-size: 14.5px; font-weight: 500; color: #1c2b3a;
  background: #fff; border: 1.5px solid #dde4eb; border-radius: 10px;
  padding: 12px 14px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.promo-chips .form-item label:hover { border-color: #0f1d2e; }
.promo-chips .form-item input[type=radio]:checked + label { border-color: #e09e00; background: #fff8e8; }
.promo-chips .form-item input[type=radio]:focus-visible + label { outline: 3px solid rgba(255,184,28,.55); outline-offset: 2px; }

/* --- Product checkboxes → pills --- */
.promo-pills .form-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.promo-pills .form-item input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.promo-pills .form-item label {
  display: inline-block; font-size: 13.5px; font-weight: 600; color: #1c2b3a;
  background: #fff; border: 1.5px solid #dde4eb; border-radius: 999px;
  padding: 8px 14px; cursor: pointer; transition: all .15s;
}
.promo-pills .form-item label:hover { border-color: #0f1d2e; }
.promo-pills .form-item input[type=checkbox]:checked + label { background: #0f1d2e; border-color: #0f1d2e; color: #fff; }
.promo-pills .form-item input[type=checkbox]:focus-visible + label { outline: 3px solid rgba(255,184,28,.55); outline-offset: 2px; }

/* --- JS-enhanced states --- */
.promo-stage.is-hidden { display: none; }
.promo-stage.is-done > *:not(.promo-summary) { display: none; }
.promo-summary {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  animation: promoReveal .4s cubic-bezier(.22,.9,.3,1);
}
.promo-summary .promo-check {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: #7ac143; color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.promo-summary .promo-sum-text { flex: 1; min-width: 0; font-size: 14px; color: #1c2b3a; }
.promo-summary .promo-sum-text b { font-weight: 600; }
.promo-summary .promo-sum-text span { color: #5b6b7c; }
.promo-summary .promo-edit {
  font-size: 13px; font-weight: 600; color: #5b6b7c; background: none;
  border: 1px solid #dde4eb; border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
.promo-summary .promo-edit:hover { border-color: #5b6b7c; color: #1c2b3a; }
.promo-continue { /* Tailwind classes are added by JS; base here as fallback */ }

/* Field validation states set by JS */
.promo-input.is-valid { border-color: #7ac143 !important; }
.promo-input.is-invalid { border-color: #d64545 !important; }

/* Sunglasses meter lens fills (hero block is optional; ids injected there) */
#promo-lens-l, #promo-lens-r { transition: height .7s cubic-bezier(.22,.9,.3,1), y .7s cubic-bezier(.22,.9,.3,1); }

@media (prefers-reduced-motion: reduce) {
  .promo-stage, .promo-summary { animation: none; }
  #promo-lens-l, #promo-lens-r { transition: none; }
}