/* ═══════════════════════════════════════════════════
   JetStudio Bookings – Frontend v2.1
   Templates: Typeform & Calendly | Modes: Light & Dark
   ═══════════════════════════════════════════════════ */

.jsb-booking {
    --a:        #6C3CE1;
    --a-soft:   rgba(108,60,225,.1);
    --a-glow:   rgba(108,60,225,.3);
    --radius:   14px;
    --dur:      0.42s;
    --ease:     cubic-bezier(.22,1,.36,1);
    --bounce:   cubic-bezier(.34,1.56,.64,1);
    font-family: var(--jsb-font, 'DM Sans', sans-serif);
    width: 100%;
    position: relative;
}

/* Light */
.jsb-booking.jsb-mode-light {
    --bg:       #ffffff;
    --bg2:      #f9f8fc;
    --bg3:      #f0edf9;
    --border:   #ede8f8;
    --text:     #1a1a2e;
    --text2:    #6b7280;
    --text3:    rgba(26,26,46,.4);
    --input-bg: #f4f2f9;
    --shadow:   0 4px 24px rgba(108,60,225,.08);
}

/* Dark */
.jsb-booking.jsb-mode-dark {
    --bg:       #0f0f1a;
    --bg2:      #161625;
    --bg3:      #1e1e30;
    --border:   rgba(255,255,255,.07);
    --text:     #f0eef8;
    --text2:    rgba(240,238,248,.6);
    --text3:    rgba(240,238,248,.35);
    --input-bg: #1e1e30;
    --shadow:   0 4px 24px rgba(0,0,0,.4);
}

.jsb-booking *, .jsb-booking *::before, .jsb-booking *::after { box-sizing: border-box; }

/* ════════════════════════════════════
   TYPEFORM TEMPLATE
   ════════════════════════════════════ */

.jsb-booking.jsb-tpl-typeform {
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    /* NO fixed height — adapts to content */
}

.jsb-tpl-typeform .jsb-sidebar { display: none; }

.jsb-tpl-typeform .jsb-form-body {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Progress bar */
.jsb-progress {
    height: 3px;
    background: var(--border);
    flex-shrink: 0;
    border-radius: 3px 3px 0 0;
}
.jsb-tpl-calendly .jsb-progress { display: none; }

.jsb-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--a), #a78bfa);
    border-radius: 0 3px 3px 0;
    transition: width .6s var(--ease);
}

/* Steps wrapper — NO overflow hidden, NO fixed height */
.jsb-tpl-typeform .jsb-steps {
    position: relative;
    width: 100%;
}

/* Each step — static flow, not absolute */
.jsb-step {
    display: none;
    padding: 48px 52px 28px;
    width: 100%;
    animation: jsbSlideInStep var(--dur) var(--ease) both;
}

.jsb-step.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Calendly keeps absolute positioning for its steps */
.jsb-tpl-calendly .jsb-steps {
    position: relative;
    overflow: hidden;
    min-height: 460px;
}

.jsb-tpl-calendly .jsb-step {
    position: absolute;
    inset: 0;
    display: flex;
    padding: 36px 32px 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(40px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
    pointer-events: none;
    overflow-y: auto;
}

.jsb-tpl-calendly .jsb-step.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

.jsb-tpl-calendly .jsb-step.exit-up {
    opacity: 0;
    transform: translateY(-40px);
    transition-duration: .28s;
}

@keyframes jsbSlideInStep {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.jsb-step-inner { width: 100%; max-width: 580px; }

/* Step number badge */
.jsb-step-num-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--a);
    background: var(--a-soft);
    padding: 3px 12px 3px 8px;
    border-radius: 20px;
    margin-bottom: 16px;
    font-family: 'Space Mono', monospace;
    letter-spacing: .3px;
}

.jsb-step-num-badge::before {
    content: attr(data-num);
    display: inline-flex;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--a);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.jsb-step-title {
    font-size: clamp(20px, 3.5vw, 27px);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
    line-height: 1.25;
    letter-spacing: -.4px;
}

.jsb-step-sub {
    font-size: 14px;
    color: var(--text2);
    margin: 0 0 24px;
    line-height: 1.55;
}

/* ── Option cards ── */
.jsb-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jsb-opt-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text);
    transition: border-color .2s, background .2s, transform .18s var(--bounce);
    text-align: left;
    width: 100%;
}

.jsb-opt-card:hover {
    border-color: var(--a);
    background: var(--a-soft);
    transform: translateX(4px);
}

