/* StudioJ compact form controls — public and admin.
   Short values sit beside the text; longer fields remain full-width.
   44px+ touch targets, min-width:0 and mobile fallbacks prevent overflow. */

/* Celebration enquiry: guest counts are short numeric answers. */
body.sj-enquiry-only #booking .sj-enquiry-guest-counts>label{
 display:flex;flex-direction:row;align-items:center;justify-content:space-between;
 gap:12px;min-width:0;padding:9px 12px;line-height:1.35;
 border:1px solid #dce1e4;border-radius:12px;background:#fbfcfd;
}
body.sj-enquiry-only #booking .sj-enquiry-guest-counts>label>input[type="number"]{
 flex:0 0 80px;width:80px;max-width:80px;min-width:80px;
 min-height:46px;padding:7px 8px;text-align:center;
 font-weight:850;font-variant-numeric:tabular-nums;
}
body.sj-enquiry-only #booking .sj-enquiry-fields>label:has(>select[name="hours"]){
 display:flex;flex-direction:row;align-items:center;justify-content:space-between;
 gap:10px;min-width:0;padding:9px 11px;
 border:1px solid #dce1e4;border-radius:12px;background:#fbfcfd;
}
body.sj-enquiry-only #booking .sj-enquiry-fields>label>select[name="hours"]{
 flex:0 1 212px;width:min(212px,68%);min-width:0;min-height:46px;
}

/* Optional older checkout sections (if displayed in future). */
body.sj-ci--booking #roomForm .room-fields label:has(>input[type="number"]),
body.sj-ci--booking #wkinForm .wkin-grid label:has(>input[type="number"]),
body.sj-ci--booking #wForm .form-grid label:has(>input[type="number"]){
 display:flex;flex-direction:row;align-items:center;justify-content:space-between;
 gap:10px;min-width:0;padding:10px;border:1px solid #dce1e4;
 border-radius:12px;background:#fbfcfd;
}
body.sj-ci--booking #roomForm .room-fields label>input[type="number"],
body.sj-ci--booking #wkinForm .wkin-grid label>input[type="number"],
body.sj-ci--booking #wForm .form-grid label>input[type="number"]{
 flex:0 0 78px;width:78px;max-width:78px;min-width:78px;
 min-height:44px;text-align:center;font-variant-numeric:tabular-nums;
}

/* Member-pass redemptions: dates, month, counts and short verification codes. */
body.member-page #memberPlayForm label:has(>input[type="number"]),
body.member-page #memberPlayForm label:has(>input[type="date"]),
body.member-page #memberBundleForm label:has(>input[type="month"]),
body.member-page #memberOtpField:not([hidden]){
 display:flex;flex-direction:row;align-items:center;justify-content:space-between;
 gap:10px;min-width:0;max-width:580px;padding:9px 11px;
 border:1px solid #e0e3df;border-radius:12px;background:#fafcfb;
}
body.member-page #memberPlayForm label>input[type="number"]{
 flex:0 0 80px;width:80px;max-width:80px;min-width:80px;
 min-height:44px;text-align:center;
}
body.member-page #memberPlayForm label>input[type="date"],
body.member-page #memberBundleForm label>input[type="month"]{
 flex:0 1 180px;width:180px;max-width:180px;min-width:0;min-height:44px;
}
body.member-page #memberOtpField>input[name="code"]{
 flex:0 0 110px;width:110px;max-width:110px;min-width:110px;
 min-height:44px;text-align:center;letter-spacing:.08em;
}

