/* ============================================================
   Consultation booking panel — scoped to .se24c / #se24c
   Desktop ≥1200px: fixed right panel (360px), page content shifts left
                    (body padding) so nothing is covered. Can be minimised.
   Mobile  <1200px: sticky bottom bar → bottom sheet on tap.
   ============================================================ */
.se24c, .se24c * { box-sizing: border-box; }
.se24c {
  --se24c-w: 360px;
  --se24c-primary: var(--color-primary, #6C63FF);
  --se24c-primary-d: var(--color-primary-d, #5147e0);
  --se24c-text: var(--color-text, #1A1033);
  --se24c-muted: #6b6585;
  --se24c-border: var(--color-border, #EDE8FF);
  --se24c-err: #d93025;
  font-family: var(--font-body, 'Nunito', system-ui, sans-serif);
  color: var(--se24c-text);
}
.se24c [hidden] { display: none !important; }

/* ── Panel (shared) ─────────────────────────────────────────── */
.se24c-panel {
  background: #fff;
  padding: 22px 22px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.se24c-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: #f4f2ff; color: var(--se24c-text); font-size: 14px; cursor: pointer;
}
.se24c-close:hover { background: var(--se24c-border); }
.se24c-eyebrow {
  display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--se24c-primary); background: rgba(108,99,255,.1); padding: 3px 10px; border-radius: 999px;
}
.se24c-title {
  font-family: var(--font-display, 'Baloo 2', system-ui, sans-serif);
  font-size: 1.35rem; line-height: 1.2; margin: 8px 0 4px; color: var(--se24c-text); padding-right: 28px;
}
.se24c-sub { font-size: .85rem; line-height: 1.45; color: var(--se24c-muted); margin: 0 0 12px; }

.se24c-form { display: flex; flex-direction: column; gap: 8px; }
.se24c-row { display: grid; grid-template-columns: 1fr 92px; gap: 8px; }
.se24c-field { display: flex; flex-direction: column; min-width: 0; }
.se24c-field label { font-size: .78rem; font-weight: 700; margin-bottom: 3px; }
.se24c-field label span { color: var(--se24c-err); }
.se24c-field input, .se24c-field select, .se24c-field textarea {
  width: 100%; font: inherit; font-size: .9rem; color: var(--se24c-text);
  border: 1.5px solid #ddd8f5; border-radius: 10px; padding: 8px 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.se24c-field textarea { resize: vertical; min-height: 62px; }
.se24c-field input:focus, .se24c-field select:focus, .se24c-field textarea:focus {
  outline: none; border-color: var(--se24c-primary); box-shadow: 0 0 0 3px rgba(108,99,255,.15);
}
.se24c-field.has-err input, .se24c-field.has-err select, .se24c-field.has-err textarea { border-color: var(--se24c-err); }
.se24c-err { color: var(--se24c-err); font-size: .74rem; min-height: 0; }
.se24c-err:empty { display: none; }
.se24c-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.se24c-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .76rem; line-height: 1.4; color: var(--se24c-muted); cursor: pointer; }
.se24c-consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--se24c-primary); flex: none; }
.se24c-consent a { color: var(--se24c-primary); }

.se24c-total {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  background: #f7f5ff; border: 1px solid var(--se24c-border); border-radius: 12px; padding: 8px 12px; margin-top: 2px;
}
.se24c-total span { font-size: .8rem; color: var(--se24c-muted); font-weight: 700; }
.se24c-total strong { font-size: 1.35rem; color: var(--se24c-primary); font-family: var(--font-display, inherit); }
.se24c-total em { grid-column: 1 / -1; font-style: normal; font-size: .72rem; color: var(--se24c-muted); }

.se24c-pay {
  width: 100%; border: 0; border-radius: 999px; padding: 13px 16px; cursor: pointer;
  background: linear-gradient(135deg, var(--se24c-primary), var(--se24c-primary-d)); color: #fff;
  font: inherit; font-size: 1rem; font-weight: 800; letter-spacing: .01em;
  box-shadow: 0 8px 20px rgba(108,99,255,.35); transition: transform .15s, box-shadow .15s, opacity .15s;
}
.se24c-pay:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(108,99,255,.45); }
.se24c-pay:focus-visible { outline: 3px solid rgba(108,99,255,.4); outline-offset: 2px; }
.se24c-pay[disabled] { opacity: .65; cursor: wait; transform: none; }