.jsb-opt-card.selected {
    border-color: var(--a);
    background: var(--a-soft);
    box-shadow: 0 0 0 1px var(--a);
}

.jsb-opt-key {
    width: 26px; height: 26px;
    border-radius: 7px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--text3);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}
.jsb-opt-card.selected .jsb-opt-key,
.jsb-opt-card:hover   .jsb-opt-key {
    background: var(--a); border-color: var(--a); color: #fff;
}

/* Multi-choice */
.jsb-opt-check {
    width: 18px; height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
    background: var(--input-bg);
}
.jsb-opt-card.selected .jsb-opt-check { background: var(--a); border-color: var(--a); }
.jsb-opt-card.selected .jsb-opt-check::after { content: '✓'; font-size: 11px; color: #fff; font-weight: 700; }

/* ── Text / Textarea ── */
.jsb-text-input,
.jsb-textarea-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
}
.jsb-text-input:focus,
.jsb-textarea-input:focus {
    border-color: var(--a);
    box-shadow: 0 0 0 3px var(--a-soft);
}
.jsb-text-input::placeholder,
.jsb-textarea-input::placeholder { color: var(--text3); }
.jsb-textarea-input { resize: vertical; min-height: 100px; }

/* ── Contact fields ── */
.jsb-contact-grid { display: flex; flex-direction: column; gap: 14px; }
.jsb-contact-row { display: flex; gap: 12px; }
.jsb-contact-row > .jsb-contact-field { flex: 1; min-width: 0; }

.jsb-contact-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 5px;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.jsb-contact-field input {
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: calc(var(--radius) - 4px);
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
}
.jsb-contact-field input:focus {
    border-color: var(--a);
    box-shadow: 0 0 0 3px var(--a-soft);
}
.jsb-contact-field input::placeholder { color: var(--text3); }
.jsb-contact-field input.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
    animation: jsbShake .45s var(--ease);
}

/* Pildoras de eleccion (p.ej. por donde prefiere que le contestemos). Dos botones
   anchos: se ve de un vistazo cual esta elegido y se tocan bien con el pulgar. */
.jsb-choice-field .jsb-pills { display: flex; gap: 8px; }
.jsb-choice-field .jsb-pill {
    flex: 1;
    min-width: 0;
    padding: 12px 10px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: calc(var(--radius) - 4px);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, color .2s, background .2s;
    -webkit-appearance: none;
}
.jsb-choice-field .jsb-pill:hover { border-color: var(--a); color: var(--text); }
.jsb-choice-field .jsb-pill.selected {
    border-color: var(--a);
    color: var(--a);
    background: var(--a-soft);
    box-shadow: 0 0 0 3px var(--a-soft);
}

/* ── Calendar ── */
.jsb-cal-wrap { display: flex; gap: 20px; }
.jsb-cal-panel { flex: 1; min-width: 0; }

.jsb-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.jsb-cal-month-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    text-transform: capitalize;
}

.jsb-cal-arrow {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    line-height: 1;
}
.jsb-cal-arrow:hover { background: var(--a-soft); border-color: var(--a); }

.jsb-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.jsb-cal-hd {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text3);
    padding: 5px 0;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.jsb-cal-day {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
}
.jsb-cal-day:hover:not(.disabled):not(.sel) { background: var(--a-soft); color: var(--a); }
.jsb-cal-day.sel { background: var(--a); color: #fff; font-weight: 700; box-shadow: 0 2px 8px var(--a-glow); }
.jsb-cal-day.today:not(.sel) { border: 1.5px solid var(--a); color: var(--a); font-weight: 700; }
.jsb-cal-day.disabled { opacity: .22; cursor: default; pointer-events: none; }
.jsb-cal-day.empty { visibility: hidden; pointer-events: none; }

/* Time slots */
.jsb-slots-panel {
    width: 160px; flex-shrink: 0;
    display: flex; flex-direction: column; gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--a-soft) transparent;
}
.jsb-slots-panel::-webkit-scrollbar { width: 4px; }
.jsb-slots-panel::-webkit-scrollbar-thumb { background: var(--a-soft); border-radius: 2px; }

.jsb-slots-placeholder {
    font-size: 12px; color: var(--text3);
    text-align: center; padding: 24px 8px; line-height: 1.5;
}

