/* Public page customization tools: show editing controls on demand. */
.public-owner-tools { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-top:1rem; padding:1rem 1.25rem; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.public-owner-tools strong { font-size:.9rem; }
.public-owner-tools[hidden] { display:none !important; }
.public-owner-tools p { margin:.3rem 0 0; color:var(--text-soft); font-size:.82rem; max-width:65ch; }
.site-public[data-public-editing="false"] :is(.public-edit-group,.public-edit-btn,.public-custom-elem-del,[data-public-add-trigger],.public-element--hidden) { display:none !important; }
.site-public[data-public-editing="false"] .public-editable { outline:none; border:0; background:transparent; }

/* Booking uses one scroll surface and retains the existing theme and calendar. */
#booking-modal [hidden] { display: none !important; }
#booking-modal .modal { display: flex; flex-direction: column; width: min(600px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: hidden; }
#booking-modal .modal__header, #booking-modal .modal__foot { flex: 0 0 auto; position: static; }
#booking-modal .modal__body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
#booking-modal .modal__close, #booking-modal .btn, #booking-modal input, #booking-modal select { min-height: 44px; }
#booking-modal .modal__close { min-width: 44px; }
#booking-modal input, #booking-modal select, #booking-modal textarea { font-size: 16px; min-width: 0; }
#booking-modal .field--row { grid-template-columns: minmax(0, 1fr); }
#booking-modal .booking-stage { border: 0; padding: 0; margin: 0; min-width: 0; }
#booking-modal .booking-stage legend { color: var(--text); font-size: 1.12rem; font-weight: 700; margin-bottom: 1rem; }
.booking-progress { color: var(--primary); font-size: .85rem; font-weight: 700; margin: 0 0 .5rem; }
.booking-summary { padding: .8rem; margin: 0 0 1.2rem; background: var(--surface-2); border-radius: var(--radius-sm); color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
#booking-modal .field small { display: block; color: var(--text-soft); line-height: 1.45; margin-top: .35rem; }
#booking-modal[data-booking-phase="time"]:not([data-booking-preview="true"]) [data-booking-submit],
#booking-modal:not([data-booking-phase="details"]) #booking-payment-box,
#booking-modal:not([data-booking-phase="details"]) #booking-google-wrap,
#booking-modal:not([data-booking-phase="details"]) #booking-history { display: none !important; }
#booking-modal[data-booking-phase] #booking-time { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
#booking-modal[data-booking-phase] label[for="booking-time"] { font-size: 1rem; font-weight: 600; }
#booking-modal [data-single-professional="true"] select,
#booking-modal [data-single-professional="true"] label { display: none; }
#booking-modal [data-single-professional="true"] .hint { color: var(--text); font-size: .95rem; }
.booking-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: .6rem; margin-bottom: 1.2rem; }
.booking-slot { min-height: 46px; padding: .65rem .35rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.booking-slot:hover { border-color: var(--primary); }
.booking-slot[aria-pressed="true"] { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.booking-slot:focus-visible, #booking-modal button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
#booking-modal button:disabled { cursor: not-allowed; opacity: .55; }
.booking-receipt > i { color: var(--primary); font-size: 2rem; }
.booking-receipt h3 { margin: .65rem 0; font-size: 1.35rem; }
.booking-receipt p { line-height: 1.55; color: var(--text-soft); }
.booking-receipt dl { display: grid; grid-template-columns: 1fr; gap: .25rem; border-block: 1px solid var(--border); padding: 1rem 0; }
.booking-receipt dt { color: var(--muted); font-size: .85rem; }
.booking-receipt dd { margin: 0 0 .65rem; font-weight: 650; overflow-wrap: anywhere; }
.booking-receipt__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
body[data-theme="dark"] #booking-modal { --muted: #b6bed0; --text-soft: #c4ccdd; }
body[data-theme="dark"] #booking-modal .booking-progress { color: #c4b5fd; }
body[data-theme="dark"] #booking-modal .hint--warn { color: #fcd34d; }
@media (max-width: 600px) {
  #booking-modal { padding: 0; align-items: stretch; }
  #booking-modal .modal { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  #booking-modal .modal__header { padding: .7rem 1rem; padding-top: max(.7rem, env(safe-area-inset-top)); }
  #booking-modal .modal__body { padding: 1rem; }
  #booking-modal .modal__foot { padding: .8rem 1rem max(.8rem, env(safe-area-inset-bottom)); flex-wrap: wrap; flex-direction: row; }
  #booking-modal .modal__foot > .btn { flex: 1 1 auto; min-height: 48px; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { #booking-modal .modal { animation: none; } }
