/* CARNABY & OAK / GYMDESK 5.0 — compact, readable, accessible booking interface.
   This stylesheet is loaded AFTER the existing widget CSS.
   Scoped to .co-gd4 only. No original site styles or Gymdesk booking data changed.
   Booking forms can grow as required to show all fields. */

/* 01. Reduce oversized margins and remove the stacked-card feeling. */
.co-gd4 {
  padding: clamp(27px, 3.4vw, 48px) clamp(14px, 3vw, 38px) !important;
  background: #faf5e9;
}
.co-gd4--birthday { background: #f8eceb; }
.co-gd4--daypass { background: #eef2e6; }
.co-gd4__inner { max-width: 1090px !important; }
.co-gd4__heading {
  grid-template-columns: minmax(0,1.15fr) minmax(240px,.85fr);
  gap: clamp(12px,2.5vw,28px) !important;
  align-items: end;
  margin-bottom: clamp(18px,2.5vw,25px) !important;
}
.co-gd4__headline h2 {
  font-family: 'Instrument Serif', Georgia, serif !important;
  font-size: clamp(45px,5.4vw,77px) !important;
  line-height: .92 !important;
  margin-top: 9px !important;
}
.co-gd4__headline h2 span {
  font-family: 'Gochi Hand', cursive !important;
  font-size: .46em !important;
}
.co-gd4__subtitle p {
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: clamp(13px,1.1vw,15px) !important;
  line-height: 1.48 !important;
}
.co-gd4__card {
  max-width: 940px !important;
  border-color: rgba(102,54,65,.14) !important;
  background: #fffdf9 !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 35px rgba(76,41,49,.055) !important;
  padding: clamp(13px,2vw,21px) !important;
}
.co-gd4__card-top {
  padding-bottom: 11px !important;
  border-color: rgba(102,54,65,.12) !important;
}
.co-gd4__live { font-weight: 600 !important; }
.co-gd4__stage {
  width: min(100%, 780px) !important;
  padding: clamp(10px,1.6vw,17px) 0 5px !important;
  min-height: 52px !important;
}
.co-gd4__loading { min-height: 64px !important; }
.co-gd4__card-foot {
  margin-top: 5px !important;
  padding-top: 11px !important;
  border-color: rgba(102,54,65,.1) !important;
}
.co-gd4__card-foot p, .co-gd4__card-foot a {
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
}

/* 02. Scope all direct vendor typography to Carnaby's type system.
   Do not target icon elements, so progress arrows/checkmarks keep working. */
.co-gd4 .gymdesk-booking,
.co-gd4 .gymdesk-booking :is(input, select, textarea, button, label, legend, p, h1, h2, h3, h4, small) {
  font-family: 'DM Sans', Arial, sans-serif !important;
}
.co-gd4 .gymdesk-booking :is(h1, h2):not(.sr-only) {
  font-family: 'Instrument Serif', Georgia, serif !important;
  letter-spacing: -.025em;
}
.co-gd4 .gymdesk-booking { width: 100% !important; background: transparent !important; min-width: 0; }
.co-gd4 .gymdesk-booking > :not(script) { max-width: 100%; margin-left:auto; margin-right:auto; }
.co-gd4 .gymdesk-booking iframe { display: block; max-width: 100%; border: 0; }

/* 03. Inputs are clean, readable and a little shorter. Never hide required form fields. */
.co-gd4 .gymdesk-booking :is(input[type="text"],input[type="tel"],input[type="email"],input[type="number"],input[type="date"],input[type="password"],textarea,select) {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-height: 42px !important;
  padding: 9px 12px !important;
  border-radius: 9px !important;
  border: 1px solid #d9cbd0 !important;
  color: #40343a !important;
  background: #fffefa !important;
  box-shadow: none !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}
.co-gd4 .gymdesk-booking textarea { min-height: 82px !important; resize:vertical; }
.co-gd4 .gymdesk-booking :is(input,textarea)::placeholder { color: #9a888d !important; opacity:1 !important; }
.co-gd4 .gymdesk-booking :is(input,select,textarea):focus-visible {
  outline: 2px solid #287a85 !important;
  outline-offset: 1px !important;
  border-color: #287a85 !important;
}
.co-gd4 .gymdesk-booking :is(label, legend) {
  font-family:'DM Sans', Arial, sans-serif !important;
  font-weight: 600 !important;
  color: #5a3a49 !important;
  font-size: 12px !important;
  line-height: 1.38 !important;
  letter-spacing: .005em !important;
  background: transparent !important;
  text-shadow:none !important;
}
.co-gd4 .gymdesk-booking :is(.form-group,.form-field,.field,.input-group,[class*="form-group"],[class*="form-field"]) {
  margin-bottom: 10px !important;
}
.co-gd4 .gymdesk-booking :is(button,input[type="submit"],input[type="button"]):not(:disabled) { cursor:pointer; }
.co-gd4 .gymdesk-booking :is(button,input[type="submit"],input[type="button"]):focus-visible {
  outline: 2px solid #287a85 !important;
  outline-offset: 2px !important;
}

/* 04. Vendor summary and form backgrounds. Includes dynamically identified
   contrast-problem panels (v5 JS) for variations across Gymdesk steps. */
.co-gd4 .gymdesk-booking :is(
  .co-gd5-light-panel, .co-gd5-summary-panel,
  .booking-summary, .booking-details, .booking-total,
  .order-summary, .checkout-summary, .payment-summary,
  .summary-box, .session-summary, [class*="order-summary"],
  [class*="booking-summary"], [class*="payment-summary"]
) {
  background: #f8f1ec !important;
  background-image: none !important;
  color: #523746 !important;
  box-shadow:none !important;
  text-shadow:none !important;
}
.co-gd4 .gymdesk-booking :is(
  .co-gd5-light-panel, .co-gd5-summary-panel,
  .booking-summary,.booking-details,.booking-total,.order-summary,
  .checkout-summary,.payment-summary,.summary-box,.session-summary,
  [class*="order-summary"],[class*="booking-summary"],[class*="payment-summary"]
):is(:hover,:focus-within) {
  background: #f8f1ec !important;
  background-image: none !important;
  color: #523746 !important;
}
.co-gd4 .gymdesk-booking .co-gd5-summary-panel :is(span,div,p,small,strong,b,h2,h3,h4,dt,dd) {
  color: #523746 !important;
  text-shadow: none !important;
}
.co-gd4 .gymdesk-booking .co-gd5-summary-panel :is(h2,h3,strong,b) { font-weight:650; }
.co-gd4 .gymdesk-booking .co-gd5-light-panel :is(label,legend,small,p,span) {
  color: #553d49 !important;
  text-shadow:none !important;
}
.co-gd4 .gymdesk-booking .co-gd5-light-panel :is(input,select,textarea) {
  background:#fffefa !important; color:#40343a !important;
}

/* If Gymdesk uses standard form containers, avoid a dark backdrop around fields. */
.co-gd4 .gymdesk-booking :is(form,fieldset,[class*="form-fields"],[class*="booking-form"],[class*="form-wrapper"]) {
  background-color: transparent !important;
  background-image:none !important;
  color:#523746 !important;
}
.co-gd4 .gymdesk-booking fieldset { border-color:#eadce0 !important; }

/* 05. Better visual density for the step flow without changing its semantics. */
.co-gd4 .gymdesk-booking :is(.steps,.booking-steps,[class*="stepper"],[class*="progress-steps"]) {
  margin-bottom: 12px !important;
}
.co-gd4 .gymdesk-booking :is(.book-item,.session-option,[class*="session-option"],[class*="booking-option"]) {
  border-radius: 12px !important;
}

/* 06. Small screens: simple full-width booking, no forced internal scroll. */
@media(max-width:760px) {
  .co-gd4 { padding: 28px 12px 38px !important; }
  .co-gd4__heading { grid-template-columns:1fr !important; gap:12px !important; }
  .co-gd4__headline h2 { font-size:clamp(48px,11vw,69px) !important; }
  .co-gd4__subtitle p { max-width:55ch !important; }
  .co-gd4__card { padding:12px !important; border-radius:17px !important; }
  .co-gd4__card-top { align-items:center !important; }
  .co-gd4__live { font-size:9px !important; }
  .co-gd4__stage { width:100% !important; padding:12px 0 2px !important; }
  .co-gd4 .gymdesk-booking :is(input[type="text"],input[type="tel"],input[type="email"],input[type="number"],input[type="date"],input[type="password"],textarea,select) {
    font-size: 16px !important; /* Prevent iOS input autozoom. */
    min-height: 44px !important;
  }
}
@media(prefers-reduced-motion:reduce) {
  .co-gd4 .gymdesk-booking * { scroll-behavior:auto !important; }
}

/* 07. Direct Gymdesk form controls; keep checkboxes and calendar controls intact. */
.co-gd4 .gymdesk-booking :is(.form-group,.form-field,[class*="form-group"],[class*="form-field"]) > label {
  display: block !important; margin: 0 0 5px !important;
}
.co-gd4 .gymdesk-booking :is(.form-group,.form-field,[class*="form-group"],[class*="form-field"]) > :is(input[type="text"],input[type="email"],input[type="tel"],input[type="number"],input[type="date"],select,textarea) {
  width: 100% !important;
}
.co-gd4 .gymdesk-booking form :is(button[type="submit"], input[type="submit"], .btn-primary) {
  background: #762541 !important;
  color: #fffaf1 !important;
  border: 1px solid #762541 !important;
  border-radius: 999px !important;
  padding: 11px 19px !important;
  font-family: 'DM Sans', Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
.co-gd4 .gymdesk-booking form :is(button[type="submit"], input[type="submit"], .btn-primary):hover:not(:disabled) {
  background: #5c1d33 !important; color: #fffaf1 !important;
}