.jsb-slot-btn {
    width: 100%;
    padding: 10px 8px;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 13px; font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    animation: jsbSlideIn .3s var(--ease) both;
}
.jsb-slot-btn:hover { border-color: var(--a); background: var(--a-soft); color: var(--a); }
.jsb-slot-btn.sel { background: var(--a); border-color: var(--a); color: #fff; }

.jsb-slots-spinner {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 24px 8px; font-size: 12px; color: var(--text3);
}
.jsb-spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--a);
    border-radius: 50%;
    animation: jsbSpin .7s linear infinite;
}

/* ── Success ── */
.jsb-success-wrap { text-align: center; padding: 20px 0; }
.jsb-success-icon { width: 76px; height: 76px; margin: 0 auto 22px; color: #22c55e; }
.jsb-check-ring {
    stroke-dasharray: 240; stroke-dashoffset: 240;
    animation: jsbDashRing .8s var(--ease) .15s forwards;
}
.jsb-check-tick {
    stroke-dasharray: 56; stroke-dashoffset: 56;
    animation: jsbDashTick .4s var(--ease) .7s forwards;
}
.jsb-meet-btn {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: 20px; padding: 13px 26px;
    background: #1a73e8; color: #fff;
    border-radius: var(--radius);
    font-family: inherit; font-size: 14px; font-weight: 600;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 3px 12px rgba(26,115,232,.3);
}
.jsb-meet-btn:hover { background: #1557b0; transform: translateY(-2px); }

/* ── Nav ── */
.jsb-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 36px;
    border-top: 1px solid var(--border);
}

.jsb-btn-prev, .jsb-btn-next {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 11px 22px;
    border-radius: var(--jsb-btn-radius, var(--radius));
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: all .25s var(--ease);
    border: none; outline: none; line-height: 1;
}

.jsb-btn-prev {
    background: transparent; color: var(--text2); padding-left: 8px;
}
.jsb-btn-prev:hover { color: var(--text); transform: translateX(-3px); }

.jsb-btn-next {
    background: var(--a); color: #fff;
    box-shadow: 0 3px 12px var(--a-glow);
}
.jsb-btn-next:hover { transform: translateY(-1px); box-shadow: 0 5px 18px var(--a-glow); }
.jsb-btn-next:active { transform: translateY(0); }
.jsb-btn-next.loading { pointer-events: none; opacity: .75; }
.jsb-btn-next.loading svg { display: none; }
.jsb-btn-next.loading::after {
    content: '';
    width: 15px; height: 15px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: jsbSpin .6s linear infinite;
    margin-left: 6px;
    display: inline-block;
}

.jsb-step-dots { display: flex; gap: 6px; align-items: center; }
.jsb-step-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--border); transition: all .3s;
}
.jsb-step-dot.active { background: var(--a); transform: scale(1.35); }
.jsb-step-dot.done { background: var(--a); opacity: .4; }

.jsb-keyboard-hint {
    text-align: center; padding: 6px 0 14px;
    font-size: 11px; color: var(--text3);
}
.jsb-keyboard-hint kbd {
    padding: 2px 7px; border-radius: 4px;
    background: var(--bg2); border: 1px solid var(--border);
    font-family: 'Space Mono', monospace; font-size: 10px; margin: 0 2px;
}

/* ── Stagger animations ── */
.jsb-step.active .jsb-opt-card { animation: jsbSlideIn .38s var(--ease) both; }
.jsb-step.active .jsb-opt-card:nth-child(1) { animation-delay: .08s; }
.jsb-step.active .jsb-opt-card:nth-child(2) { animation-delay: .13s; }
.jsb-step.active .jsb-opt-card:nth-child(3) { animation-delay: .18s; }
.jsb-step.active .jsb-opt-card:nth-child(4) { animation-delay: .23s; }
.jsb-step.active .jsb-opt-card:nth-child(5) { animation-delay: .28s; }
.jsb-step.active .jsb-opt-card:nth-child(6) { animation-delay: .33s; }
.jsb-slot-btn:nth-child(1) { animation-delay: .04s; }
.jsb-slot-btn:nth-child(2) { animation-delay: .08s; }
.jsb-slot-btn:nth-child(3) { animation-delay: .12s; }
.jsb-slot-btn:nth-child(4) { animation-delay: .16s; }
.jsb-slot-btn:nth-child(5) { animation-delay: .20s; }
.jsb-slot-btn:nth-child(6) { animation-delay: .24s; }