/* Booking admin: compact numbers, extra hours and short status selectors. */
body.sj-ci--admin #bookingEditor>label:has(>input[type="number"]),
body.sj-ci--admin #bookingEditor .two-col label:has(>input[type="number"]),
body.sj-ci--admin #walkinEditor .two-col label:has(>input[type="number"]),
body.sj-ci--admin #bookingEditor .two-col label:has(>select[name="extra_hours"]),
body.sj-ci--admin #bookingEditor .two-col label:has(>select[name="booking_status"]),
body.sj-ci--admin #bookingEditor .two-col label:has(>select[name="payment_status"]){
 display:flex;flex-direction:row;align-items:center;justify-content:space-between;
 gap:10px;min-width:0;padding:9px 11px;line-height:1.35;
 border:1px solid var(--line,#e1d7ca);border-radius:11px;background:#fbfcfd;
}
body.sj-ci--admin #bookingEditor label>input[type="number"],
body.sj-ci--admin #walkinEditor label>input[type="number"]{
 flex:0 0 94px;width:94px;max-width:94px;min-width:94px;min-height:44px;
 padding:7px 8px;text-align:center;font-variant-numeric:tabular-nums;
}
body.sj-ci--admin #bookingEditor .two-col label>select[name="extra_hours"],
body.sj-ci--admin #bookingEditor .two-col label>select[name="booking_status"],
body.sj-ci--admin #bookingEditor .two-col label>select[name="payment_status"]{
 flex:0 1 155px;width:min(155px,58%);min-width:0;
 min-height:44px;padding:7px 8px;font-size:13px;
}
body.sj-ci--admin .booking-filters label:has(>#productFilter){
 display:flex;flex-direction:row;align-items:center;gap:9px;
}
body.sj-ci--admin .booking-filters #productFilter{width:min(230px,80%);min-width:0}

/* DIY craft admin: times and small price/capacity values. */
body.sj-ci--workshop-admin #editor .form-grid label:has(>input[type="number"]),
body.sj-ci--workshop-admin #editor .form-grid label:has(>input[type="time"]),
body.sj-ci--workshop-admin #editor .form-grid label:has(>select[name="slot_code"]){
 display:flex;flex-direction:row;align-items:center;justify-content:space-between;
 gap:11px;min-width:0;padding:9px 11px;
 border:1px solid #e2e2dc;border-radius:12px;background:#fbfcfd;
}
body.sj-ci--workshop-admin #editor .form-grid label>input[type="number"]{
 flex:0 0 100px;width:100px;max-width:100px;min-width:100px;
 min-height:44px;padding:7px 9px;text-align:center;
 font-variant-numeric:tabular-nums;
}
body.sj-ci--workshop-admin #editor .form-grid label>input[type="time"]{
 flex:0 1 132px;width:132px;min-width:0;max-width:132px;
 min-height:44px;padding:7px 6px;
}
body.sj-ci--workshop-admin #editor .form-grid label>select[name="slot_code"]{
 flex:0 1 157px;width:157px;min-width:0;max-width:157px;
 min-height:44px;padding:7px 6px;font-size:14px;
}
body.sj-ci--workshop-admin .workshop-admin-month{
 display:flex;flex-direction:row;align-items:center;gap:9px;
}
body.sj-ci--workshop-admin .workshop-admin-month select{width:108px;min-width:0}

/* Staff walk-in monitor: shorter month picker aligned beside label. */
body.sj-ci--walkin .walkin-page .month-field{
 display:flex;flex-direction:row;align-items:center;gap:9px;margin-left:auto;
}
body.sj-ci--walkin .walkin-page #month{width:165px;max-width:100%;min-width:0}

@media(max-width:760px){
 body.sj-enquiry-only #booking .sj-enquiry-form>.sj-enquiry-guest-counts{
  grid-template-columns:minmax(0,1fr);gap:10px;
 }
 body.sj-ci--workshop-admin #editor .form-grid{
  grid-template-columns:minmax(0,1fr);gap:11px;
 }
 body.sj-ci--admin #bookingEditor .two-col{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:430px){
 body.sj-enquiry-only #booking .sj-enquiry-fields>label:has(>select[name="hours"]){
  flex-direction:column;align-items:stretch;
 }
 body.sj-enquiry-only #booking .sj-enquiry-fields>label>select[name="hours"]{
  flex:0 0 auto;width:100%;max-width:100%;
 }
 body.sj-ci--workshop-admin #editor .form-grid label:has(>input[type="time"]){
  flex-wrap:wrap;
 }
 body.sj-ci--workshop-admin #editor .form-grid label>input[type="time"]{flex:0 0 135px}
 body.sj-ci--walkin .walkin-page .month-field{margin-left:0}
}

