/*
 * com_bookingmanager — frontend customer portal stylesheet.
 * Design tokens mirror Bookingo Android settings.html exactly.
 */

:root {
  --bm-bg:    #06080d;
  --bm-c1:    rgba(255,255,255,.025);
  --bm-c1b:   rgba(255,255,255,.04);
  --bm-c2:    rgba(255,255,255,.06);
  --bm-c3:    rgba(255,255,255,.08);
  --bm-t1:    #e8eaed;
  --bm-t2:    #9ba3b3;
  --bm-t3:    #5a6172;
  --bm-t4:    #3a4150;
  --bm-g:     #4caf50;     /* success */
  --bm-r:     #ff5252;     /* danger  */
  --bm-a:     #ffa726;     /* warning */
  --bm-acc:   #2196f3;     /* link    */
  --bm-radius: 14px;
}

.bm-shell {
  min-height: 70vh;
  background: var(--bm-bg);
  color: var(--bm-t1);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 48px 16px;
  margin: -1rem;
}

.bm-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bm-c1);
  border: 1px solid var(--bm-c2);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 1px 0 var(--bm-c1b) inset;
}
.bm-card-narrow { max-width: 440px; }

/* Headings */
.bm-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8a93a3;
  font-weight: 700;
  margin-bottom: 10px;
}
.bm-title    { font-size: 24px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.01em; color: #fff; }
.bm-title-sm { font-size: 18px; font-weight: 700; color: #fff; }
.bm-sub      { font-size: 14px; color: var(--bm-t2); line-height: 1.55; margin: 0 0 22px; }
.bm-licence  { font-size: 13px; color: var(--bm-t3); font-family: ui-monospace, Consolas, monospace; }

/* Form */
.bm-form { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.bm-label {
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bm-t2);
  font-weight: 600;
}
.bm-input {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--bm-c2);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--bm-t1);
  font-size: 15px;
  outline: none;
  transition: border-color .15s, background .15s;
  width: 100%;
}
.bm-input:focus { border-color: var(--bm-acc); background: rgba(255,255,255,.05); }
.bm-input::placeholder { color: var(--bm-t4); }

.bm-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--bm-t2); margin-top: 4px; }

.bm-btn-primary {
  margin-top: 8px;
  background: var(--bm-acc);
  color: #fff;
  border: 0;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  cursor: pointer;
  transition: filter .15s;
}
.bm-btn-primary:hover { filter: brightness(1.1); }

.bm-btn-ghost {
  background: transparent;
  color: var(--bm-t2);
  border: 1px solid var(--bm-c3);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.bm-btn-ghost:hover { color: var(--bm-t1); border-color: var(--bm-c3); }

/* Dashboard */
.bm-row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.bm-actions { display: flex; gap: 10px; align-items: center; }

.bm-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
}
.bm-badge-ok   { background: rgba(76,175,80,.10);   color: #7bd388; border: 1px solid rgba(76,175,80,.25); }
.bm-badge-warn { background: rgba(255,167,38,.10);  color: #ffb95a; border: 1px solid rgba(255,167,38,.25); }
.bm-badge-bad  { background: rgba(255,82,82,.10);   color: #ff7878; border: 1px solid rgba(255,82,82,.25); }

/* Chance gauge */
.bm-gauge { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 12px 14px; background: rgba(255,255,255,.02); border-radius: 12px; border: 1px solid var(--bm-c2); }
.bm-gauge-label { font-size: 12px; text-transform: uppercase; letter-spacing: .10em; color: var(--bm-t2); font-weight: 700; min-width: 100px; }
.bm-gauge-bar { flex: 1; height: 10px; background: rgba(255,255,255,.05); border-radius: 6px; overflow: hidden; }
.bm-gauge-fill { height: 100%; transition: width .4s ease-out; }
.bm-gauge-fill.ok  { background: linear-gradient(90deg, #4caf50, #7bd388); }
.bm-gauge-fill.mid { background: linear-gradient(90deg, #ffa726, #ffcc80); }
.bm-gauge-fill.low { background: linear-gradient(90deg, #ff5252, #ff8a80); }
.bm-gauge-num { font-weight: 800; font-size: 20px; min-width: 56px; text-align: right; font-feature-settings: 'tnum'; }

/* Sections */
.bm-section { margin-bottom: 22px; }
.bm-section h3 {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--bm-t2);
  font-weight: 700; margin: 0 0 10px;
}

/* Centre chips */
.bm-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-chip {
  background: rgba(255,255,255,.04); border: 1px solid var(--bm-c2);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--bm-t1);
  display: inline-flex; gap: 6px; align-items: center;
}
.bm-chip.hard    { border-color: rgba(33,150,243,.35); }
.bm-chip.premium { border-color: rgba(255,167,38,.35); }
.bm-chip .m { color: var(--bm-t2); font-size: 11px; }

/* Stat grid */
.bm-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.bm-stat-grid > div {
  background: rgba(255,255,255,.02); border: 1px solid var(--bm-c2);
  border-radius: 10px; padding: 12px 14px;
}
.bm-stat-lbl { font-size: 11px; letter-spacing: .10em; text-transform: uppercase; color: var(--bm-t3); font-weight: 700; margin-bottom: 4px; }
.bm-stat-val { font-size: 16px; font-weight: 700; color: var(--bm-t1); font-feature-settings: 'tnum'; }

.bm-empty { color: var(--bm-t3); font-style: italic; font-size: 14px; }
.bm-foot {
  font-size: 12px; color: var(--bm-t3); margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--bm-c2); text-align: center;
}

/* reCAPTCHA */
.bm-recaptcha-wrap { margin: 6px 0 4px; display: flex; justify-content: center; }
.bm-recaptcha-notice { margin-top: 6px; font-size: 11px; color: var(--bm-t4); }
.bm-recaptcha-notice a { color: var(--bm-acc); }

/* ============== FORM-SPECIFIC TOKENS ============== */

.bm-card-wide  { max-width: 980px; }
.bm-form-shell { padding-top: 22px; }
.bm-help       { color: var(--bm-t3); font-size: 12px; font-weight: 400; margin-left: 6px; }
.bm-col-span-2 { grid-column: span 2; }

/* Sticky gauge while scrolling */
.bm-gauge-sticky { position: sticky; top: 12px; z-index: 5; backdrop-filter: blur(8px); }
.bm-tip-list {
  list-style: none; padding: 0 0 0 16px; margin: 6px 0 18px;
  font-size: 12px; color: var(--bm-a);
}
.bm-tip-list li { margin: 2px 0; padding-left: 14px; position: relative; }
.bm-tip-list li::before { content: '→'; position: absolute; left: 0; color: var(--bm-a); }

/* Sections */
.bm-section h3 {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bm-t2); font-weight: 700; margin: 0 0 10px;
}
.bm-fold summary {
  cursor: pointer; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bm-t2); font-weight: 700; padding: 6px 0; list-style: none; user-select: none;
}
.bm-fold summary::-webkit-details-marker { display: none; }
.bm-fold summary::before { content: '▸'; display: inline-block; margin-right: 8px; transition: transform .15s; }
.bm-fold[open] summary::before { transform: rotate(90deg); }

/* Field grid */
.bm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.bm-field  { display: flex; flex-direction: column; gap: 4px; }
.bm-field > span { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--bm-t2); font-weight: 600; }

/* Centre picker */
.bm-centre-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px; margin-top: 10px; max-height: 280px; overflow-y: auto;
  padding: 6px; background: rgba(0,0,0,.20); border-radius: 10px; border: 1px solid var(--bm-c2);
}
.bm-chip-pick {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--bm-c2); border-radius: 8px;
  cursor: pointer; font-size: 13px; color: var(--bm-t1);
  transition: background .12s, border-color .12s;
}
.bm-chip-pick input { display: none; }
.bm-chip-pick:hover { background: rgba(255,255,255,.06); }
.bm-chip-pick.selected { background: rgba(33,150,243,.15); border-color: rgba(33,150,243,.5); }
.bm-chip-pick.hard { border-color: rgba(33,150,243,.35); }
.bm-chip-pick.premium { border-color: rgba(255,167,38,.35); }
.bm-chip-pick.selected.premium { background: rgba(255,167,38,.15); border-color: rgba(255,167,38,.6); }
.bm-chip-name { flex: 1; }
.bm-chip-mark { font-size: 11px; color: var(--bm-t2); }

/* Slider (notice) */
.bm-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  background: rgba(255,255,255,.06); border-radius: 3px; outline: none; padding: 0;
}
.bm-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px;
  background: var(--bm-acc); border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(33,150,243,.15); border: 0;
}
.bm-slider::-moz-range-thumb {
  width: 22px; height: 22px; background: var(--bm-acc); border-radius: 50%; cursor: pointer; border: 0;
}