/* ════════════════════════════════════
   CALENDLY TEMPLATE
   ════════════════════════════════════ */

.jsb-booking.jsb-tpl-calendly {
    display: flex;
    flex-direction: row;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
    min-height: 560px;
    overflow: hidden;
}

/* Sidebar */
.jsb-tpl-calendly .jsb-sidebar {
    display: flex;
    flex-direction: column;
    width: 280px;
    flex-shrink: 0;
    padding: 36px 28px;
    background: #2c2c3e;
    color: #f0eef8;
}

.jsb-tpl-calendly.jsb-mode-dark .jsb-sidebar {
    background: #0a0a14;
    border-right: 1px solid rgba(255,255,255,.06);
}

.jsb-sidebar-avatar {
    width: 72px; height: 72px;
    border-radius: 50%; overflow: hidden;
    border: 3px solid rgba(255,255,255,.15);
    margin-bottom: 16px;
}
.jsb-sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.jsb-sidebar-name {
    font-size: 18px; font-weight: 700;
    color: #f0eef8; margin: 0 0 12px; line-height: 1.3;
}

.jsb-sidebar-meta { display: flex; flex-direction: column; gap: 9px; }
.jsb-meta-item {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; color: rgba(240,238,248,.7);
}

.jsb-sidebar-steps {
    margin-top: 28px;
    display: flex; flex-direction: column; gap: 6px;
}
.jsb-sidebar-step {
    display: flex; align-items: center; gap: 10px;
    font-size: 12px; color: rgba(240,238,248,.4);
    padding: 4px 0; transition: color .3s;
}
.jsb-sidebar-step.active { color: #f0eef8; }
.jsb-sidebar-step.done   { color: rgba(240,238,248,.6); }
.jsb-sidebar-step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    flex-shrink: 0; transition: all .3s;
}
.jsb-sidebar-step.active .jsb-sidebar-step-dot { background: currentColor; }
.jsb-sidebar-step.done   .jsb-sidebar-step-dot { background: currentColor; opacity: .5; }

/* Calendly form area */
.jsb-tpl-calendly .jsb-form-body {
    flex: 1; display: flex; flex-direction: column;
    background: var(--bg);
    overflow: hidden;
}

.jsb-tpl-calendly .jsb-nav { padding: 14px 28px; }

/* ── Responsive ── */
@media (max-width: 680px) {
    .jsb-step { padding: 32px 22px 20px; }

    .jsb-booking.jsb-tpl-calendly { flex-direction: column; }
    .jsb-tpl-calendly .jsb-sidebar {
        width: 100%; flex-direction: row;
        align-items: center; gap: 16px; padding: 18px 20px;
    }
    .jsb-sidebar-avatar { width: 48px; height: 48px; margin-bottom: 0; flex-shrink: 0; }
    .jsb-sidebar-meta { flex-direction: row; flex-wrap: wrap; gap: 10px; }
    .jsb-sidebar-steps { display: none; }

    .jsb-cal-wrap { flex-direction: column; gap: 14px; }
    .jsb-slots-panel { width: 100%; flex-direction: row; flex-wrap: wrap; max-height: none; }
    .jsb-slot-btn { flex: 1; min-width: 80px; }
    .jsb-contact-row { flex-direction: column; }
    .jsb-nav { padding: 12px 18px; }
    .jsb-keyboard-hint { display: none; }
}

/* ════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════ */
@keyframes jsbSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes jsbSpin { to { transform: rotate(360deg); } }
@keyframes jsbShake {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-6px); }
    40%     { transform: translateX(6px); }
    60%     { transform: translateX(-4px); }
    80%     { transform: translateX(4px); }
}
@keyframes jsbDashRing { to { stroke-dashoffset: 0; } }
@keyframes jsbDashTick { to { stroke-dashoffset: 0; } }

/* ── Success actions ── */
.jsb-success-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.jsb-cal-buttons { text-align: center; }
.jsb-cal-buttons-label {
    font-size: 12px;
    color: var(--text3);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}

