/* Booking modal styling */
:root {
  --bk-radius-sm:4px; --bk-radius:10px; --bk-border:#909090; --bk-text:#111; --bk-accent:#000; --bk-bg:#fff; --bk-bg-overlay:rgba(0,0,0,.55);
  --bk-focus: 0 0 0 3px rgba(0,0,0,.4);
  font-family: "latepoint", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#booking-root[hidden]{display:none}
#booking-root {position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--bk-bg-overlay);z-index:9999;padding:20px;transition:background-color .25s ease, opacity .25s ease;gap:0;transition:gap .25s cubic-bezier(.16,.8,.24,1);}
.bk-modal {position:relative;display:grid;grid-template-columns:1fr 340px;max-height:90vh;width:min(1060px,100%);background:var(--bk-bg);border-radius:16px;box-shadow:0 8px 40px -8px rgba(0,0,0,.4);overflow:hidden;animation:modalIn .25s cubic-bezier(.16,.8,.24,1);color:var(--bk-text); --header-pad-top:34px;} /* ensure dark text */
/* Closing animation */
@keyframes modalOut { from { opacity:1; transform:translateY(0) scale(1);} to { opacity:0; transform:translateY(18px) scale(.98);} }
#booking-root[data-closing="true"] { background:transparent; }
#booking-root[data-closing="true"] .bk-modal{ animation: modalOut .22s cubic-bezier(.2,.6,.3,1) forwards; }
/* Force dark text for all standard elements inside modal */
.bk-modal, .bk-modal .bk-body, .bk-modal .bk-summary, .bk-modal .bk-step, .bk-modal .sel-card, .bk-modal .service-row, .bk-modal .addon, .bk-modal input, .bk-modal label, .bk-modal .price-line {color:var(--bk-text);} 
/* Buttons keep their own colors */
@keyframes modalIn {from{opacity:0;transform:translateY(18px) scale(.98);} to{opacity:1;transform:translateY(0) scale(1);} }
.bk-body {padding:var(--header-pad-top) 40px 24px;overflow:auto;position:relative;display:flex;flex-direction:column;z-index:1;}
.bk-summary {border-left:1px solid var(--bk-border);padding:30px 28px;overflow:auto;background:radial-gradient(circle at 24px 24px,#d9d9d9 1px,transparent 1px) 0 0/12px 12px;}
.bk-step h2 {font-size:22px;}
/* Make the datetime step independently scrollable if tall */
.bk-step[data-step="datetime"]{max-height:calc(90vh - 200px);overflow:auto;padding-right:4px;}
.bk-step[data-step="datetime"]::-webkit-scrollbar{width:8px;}
.bk-step[data-step="datetime"]::-webkit-scrollbar-thumb{background:#ccc;border-radius:4px;}
/* Make the service step scrollable with fixed height */
.bk-step[data-step="service"]{max-height:487px;overflow:auto;padding-right:4px;}
.bk-step[data-step="service"]::-webkit-scrollbar{width:8px;}
.bk-step[data-step="service"]::-webkit-scrollbar-thumb{background:#ccc;border-radius:4px;}
.bk-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:20px;will-change:transform,opacity;position:relative;z-index:20;}
.sel-card {border:1px solid var(--bk-border);border-radius:10px;padding:16px 10px;text-align:center;cursor:pointer;user-select:none;transition:border-color .15s,box-shadow .15s,transform .15s;background:#fff;display:flex;flex-direction:column;align-items:center;}
.sel-card img {width:80px;height:80px;border-radius:50%;object-fit:cover;margin-bottom:12px;}
.sel-card[data-selected="true"] {border-color:#111;box-shadow:0 0 0 2px #111 inset;}
.sel-card:active {transform:translateY(1px);}
.service-row {display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border:1px solid var(--bk-border);border-radius:12px;margin-bottom:16px;cursor:pointer;transition:border-color .15s, box-shadow .15s, background-color .15s;background:#fff;}
.service-list { display:grid; grid-template-columns: 1fr; gap: 12px; will-change: transform, opacity; }
.service-list .service-row { margin-bottom: 0; }
.service-row[data-selected="true"] {border-color:#111;box-shadow:0 0 0 2px #111 inset;}
.service-row .price {margin-left:24px;font-weight:600;white-space:nowrap;}
.addons-list .addon {display:flex;align-items:center;gap:10px;padding:14px 16px;border:1px solid var(--bk-border);border-radius:12px;margin-bottom:14px;cursor:pointer;transition:border-color .15s, box-shadow .15s, background-color .15s;}
.addons-list .addon[data-selected="true"] {border-color:#111;box-shadow:0 0 0 2px #111 inset;}
.cal-head{display:flex;align-items:center;justify-content:space-between;margin:-2px 2px 20px;}
.cal-head .month-label{font-size:20px;font-weight:700;color:#111;display:flex;align-items:baseline;gap:8px}
.cal-head .nav{display:flex;gap:6px;}
.cal-head .nav button{border:0;background:#f1f1f1;color:#111;width:28px;height:28px;border-radius:6px;cursor:pointer;font-size:16px;line-height:1;display:flex;align-items:center;justify-content:center}
.cal-head{display:flex;align-items:center;justify-content:flex-start;margin:5px 2px 20px;}
.cal-head .month-label{font-size:20px;font-weight:800;color:#111;display:flex;align-items:center;gap:10px}
.cal-head .nav{display:flex;gap:8px;margin-left:10px}
.cal-head .nav button{border:1px solid #111;background:#2b2d31;color:#fff;width:30px;height:30px;border-radius:8px;cursor:pointer;font-size:16px;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.cal-head .nav button:hover{background:#000}
.cal-head .nav button:focus-visible{outline:2px solid #000}
.cal-head .nav button:hover{background:#818181}
.cal-head .nav button[disabled]{opacity:.4;cursor:not-allowed}
.cal-head .nav button:hover:not([disabled]){ color:#000 !important; }
.calendar {display:grid;grid-template-columns:repeat(7,1fr);gap:6px;font-size:12px;margin-bottom:22px;width:100%;box-sizing:border-box;overflow-x:hidden;}

/* Category Card Styles */
.bk-card {
  position: relative;
  border: 3px solid #8f8f8f;
  border-radius: 16px;
  padding: 0;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}
.bk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.08);
  border-color: #222;
}
.bk-card:active {
  transform: translateY(0) scale(0.98);
}
.bk-card[data-selected="true"] {
  border-color: #000000;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.bk-card-img {
  width: 100%;
  max-width: 120px;
  height: 60px;
  object-fit: contain;
  border-radius: 0;
  margin-bottom: 0;
  transition: transform 0.5s ease;
  padding: 8px 4px;
  background: #f8f9fa;
}
.bk-card:hover .bk-card-img {
  transform: scale(1.05);
}
.bk-card-name {
  font-weight: 700;
  font-size: 15px;
  padding: 14px 12px;
  color: #222;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  z-index: 1;
}
.bk-card-img-placeholder {
  width: 100%;
  height: 140px;
  border-radius: 0;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  font-size: 32px;
  color: #ccc;
  transition: background 0.3s;
}
.bk-card:hover .bk-card-img-placeholder {
  background: #f0f0f0;
  color: #999;
}

.calendar .dow{font-weight:600;text-align:center;}
.calendar button {aspect-ratio:1/1;border:0;border-radius:8px;background:#f3f3f3;cursor:pointer;font-weight:600;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:6px 2px 2px;color:#111;}
.calendar button .day-num{font-size:clamp(14px,3.2vh,24px);line-height:1.1;font-weight:700;margin-top:clamp(6px,2.2vh,20px)}
.calendar button[data-available="true"] {background:#eefaf0;}
.calendar button[data-selected="true"] {background:#ffeec0;color:#111;box-shadow:0 0 0 2px #f3ca6a inset;}
.calendar button .slot-tip {
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    background: #191d1c;
    color: #edfcff;
    border-radius: 70px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    display: none;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1001;
}
.calendar button[data-available="true"]:hover .slot-tip{display:block;}
/* Prevent tooltip clipping on left/right edges */
.calendar button:nth-child(7n+1) .slot-tip { left: 0; transform: none; }
.calendar button:nth-child(7n) .slot-tip { left: auto; right: 0; transform: none; }
.calendar button small {display:none;}
.calendar .day-bar {margin-top:auto;display:flex;width:80%;height:5px;gap:0;border-radius:3px;overflow:hidden;background:#d9d9d9;}
.calendar .day-bar span {flex:1;background:#6fd284;}
.calendar .day-bar span.off {background:#a1a1a1;}
.calendar button[data-selected="true"] .day-bar span {background:#34b45d;}
.calendar button[data-selected="true"] .day-bar span.off {background:#bfbfbf;}
.time-slots {display:flex;flex-wrap:wrap;gap:10px;margin-bottom:10px;}
.time-slots button {
  padding:8px 14px;
  border:0;
  border-radius:8px;
  background:#e0f8dc;
  cursor:pointer;
  font-size:14px;
  font-weight:500;
  color: var(--bk-text);
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-text-fill-color: var(--bk-text);
  min-width:72px;
  box-sizing:border-box;
}
.time-slots button[disabled]{background:#efefef;color:#9aa0a6;cursor:not-allowed;opacity:1}
.time-slots button[data-selected="true"] {background:#111;color:#fff;-webkit-text-fill-color:#fff;}
.bk-nav {position:sticky;bottom:0;display:flex;justify-content:space-between;gap:12px;padding:14px 28px;background:#fff;align-items:center;margin-top:auto;z-index:10;}
#booking-root .bk-nav { padding: 14px 28px; }
.bk-nav button {border:0;background:#111;color:#fff;padding:10px 24px;border-radius:10px;font-size:15px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;}
.bk-nav button[disabled]{opacity:.4;cursor:not-allowed;}
#bk-back {background:rgba(17,17,17,.12);color:#111;}
#bk-back:hover{background:rgba(17,17,17,.18);} 
#bk-back:active{transform:translateY(1px);} 
#bk-back:focus-visible{outline:2px solid #000;outline-offset:2px;}
.summary-section {margin-bottom:28px;}
.summary-section h4 {margin:0 0 6px;font-size:13px;letter-spacing:.5px;color:#555;text-transform:uppercase;}
.price-line {display:flex;justify-content:space-between;font-size:14px;margin-bottom:4px;}
.price-line.total {border-top:2px solid #111;margin-top:10px;padding-top:8px;font-weight:700;}
.form-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:20px;}
.form-grid input {padding:12px 14px;border:2px solid var(--bk-border);border-radius:10px;font-size:14px;width:100%;box-sizing:border-box;}
.form-grid input:invalid{border-color:#ff7474}
.customer-grid{grid-template-columns:1fr 1fr;gap:14px;max-width:420px;}
.form-field{display:flex;gap:6px;flex-direction:column;}
.form-field.full-width{grid-column:1/-1;}
.form-field label{font-size:13px;color:#333;font-weight:600;display:flex;align-items:center;gap:6px}
.form-field .step-num{display:inline-block;min-width:18px;text-align:right;color:#777;font-weight:700}
.form-field textarea{border:2px solid var(--bk-border);border-radius:10px;padding:12px 14px;font-size:14px;font-family:inherit;resize:vertical;min-height:60px;background:#fff;transition:border-color .15s;}
.form-field textarea:focus{outline:none;border-color:#111;box-shadow:var(--bk-focus);}
.form-field textarea::placeholder{color:#999;}

/* ================================================
   Admin: Repeat weekly toggle row
   ================================================ */
.bk-advanced{
  border:1px solid rgba(17,17,17,.12);
  border-radius:12px;
  background:#fff;
  box-shadow:0 6px 18px -14px rgba(0,0,0,.18);
  overflow:hidden;
}

.bk-advanced > summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  padding:10px 14px;
  font-size:13px;
  font-weight:800;
  color:#111;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:linear-gradient(180deg,#fafafa,#f4f4f4);
}

/* Remove default marker */
.bk-advanced > summary::-webkit-details-marker{display:none;}

/* Custom chevron */
.bk-advanced > summary::after{
  content:"▾";
  font-size:14px;
  line-height:1;
  opacity:.7;
  transform:translateY(-1px);
  transition:transform .15s ease;
}
.bk-advanced[open] > summary::after{
  transform:rotate(180deg);
}

.bk-advanced > summary:focus-visible{
  outline:none;
  box-shadow:var(--bk-focus);
}

.bk-advanced-body{
  padding:10px;
  background:#fff;
}

.repeat-weekly-row{
  padding:12px 14px;
  border:1px solid rgba(17,17,17,.12);
  border-radius:12px;
  background:linear-gradient(180deg,#fafafa,#f4f4f4);
  box-shadow:0 6px 18px -14px rgba(0,0,0,.25);
}

.repeat-weekly-toggle{
  display:flex;
  align-items:center;
  gap:12px;
  cursor:pointer;
  user-select:none;
  font-weight:800;
  color:#111;
}

/* Hide the checkbox (but keep it accessible) and avoid inheriting .form-grid input styles */
.repeat-weekly-toggle input[type="checkbox"]{
  position:absolute;
  opacity:0;
  width:1px;
  height:1px;
  padding:0;
  margin:0;
  border:0;
  pointer-events:none;
}

.repeat-weekly-track{
  width:44px;
  height:26px;
  border-radius:999px;
  background:rgba(17,17,17,.22);
  display:inline-flex;
  align-items:center;
  padding:3px;
  box-sizing:border-box;
  transition:background .15s ease, box-shadow .15s ease;
  flex-shrink:0;
}

.repeat-weekly-thumb{
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 6px 14px rgba(0,0,0,.22);
  transform:translateX(0);
  transition:transform .15s cubic-bezier(.2,.8,.2,1);
}

.repeat-weekly-toggle input[type="checkbox"]:focus-visible + .repeat-weekly-track{
  box-shadow:var(--bk-focus);
}

.repeat-weekly-toggle input[type="checkbox"]:checked + .repeat-weekly-track{
  background:#111;
}

.repeat-weekly-toggle input[type="checkbox"]:checked + .repeat-weekly-track .repeat-weekly-thumb{
  transform:translateX(18px);
}

.repeat-weekly-text{
  font-size:14px;
  line-height:1.2;
}

.repeat-weekly-hint{
  margin-top:6px;
  font-size:12px;
  color:#666;
  line-height:1.25;
}
.input-group{display:flex;align-items:center;border:2px solid var(--bk-border);border-radius:10px;overflow:hidden;background:#fff;width:100%}
.input-group .prefix{padding:12px 10px;background:#f7f7f7;border-right:1px solid var(--bk-border);font-weight:600;color:#333}
.input-group input{border:0;outline:none;padding:12px 12px;font-size:14px;flex:1;min-width:0;width:100%}
.input-group input:focus{box-shadow:var(--bk-focus)}
.privacy {display:flex;align-items:center;gap:8px;font-size:13px;margin:10px 0 24px;}
.auth-sep {text-align:center;margin:18px 0;font-size:12px;letter-spacing:1px;display:flex;align-items:center;gap:14px;}
.auth-sep:before,.auth-sep:after {content:"";flex:1;height:1px;background:var(--bk-border);} 
.social-btns button {border:1px solid var(--bk-border);background:#fff;padding:10px 16px;border-radius:10px;font-weight:500;cursor:pointer;display:block;width:100%;margin-bottom:10px;}
@media (max-width:960px){ 
  .bk-modal{grid-template-columns:1fr;} 
  .bk-summary{display:none;} 
  .bk-mobile-summary{display:block !important;} 
}

/* ================================================
   Mobile Floating Summary Bubble (visible <960px)
   ================================================ */
.bk-mobile-summary{
  display:none;
  opacity:0;
  width:calc(100% - 16px);
  max-width:420px;
  margin-bottom:12px;
  z-index:10001;
  pointer-events:auto;
  transition:opacity .28s cubic-bezier(.16,.8,.24,1), transform .28s cubic-bezier(.16,.8,.24,1);
}
.bk-mobile-summary.visible{
  opacity:1;
  animation:mobileSummaryIn .28s cubic-bezier(.16,.8,.24,1);
}
#booking-root[data-closing="true"] .bk-mobile-summary{
  animation:mobileSummaryOut .22s cubic-bezier(.2,.6,.3,1) forwards;
}
@keyframes mobileSummaryIn{
  from{opacity:0;transform:translateY(-12px);}
  to{opacity:1;transform:translateY(0);}
}
@keyframes mobileSummaryOut{
  from{opacity:1;transform:translateY(0);}
  to{opacity:0;transform:translateY(-12px);}
}
.bk-mobile-summary-inner{
  background:#fff;
  border:1px solid var(--bk-border);
  border-radius:16px;
  box-shadow:0 8px 32px rgba(0,0,0,.4);
  padding:12px 16px;
  color:var(--bk-text);
  transition:transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}
.bk-mobile-summary.pop .bk-mobile-summary-inner{
  animation:bubblePop .3s cubic-bezier(.25,.46,.45,.94);
}
@keyframes bubblePop{
  0%{transform:scale(1);}
  50%{transform:scale(1.04);}
  100%{transform:scale(1);}
}
.bk-mobile-summary-content{
  font-size:13px;
  line-height:1.5;
}
.bk-mobile-summary .ms-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:3px 0;
}
.bk-mobile-summary .ms-row.total{
  border-top:1px solid var(--bk-border);
  margin-top:6px;
  padding-top:8px;
  font-weight:700;
  font-size:15px;
}
.bk-mobile-summary .ms-label{
  color:#555;
}
.bk-mobile-summary .ms-row.total .ms-label{
  color:var(--bk-text);
}
.bk-mobile-summary .ms-value{
  font-weight:600;
  color:var(--bk-text);
}
.bk-mobile-summary .ms-row.total .ms-value{
  color:#111;
  font-size:16px;
}

/* Mobile-first portrait enhancements */
@media (max-width: 480px), (orientation: portrait) {
  html, body { height: 100%; }
  #booking-root { padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .bk-modal { width: 100%; max-height: 92vh; border-radius: 14px; grid-template-columns: 1fr; }
  .bk-modal { --header-pad-top: 12px; }
  .bk-body { padding: var(--header-pad-top) 16px 12px; }
  .bk-step h2 { font-size: 18px; margin-bottom: 30px; }
  .bk-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sel-card { padding: 12px 10px; }
  .sel-card img { width: 64px; height: 64px; }
  .service-row { padding: 12px 12px; margin-bottom: 12px; }
  .service-row .price { margin-left: 12px; }
  .addons-list .addon { padding: 12px; margin-bottom: 12px; }
  .bk-step[data-step="datetime"]{ max-height: calc(92vh - 180px); }
  .calendar { gap: 4px; width: 100%; box-sizing: border-box; overflow-x: hidden; }
  .calendar button { padding: 4px 2px; border-radius: 8px; width: 100%; }
  .calendar button .day-num { font-size: clamp(12px, 2.6vh, 18px); margin-top: clamp(4px, 1.6vh, 10px); }
  .customer-grid { grid-template-columns: 1fr; max-width: 100%; }
}

/* Landscape mobile - tighter constraints for scrolling */
@media (max-width: 1023px) and (orientation: landscape) {
  .bk-modal { max-height: 95vh; }
  .bk-step[data-step="datetime"]{ max-height: calc(95vh - 120px); }
  .bk-body { padding: 8px 16px 8px; }
  .bk-step h2 { font-size: 16px; margin-bottom: 16px; }
  .calendar { gap: 4px; width: 100%; box-sizing: border-box; overflow-x: hidden; }
  .calendar button { padding: 2px 2px; border-radius: 8px; width: 100%; }
  .calendar button .day-num { font-size: clamp(12px, 2.2vh, 18px); margin-top: clamp(4px, 1.4vh, 10px); }
  .calendar .day-bar { height: 4px; width: 88%; }
  .time-slots { gap: 8px; }
  .time-slots button { padding: 10px 12px; font-size: 15px; border-radius: 10px; min-width: 76px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-grid input { padding: 12px; font-size: 16px; }
  .input-group .prefix { padding: 12px 10px; }
  .bk-nav { position: sticky; bottom: 0; padding: 0; gap: 10px; justify-content: center; }
  #booking-root .bk-nav {padding: 0;}
  .bk-nav button {flex: 1;padding: 14px 16px;font-size: 16px;border-radius: 12px;justify-content: center;}
  #bk-back { padding: 14px 16px; }
}

/* Success overlay styles */
.success-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:10000}
.success-card{background:#0f1113;color:#e7f6ea;border:1px solid #2a2e31;border-radius:14px;box-shadow:0 10px 40px rgba(0,0,0,.35);padding:22px 26px;min-width:300px;max-width:92vw;text-align:center}
.success-icon{display:flex;align-items:center;justify-content:center;margin-bottom:10px}
.success-title{margin:6px 0 2px 0;font-size:18px;font-weight:800;color:#e7f6ea}
.success-sub{margin:0 0 8px 0;font-size:13px;color:#cde7d4}
.success-note{margin:0;font-size:12px;color:#b9c5bb}
