/* StudioBook V3.69 — mobile rhythm for public and professional dialogs.
   Additive UI-only stylesheet. Preserves V3.68 brand palette and date-picker behavior.
   Ensures sticky public tabs never overlay a dialog. */
:root { --sb369-gap:18px; --sb369-gutter:18px; }

/* Modal overlays must outrank the sticky public business headers and section tabs.
   The public showroom dialog is appended to body, so this overrides the legacy z-index:30. */
body > .pub-modal,
body > .sb33-overlay { position:fixed!important; inset:0!important; z-index:1200!important; isolation:isolate; }
body > .modal { z-index:1200!important; }

@media (max-width:800px) {
  /* Consistent mobile breathing room across the professional workspace. */
  #app .main { padding:20px 18px 28px!important; }
  #app .main > .panel, #app .main > .card { margin-bottom:20px; }
  #app .main .panel, #app .main .card { border-radius:20px; }
  #app .main .formgrid, #app .main .form-grid { gap:16px!important; }
  #app .main :is(.panel,.card) > :is(h2,h3) { line-height:1.3; }
  #app .main :is(.settings-section,.studio-schedule-panel,.studio-closures-panel) { scroll-margin-bottom:110px; }

  /* Private professional dialogs must sit above the lower navigation and scroll
     within the viewport, not behind the phone's home indicator. */
  body > .modal {
    box-sizing:border-box!important;
    width:100%!important; max-width:100vw!important;
    display:flex!important; align-items:center!important; justify-content:center!important;
    padding:calc(16px + env(safe-area-inset-top,0px)) 16px calc(16px + env(safe-area-inset-bottom,0px))!important;
    overflow:hidden!important; overscroll-behavior:contain;
  }
  body > .modal > :is(.modal-card,.modal-card.wide,.payment-modal) {
    box-sizing:border-box!important; flex:0 1 auto!important;
    width:100%!important; min-width:0!important; max-width:100%!important;
    max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
    padding:24px 20px calc(28px + env(safe-area-inset-bottom,0px))!important;
    border-radius:22px!important;
    overflow-x:hidden!important; overflow-y:auto!important;
    -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  }
  body > .modal .modal-card > .row:first-child { gap:12px!important; margin-bottom:20px!important; align-items:flex-start; }
  body > .modal .modal-card > .row:first-child :is(h2,h3) { margin-top:5px; line-height:1.23; }
  body > .modal .modal-card :is(.formgrid,.form-grid,.payment-form-grid) { gap:17px!important; }
  body > .modal .modal-card :is(.formgrid,.form-grid,.payment-form-grid) > label { line-height:1.5; }
  body > .modal .modal-card :is(input,select,textarea):not([type=checkbox]):not([type=radio]) {
    box-sizing:border-box; max-width:100%; min-width:0;
    min-height:48px; font-size:16px!important;
  }
  body > .modal .modal-card textarea { min-height:88px!important; }
  body > .modal .modal-card .actions { gap:12px!important; margin-top:22px; }
  body > .modal .modal-card .actions button { min-height:44px; white-space:normal; }

  /* Keep user-visible public pages comfortably inset, but don't change the width
     of catalog images or business-specific photography. */
  #publicApp > main, #servicesApp > main { min-width:0; }
  #publicApp .pub-hero-card, #servicesApp .sb33-hero-aside { padding:22px!important; }
  #publicApp .pub-terms-copy, #servicesApp .sb33-section { line-height:1.65; }
}