/* Toggle switch */
.bm-toggle {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  cursor: pointer; user-select: none;
}
.bm-toggle input { display: none; }
.bm-toggle-track {
  width: 44px; height: 24px; background: rgba(255,255,255,.10); border-radius: 12px;
  position: relative; transition: background .2s;
}
.bm-toggle-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .2s;
}
.bm-toggle input:checked + .bm-toggle-track { background: var(--bm-acc); }
.bm-toggle input:checked + .bm-toggle-track::after { transform: translateX(20px); }
.bm-toggle-label { font-size: 13px; }
.bm-toggle-label small { display: block; color: var(--bm-t3); font-size: 11px; font-weight: 400; }

/* Hour grid */
.bm-hour-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.bm-hour {
  text-align: center; padding: 10px 8px; border-radius: 8px;
  background: rgba(255,255,255,.03); border: 1px solid var(--bm-c2);
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; cursor: pointer;
  color: var(--bm-t2);
}
.bm-hour input { display: none; }
.bm-hour:hover { background: rgba(255,255,255,.06); }
.bm-hour.on { background: rgba(33,150,243,.15); border-color: var(--bm-acc); color: #fff; }

/* Unavail dates */
.bm-unavail-row { display: flex; gap: 8px; margin-top: 6px; align-items: center; }
.bm-unavail-row .bm-input { flex: 1; }
.bm-chip-removable {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,82,82,.12); border: 1px solid rgba(255,82,82,.30);
  color: #ff8a80; padding: 4px 4px 4px 10px; border-radius: 999px; font-size: 12px;
  font-family: ui-monospace, Consolas, monospace;
}
.bm-chip-x {
  background: transparent; border: 0; color: inherit; cursor: pointer;
  width: 18px; height: 18px; line-height: 1; padding: 0; font-size: 16px;
}

/* Submit button full width */
.bm-btn-wide { width: 100%; margin-top: 18px; padding: 16px; font-size: 15px; }

/* Responsive: collapse 2-col on narrow viewports */
@media (max-width: 640px) {
  .bm-grid-2 { grid-template-columns: 1fr; }
  .bm-col-span-2 { grid-column: span 1; }
  .bm-hour-grid { grid-template-columns: repeat(3, 1fr); }
  .bm-row-top { flex-direction: column; align-items: flex-start; }
  .bm-actions { width: 100%; }
}

/* Onboarding licence section — visually highlighted as the most important field on first-fill */
.bm-section-emphasis {
  background: linear-gradient(180deg, rgba(33,150,243,.10), rgba(33,150,243,.02));
  border: 1px solid rgba(33,150,243,.30);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.bm-section-emphasis h3 { color: #7cc4ff; }