.se24c-msg { font-size: .8rem; line-height: 1.4; border-radius: 10px; }
.se24c-msg:empty { display: none; }
.se24c-msg.is-error { color: #a1271c; background: #fdecea; padding: 8px 10px; }
.se24c-msg.is-info  { color: #3d348b; background: #efedff; padding: 8px 10px; }
.se24c-secure { font-size: .74rem; color: var(--se24c-muted); text-align: center; margin: 2px 0 0; }
.se24c-privacy { font-size: .7rem; color: #8a84a3; line-height: 1.4; margin: 0; text-align: center; }

.se24c-success { text-align: center; padding: 10px 4px; outline: none; }
.se24c-tick {
  width: 56px; height: 56px; border-radius: 50%; margin: 6px auto 10px;
  background: #e6f8f0; color: #14965c; font-size: 30px; font-weight: 800; line-height: 56px;
}
.se24c-success h3 { font-family: var(--font-display, inherit); font-size: 1.3rem; margin: 0 0 4px; }
.se24c-success p { margin: 0 0 10px; font-size: .88rem; color: var(--se24c-muted); }
.se24c-success dl { text-align: left; background: #f7f5ff; border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-size: .85rem; }
.se24c-success dt { color: var(--se24c-muted); font-size: .74rem; margin-top: 6px; }
.se24c-success dt:first-child { margin-top: 0; }
.se24c-success dd { margin: 0; font-weight: 800; word-break: break-word; }
.se24c-link { background: none; border: 0; color: var(--se24c-primary); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ── Desktop: fixed right panel ─────────────────────────────── */
@media (min-width: 1200px) {
  body.se24c-desk-open { padding-right: var(--se24c-w, 360px); }
  .se24c-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 360px; height: 100vh; height: 100dvh;
    z-index: 1000; border-left: 1px solid var(--se24c-border);
    box-shadow: -8px 0 32px rgba(108,99,255,.10);
  }
  .se24c.is-min .se24c-panel { display: none; }
  .se24c-tab {
    display: none; position: fixed; right: 0; top: 50%; z-index: 1000;
    transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl;
    background: var(--se24c-primary); color: #fff; border: 0; border-radius: 0 12px 12px 0;
    padding: 18px 10px; font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer;
    box-shadow: -4px 0 18px rgba(108,99,255,.3);
  }
  .se24c.is-min .se24c-tab { display: block; }
  .se24c-bar, .se24c-backdrop { display: none !important; }
}

/* ── Mobile / tablet: bottom bar + bottom sheet ─────────────── */
@media (max-width: 1199.98px) {
  body.se24c-has-bar { padding-bottom: 76px; }
  .se24c-tab { display: none; }
  .se24c-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: #fff; border-top: 1px solid var(--se24c-border);
    box-shadow: 0 -6px 24px rgba(26,16,51,.12);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .se24c-bar-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .se24c-bar-text strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .se24c-bar-text span { font-size: .78rem; color: var(--se24c-muted); }
  .se24c-bar-btn {
    flex: none; border: 0; border-radius: 999px; padding: 11px 20px; font: inherit; font-weight: 800; font-size: .95rem;
    background: linear-gradient(135deg, var(--se24c-primary), var(--se24c-primary-d)); color: #fff; cursor: pointer;
    box-shadow: 0 6px 16px rgba(108,99,255,.35);
  }
  .se24c-panel {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1002;
    max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(26,16,51,.25);
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .se24c-backdrop { display: none; position: fixed; inset: 0; z-index: 1001; background: rgba(26,16,51,.45); }
  .se24c.is-sheet-open .se24c-panel, .se24c.is-sheet-open .se24c-backdrop { display: block; }
  .se24c.is-sheet-open .se24c-bar { display: none; }
  body.se24c-noscroll { overflow: hidden; }
  /* 16px inputs stop iOS from zooming on focus */
  .se24c-field input, .se24c-field select, .se24c-field textarea { font-size: 16px; }
  .se24c-panel { max-width: 560px; margin: 0 auto; }
}
@media (max-width: 380px) {
  .se24c-row { grid-template-columns: 1fr 80px; }
  .se24c-bar-text strong { font-size: .82rem; }
  .se24c-bar-btn { padding: 10px 14px; }
}
@media print { .se24c { display: none !important; } body.se24c-desk-open, body.se24c-has-bar { padding: 0 !important; } }
@media (prefers-reduced-motion: reduce) { .se24c * { transition: none !important; } }