.jsb-cal-buttons-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.jsb-cal-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: calc(var(--radius) - 2px);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    border: 1.5px solid var(--border);
    background: var(--bg2);
    color: var(--text);
}
.jsb-cal-btn:hover {
    border-color: var(--a);
    background: var(--a-soft);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════
   [jsb_thankyou] — Página de agradecimiento
   ═══════════════════════════════════════════════ */

.jsb-ty-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 56px 40px 48px;
    text-align: center;
    border-radius: var(--radius, 14px);
    background: var(--bg, #fff);
    border: 1px solid var(--border, #ede8f8);
    box-shadow: 0 6px 32px var(--a-glow, rgba(108,60,225,.12));
    font-family: var(--jsb-font, 'DM Sans', sans-serif);
}

/* Checkmark animado */
.jsb-ty-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 28px;
    color: #22c55e;
}

.jsb-ty-ring {
    stroke-dasharray: 264;
    stroke-dashoffset: 264;
    animation: jsbDashRing 0.85s cubic-bezier(.22,1,.36,1) 0.1s forwards;
}

.jsb-ty-tick {
    stroke-dasharray: 70;
    stroke-dashoffset: 70;
    animation: jsbDashTick 0.45s cubic-bezier(.22,1,.36,1) 0.75s forwards;
}

.jsb-ty-title {
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 700;
    color: var(--text, #1a1a2e);
    margin: 0 0 10px;
    letter-spacing: -.5px;
    animation: jsbSlideIn .5s cubic-bezier(.22,1,.36,1) .3s both;
}

.jsb-ty-msg {
    font-size: 15px;
    color: var(--text2, #6b7280);
    line-height: 1.6;
    margin: 0 0 36px;
    animation: jsbSlideIn .5s cubic-bezier(.22,1,.36,1) .4s both;
}

/* Countdown ring */
.jsb-ty-countdown {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 14px;
    animation: jsbSlideIn .5s cubic-bezier(.22,1,.36,1) .5s both;
}

.jsb-ty-ring-svg {
    width: 100%;
    height: 100%;
    color: var(--a, #6C3CE1);
}

.jsb-ty-progress-ring {
    transition: stroke-dashoffset 1s linear;
}

.jsb-ty-secs {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--a, #6C3CE1);
}

.jsb-ty-redirect-label {
    font-size: 13px;
    color: var(--text2, #6b7280);
    margin: 0 0 28px;
    animation: jsbSlideIn .5s cubic-bezier(.22,1,.36,1) .55s both;
}

/* Botones */
.jsb-ty-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    animation: jsbSlideIn .5s cubic-bezier(.22,1,.36,1) .6s both;
}

.jsb-ty-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 22px;
    border-radius: var(--radius, 14px);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    text-decoration: none;
    border: none;
}

.jsb-ty-btn-home {
    background: var(--a, #6C3CE1);
    color: #fff;
    box-shadow: 0 4px 14px var(--a-glow, rgba(108,60,225,.3));
}
.jsb-ty-btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--a-glow, rgba(108,60,225,.35));
    color: #fff;
    text-decoration: none;
}

.jsb-ty-btn-pause {
    background: var(--bg2, #f9f8fc);
    color: var(--text, #1a1a2e);
    border: 1.5px solid var(--border, #ede8f8);
}
.jsb-ty-btn-pause:hover {
    background: var(--a-soft, rgba(108,60,225,.08));
    border-color: var(--a, #6C3CE1);
    color: var(--a, #6C3CE1);
}

/* Dark mode override for thank you page */
.jsb-mode-dark.jsb-ty-wrap {
    --bg:     #0f0f1a;
    --bg2:    #161625;
    --border: rgba(255,255,255,.07);
    --text:   #f0eef8;
    --text2:  rgba(240,238,248,.6);
}

/* ── Redirect countdown bar (on success screen inside form) ── */
.jsb-success-redirect-bar {
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--a-soft, rgba(108,60,225,.08));
    border: 1px solid var(--a-soft, rgba(108,60,225,.15));
    animation: jsbSlideIn .4s cubic-bezier(.22,1,.36,1) both;
}

.jsb-redirect-label {
    display: block;
    font-size: 13px;
    color: var(--text2, #6b7280);
    margin-bottom: 8px;
}

.jsb-redirect-label strong {
    color: var(--a, #6C3CE1);
    font-family: 'Space Mono', monospace;
}

.jsb-redirect-track {
    height: 4px;
    background: var(--border, #ede8f8);
    border-radius: 4px;
    overflow: hidden;
}

.jsb-redirect-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--a, #6C3CE1), #a78bfa);
    border-radius: 4px;
    transition: width 1s linear;
}

/* ════════════════════════════════════
   CLASSIC TEMPLATE (formulario tradicional de un envío)
   ════════════════════════════════════ */
.jsb-booking.jsb-tpl-classic {
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
.jsb-tpl-classic .jsb-sidebar,
.jsb-tpl-classic .jsb-progress,
.jsb-tpl-classic .jsb-step-dots,
.jsb-tpl-classic .jsb-btn-prev,
.jsb-tpl-classic .jsb-keyboard-hint { display: none !important; }

.jsb-tpl-classic .jsb-form-body { width: 100%; }
.jsb-tpl-classic .jsb-step { padding: 28px 30px 8px; animation: none; }
.jsb-tpl-classic .jsb-step.active { display: block; }
.jsb-tpl-classic .jsb-classic-inner { display: flex; flex-direction: column; gap: 15px; }
.jsb-tpl-classic .jsb-classic-field label,
.jsb-tpl-classic .jsb-contact-field label {
    display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px;
}
.jsb-tpl-classic select.jsb-text-input { appearance: none; cursor: pointer; }
.jsb-tpl-classic .jsb-nav {
    padding: 6px 30px 26px; border-top: none; display: flex;
}
.jsb-tpl-classic .jsb-btn-next {
    width: 100%; justify-content: center; font-size: 15px; padding: 15px 24px;
}
.jsb-tpl-classic .jsb-step-success { padding: 40px 30px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Comprobador: ficha de resultado (2.28.0)
   Solo se pinta cuando la plantilla trae el bloque `resultado`; el resto de
   formularios siguen viendo la pantalla de gracias de siempre.
   ═════════════════════════════════════════════════════════════════════════ */
.jsb-res { text-align: center; max-width: 560px; margin: 0 auto; padding: 6px 0 4px; }
.jsb-res-kicker {
    display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px;
    text-transform: uppercase; color: var(--a); background: var(--a-soft);
    border-radius: 20px; padding: 6px 14px; margin-bottom: 16px;
}
.jsb-res-title { font-size: 27px; font-weight: 700; color: var(--text); line-height: 1.2; margin: 0 0 10px; }
.jsb-res-sub { font-size: 15px; line-height: 1.65; color: var(--text2); margin: 0 0 22px; }

/* la escala: un segmento por nivel y una aguja donde ha caido la puntuacion */
.jsb-res-escala { margin: 4px 0 22px; }
.jsb-res-track { position: relative; display: flex; gap: 6px; padding-top: 16px; }
.jsb-res-seg {
    flex: 1; height: 8px; border-radius: 6px; background: var(--bg3); position: relative;
    transition: background .5s var(--ease);
}
.jsb-res-seg.on { background: var(--a); }
.jsb-res-seg i {
    position: absolute; top: 14px; left: 0; right: 0; font-style: normal;
    font-size: 10.5px; line-height: 1.25; color: var(--text3); text-align: center;
}
.jsb-res-seg.on i { color: var(--a); font-weight: 700; }
.jsb-res-aguja {
    position: absolute; top: 0; width: 2px; height: 20px; background: var(--text);
    border-radius: 2px; transform: translateX(-1px);
}
.jsb-res-aguja:after {
    content: ""; position: absolute; top: -5px; left: -3px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--text);
}
.jsb-res-lista { list-style: none; padding: 0; margin: 26px 0 0; text-align: left; display: grid; gap: 9px; }
.jsb-res-lista li {
    position: relative; padding-left: 26px; font-size: 14px; line-height: 1.55; color: var(--text2);
}
.jsb-res-lista li:before {
    content: ""; position: absolute; left: 2px; top: 5px; width: 13px; height: 13px;
    border-radius: 50%; background: var(--a-soft); border: 1px solid var(--a);
}
.jsb-res-lista li:after {
    content: ""; position: absolute; left: 6px; top: 8px; width: 4px; height: 7px;
    border: solid var(--a); border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.jsb-res-acciones { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }
.jsb-res-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 26px; border-radius: var(--radius); text-decoration: none;
    font-size: 14.5px; font-weight: 600; border: 1px solid var(--border); color: var(--text);
    background: var(--bg2); transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.jsb-res-btn.primario { background: var(--a); border-color: var(--a); color: #fff; }
.jsb-res-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px var(--a-glow); }
.jsb-res-pie { font-size: 12px; line-height: 1.55; color: var(--text3); margin: 20px 0 0; }
@media (max-width: 600px) {
    .jsb-res-title { font-size: 22px; }
    .jsb-res-seg i { font-size: 9.5px; }
    .jsb-res-acciones { flex-direction: column; align-items: stretch; }
}