/* Celebrate iPhone layout: override the older full-width/flex-column form rules.
   Keep native date and time pickers usable without oversized empty controls. */
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:10px 14px!important;
 width:100%;min-width:0;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields > :is(.sj-enquiry-date-field,.sj-enquiry-time-field,.sj-enquiry-hours-field){
 display:flex!important;flex-direction:row!important;align-items:center!important;
 justify-content:space-between;gap:9px;
 min-width:0;max-width:100%;box-sizing:border-box;
 margin:0;padding:8px 10px;
 border:1px solid #dce1e4;border-radius:12px;background:#fbfcfd;
 font-size:13px;line-height:1.35;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields > .sj-enquiry-hours-field{
 grid-column:1/-1;
 justify-content:flex-start;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields > .sj-enquiry-date-field > input[type="date"]{
 flex:0 1 170px!important;
 width:170px!important;min-width:0!important;max-width:170px!important;
 min-height:44px;height:44px;
 padding:7px 6px;font-size:16px;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields > .sj-enquiry-time-field > input[type="time"]{
 flex:0 1 138px!important;
 width:138px!important;min-width:0!important;max-width:138px!important;
 min-height:44px;height:44px;
 padding:7px 6px;font-size:16px;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields > .sj-enquiry-hours-field > select[name="hours"]{
 flex:0 1 220px!important;width:220px!important;min-width:0!important;max-width:220px!important;
 min-height:44px;height:44px;margin-left:12px;font-size:16px;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-guest-counts{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:10px!important;min-width:0;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-guest-counts > label.sj-enquiry-count-field{
 display:flex!important;flex-direction:row!important;align-items:center!important;
 justify-content:space-between!important;gap:10px;
 min-height:62px;min-width:0;margin:0;padding:8px 12px;
 box-sizing:border-box;border:1px solid #dce1e4;border-radius:12px;background:#fbfcfd;
 font-size:13px;line-height:1.35;text-align:left;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-guest-counts > label.sj-enquiry-count-field > input[type="number"]{
 display:block!important;flex:0 0 78px!important;
 width:78px!important;min-width:78px!important;max-width:78px!important;
 height:44px!important;min-height:44px!important;max-height:44px!important;
 padding:6px 8px!important;margin:0!important;
 font-size:16px!important;line-height:1.25!important;text-align:center;
 box-sizing:border-box;font-variant-numeric:tabular-nums;
}
@media(max-width:760px){
 body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields,
 body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-guest-counts{
  grid-template-columns:minmax(0,1fr)!important;gap:9px!important;
 }
 body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields > .sj-enquiry-hours-field{
  grid-column:auto;justify-content:space-between;
 }
}
@media(max-width:360px){
 body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields > .sj-enquiry-time-field{
  flex-wrap:wrap;
 }
 body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-schedule-fields > .sj-enquiry-hours-field > select[name="hours"]{
  flex:0 1 180px!important;width:180px!important;margin-left:0;
 }
}

/* Eliminate the extra vertical margin between the dark heading and first label. */
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-head{
  margin-bottom:0!important;
}
/* Celebrate enquiry: remove surplus gap under header, with breathing room preserved. */
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form{
  padding-top:14px!important;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-celebrate-package-field{
  margin-top:0!important;
}
/* Align number entry close to the corresponding text rather than at the far right. */
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-guest-counts:not(.sj-enquiry-contact-fields) > label.sj-enquiry-count-field{
  display:grid!important;
  grid-template-columns:minmax(0,165px) 78px;
  justify-content:start!important;
  align-items:center!important;
  column-gap:12px;
}
body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-guest-counts:not(.sj-enquiry-contact-fields) > label.sj-enquiry-count-field > input[type="number"]{
  grid-column:2;
}
@media(max-width:430px){
 body.sj-brand-v2.sj-enquiry-only #booking #celebrateEnquiry .sj-enquiry-form > .sj-enquiry-guest-counts:not(.sj-enquiry-contact-fields) > label.sj-enquiry-count-field{
  grid-template-columns:minmax(0,1fr) 78px;
 }
}