@media (max-width:760px) {
  /* Public caftan rental and showroom forms; this fixes the exact screenshot
     where the sticky Collection / Avis / Portfolio tabs covered the form. */
  body > .pub-modal,
  body > .sb33-overlay {
    box-sizing:border-box!important;
    display:flex!important; align-items:center!important; justify-content:center!important;
    padding:calc(16px + env(safe-area-inset-top,0px)) 16px calc(16px + env(safe-area-inset-bottom,0px))!important;
    overflow:hidden!important; overscroll-behavior:contain;
  }
  body > .pub-modal > .pub-modal-card,
  body > .sb33-overlay > .sb33-modal {
    box-sizing:border-box!important; display:block!important;
    flex:0 1 auto!important; width:100%!important; min-width:0!important; max-width:100%!important;
    max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
    margin:0 auto!important;
    padding:26px 20px calc(30px + env(safe-area-inset-bottom,0px))!important;
    border-radius:22px!important;
    overflow-x:hidden!important; overflow-y:auto!important;
    -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
    background:#fff;
  }
  body > .pub-modal .request-head { margin:3px 0 23px!important; padding-right:0!important; gap:15px!important; align-items:flex-start; }
  body > .pub-modal .request-head h2 { font-size:clamp(21px,5.7vw,26px)!important; line-height:1.27!important; margin:8px 0 10px!important; }
  body > .pub-modal .request-head p { font-size:13px!important; line-height:1.7!important; margin-top:9px!important; }
  body > .pub-modal .pub-kicker { display:inline-block; line-height:1.5; }
  body > .pub-modal .request-grid { grid-template-columns:minmax(0,1fr)!important; gap:20px!important; }
  body > .pub-modal .request-grid > :is(label,div) { min-width:0!important; max-width:100%; margin:0!important; }
  body > .pub-modal .request-grid > label { display:block; font-size:13px!important; line-height:1.5!important; font-weight:700; }
  body > .pub-modal .request-grid > label > :is(input,select,textarea),
  body > .pub-modal .request-grid .public-dress-picker,
  body > .pub-modal .request-grid .sb349-date-field {
    box-sizing:border-box; display:block; margin-top:9px!important; width:100%; min-width:0; max-width:100%;
  }
  body > .pub-modal .request-grid :is(input,select,textarea):not([type=checkbox]):not([type=radio]) {
    box-sizing:border-box; min-width:0!important; max-width:100%!important;
    font-size:16px!important; min-height:53px; border-radius:13px;
  }
  body > .pub-modal .request-grid textarea { min-height:105px!important; line-height:1.6; }
  body > .pub-modal .request-grid .sb349-date-field { min-height:53px; border-radius:13px; }
  body > .pub-modal .request-grid .public-dress-picker > input { margin-top:0!important; }
  body > .pub-modal .appointment-public-dresses > label { display:block; margin-bottom:10px!important; font-size:13px!important; line-height:1.5; font-weight:700; }
  body > .pub-modal .public-selected-dresses { margin-top:12px; }
  body > .pub-modal .request-note { padding:16px!important; line-height:1.7; border-radius:13px; }
  body > .pub-modal .request-submit { min-height:52px; padding:14px 16px; margin-top:26px!important; border-radius:13px; white-space:normal; }
  body > .pub-modal .request-message { margin-top:13px; line-height:1.5; }
  body > .pub-modal .pub-close {
    position:sticky!important; top:0!important; float:right!important;
    width:44px!important; height:44px!important; min-width:44px!important;
    margin:-9px -7px 7px 8px!important;
    border-radius:50%; z-index:20!important;
  }
  body > .pub-modal .request-success { padding:28px 8px 32px; }

  /* Service-provider booking dialogs share the same spacing system. */
  body > .sb33-overlay .sb33-close {
    position:sticky!important; top:0!important; float:right!important;
    width:44px!important; height:44px!important; z-index:20;
    margin:-9px -7px 7px 8px!important;
  }
  body > .sb33-overlay .sb33-eyebrow { display:block; line-height:1.5; margin:3px 0 9px; }
  body > .sb33-overlay .sb33-modal h2 { margin:8px 0 12px!important; font-size:clamp(21px,5.8vw,27px)!important; line-height:1.28!important; }
  body > .sb33-overlay .sb33-modal-meta { margin:0 0 20px!important; line-height:1.7!important; font-size:13px!important; }
  body > .sb33-overlay .sb33-fields { grid-template-columns:minmax(0,1fr)!important; gap:20px!important; margin-top:23px!important; }
  body > .sb33-overlay .sb33-fields > label { font-size:13px!important; gap:9px!important; min-width:0; }
  body > .sb33-overlay .sb33-fields :is(input,select,textarea):not([type=checkbox]):not([type=radio]) {
    box-sizing:border-box; width:100%; max-width:100%; min-width:0;
    min-height:52px; font-size:16px!important; border-radius:13px;
  }
  body > .sb33-overlay .sb33-fields textarea { min-height:103px; }
  body > .sb33-overlay .sb33-info { padding:15px!important; margin:17px 0!important; line-height:1.7; }
  body > .sb33-overlay .sb33-submit { min-height:52px; margin-top:20px!important; }
  body > .sb33-overlay .sb33-addons { margin:15px 0; }
  body > .sb33-overlay .sb33-addon { padding:13px 10px; }
  body > .sb33-overlay .sb348-booking-calendar { margin:17px 0; }

  /* Public information and filters: more room between sections. */
  #publicApp .pub-catalog-section { padding-bottom:75px!important; }
  #servicesApp .sb33-section { padding-bottom:46px!important; }
  #publicApp .sb351-info-card,#servicesApp .sb351-info-card { padding:19px!important; }
}

@media (max-width:360px) {
  body > .pub-modal,body > .sb33-overlay,body > .modal { padding-left:12px!important; padding-right:12px!important; }
  body > .pub-modal > .pub-modal-card,body > .sb33-overlay > .sb33-modal,body > .modal > .modal-card { padding-left:17px!important;padding-right:17px!important; }
  #app .main { padding-left:14px!important; padding-right:14px!important; }
}
