/* ═══════════════════════════════════════
   STUDIO MATERIAL VIEWER
   Interfata finala pentru user
   ═══════════════════════════════════════ */

body.sv-active {
    background: #ffffff;
    margin: 0;
    padding: 0 !important;
    overflow-x: hidden;
}

body.sv-active #wpadminbar,
body.sv-active > header,
body.sv-active > footer,
body.sv-active .site-header,
body.sv-active .site-footer {
    display: none !important;
}

/* Neutralizam padding-urile si margin-urile de la tema WordPress (Elementor sau alt page builder)
   ca sa nu adauge spatiu suplimentar peste layout-ul nostru de viewer.
   Fara asta, containerul "maxima" pare sa depaseasca ecranul (20px scroll din Elementor). */
body.sv-active .elementor,
body.sv-active .elementor-element,
body.sv-active .elementor-widget,
body.sv-active .elementor-widget-container,
body.sv-active .e-con,
body.sv-active .e-con-full,
body.sv-active .e-parent,
body.sv-active .entry-content,
body.sv-active main,
body.sv-active #main,
body.sv-active #primary,
body.sv-active #content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

#studio-viewer-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111827;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── NOTICE ─── */
.sv-notice {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: #fef3c7;
    border-radius: 10px;
    color: #92400e;
    text-align: center;
}

.sv-notice-error {
    background: #fee2e2;
    color: #991b1b;
}

/* ─── TOPBAR ─── */
.sv-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #e5e7eb;
}

.sv-topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sv-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sv-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.sv-icon svg {
    width: 20px;
    height: 20px;
}

.sv-title {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50vw;
}

/* ─── PAGES DROPDOWN ─── */
.sv-pages-dd {
    position: relative;
}

.sv-pages-dd-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: background 0.15s;
    font-family: inherit;
}

.sv-pages-dd-trigger:hover {
    background: #f3f4f6;
}

.sv-pages-dd-chev {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.sv-pages-dd.is-open .sv-pages-dd-chev {
    transform: rotate(180deg);
}

.sv-pages-dd-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: none;
    z-index: 200;
}

.sv-pages-dd.is-open .sv-pages-dd-menu {
    display: block;
}

.sv-pages-dd-header {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f3f4f6;
}

.sv-pages-dd-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.sv-pages-dd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    font-family: inherit;
    margin-bottom: 2px;
    color: #374151;
}

.sv-pages-dd-item:hover {
    background: #f9fafb;
}

.sv-pages-dd-item.is-active {
    background: #eff6ff;
    color: #2563eb;
}

.sv-pages-dd-item-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.sv-pages-dd-item.is-active .sv-pages-dd-item-num {
    background: #dbeafe;
    color: #2563eb;
}

.sv-pages-dd-item.is-completed .sv-pages-dd-item-num {
    background: #dcfce7;
    color: #16a34a;
}

.sv-pages-dd-item-num svg {
    width: 16px;
    height: 16px;
}

.sv-pages-dd-item-text {
    flex: 1;
    min-width: 0;
}

.sv-pages-dd-item-title {
    font-size: 14px;
    font-weight: 500;
    color: inherit;
}

/* ─── MAIN ─── */
.sv-main {
    padding: 80px 0 96px;
    min-height: 100vh;
}

.sv-main-inner {
    margin: 0 auto;
    padding: 32px 0;
}

/* Containerele normale au 1088px latime exterioara, astfel incat zona interioara
   (lista de blocuri) sa fie fix 1000px — identica cu editorul.
   Calcul: 1000px continut + 88px padding intern (40+48) = 1088px.
   In editor containerul este 1091px pentru ca mai are si 3px de border decorativ. */
.sv-main-inner .studio-container-width-normal {
    margin-left: auto;
    margin-right: auto;
    max-width: 1088px;
}

/* Containerele cu latime maxima: folosim o tehnica speciala ca sa iesim
   din orice limita impusa de tema WordPress pe elementul parinte.
   100vw = toata latimea ecranului. Apoi cu left:50% si margin negativ
   ne pozitionam exact de la marginea stanga a ecranului. */
.sv-main-inner .studio-container-width-maxima {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 0 !important;
}

/* ── Cand containerul e la latime maxima, fundalul se intinde la toata latimea
       ecranului, DAR lista de blocuri ramane la 1000px, centrata
       (la fel ca in editor) ── */
.sv-main-inner .studio-container-width-maxima .studio-block-list {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Containerul de inaltime "maxima" in pagina user = umple ECRANUL userului intre
   topbar si footer, fara scroll bar. Formula:
   100vh - (80 topbar + 96 footer + 32 sus sv-main-inner + 32 jos sv-main-inner) = 100vh - 240px */
.sv-main-inner .studio-container-height-maxima {
    min-height: calc(100vh - 240px);
}



/* Spatiere intre containere in interfata utilizatorului */
.sv-container-wrap {
    margin-bottom: 24px;
}

.sv-container-wrap:last-child {
    margin-bottom: 0;
}

/* Blocurile din material-view primesc acelasi padding ca in editor
   (.se-block-wrap), ca sa avem aceeasi spatiere vizuala intre blocuri.
   Astfel ce vede user-ul in material-view arata identic cu editorul. */
.studio-view-block {
    padding: 10px 16px;
}
.sv-container-wrap:last-child {
    margin-bottom: 0;
}



/* ─── COMPLETE BUTTON ─── */
.sv-complete {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #f3f4f6;
}

.sv-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f9fafb;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
    font-family: inherit;
}

.sv-complete-btn:hover {
    background: #f3f4f6;
}

.sv-complete-btn.is-done {
    cursor: default;
}

.sv-complete-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s;
}

.sv-complete-btn:hover .sv-complete-check {
    border-color: #10b981;
    color: #10b981;
}

.sv-complete-btn.is-done .sv-complete-check {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.sv-complete-check svg {
    width: 14px;
    height: 14px;
}

.sv-complete-btn.is-done .sv-complete-text {
    color: #16a34a;
    font-weight: 600;
}

/* ─── FOOTER ─── */
.sv-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #e5e7eb;
}

.sv-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sv-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.sv-footer-btn:hover:not(:disabled) {
    background: #f3f4f6;
    color: #111827;
}

.sv-footer-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sv-footer-btn.is-primary {
    background: #2563eb;
    color: white;
}

.sv-footer-btn.is-primary:hover:not(:disabled) {
    background: #1d4ed8;
    color: white;
}

.sv-footer-btn svg {
    width: 18px;
    height: 18px;
}

.sv-footer-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sv-footer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s;
}

.sv-footer-dot:hover {
    background: #9ca3af;
    transform: scale(1.3);
}

.sv-footer-dot.is-active {
    background: #2563eb;
    width: 32px;
    border-radius: 4px;
}

.sv-footer-dot.is-completed {
    background: #10b981;
}

/* ─── FINISH MODAL ─── */
.sv-finish-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: svFadeIn 0.25s ease-out;
}

.sv-finish-modal.is-open {
    display: flex;
}

@keyframes svFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.sv-finish-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.sv-finish-content {
    position: relative;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 48px 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 440px;
    width: 90vw;
    box-shadow: 0 30px 60px rgba(37, 99, 235, 0.4);
    animation: svScaleUp 0.3s ease-out;
}

@keyframes svScaleUp {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

.sv-finish-emoji {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
}

.sv-finish-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
}

.sv-finish-sub {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 28px 0;
}

.sv-finish-btn {
    background: white;
    color: #2563eb;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s;
    font-family: inherit;
}

.sv-finish-btn:hover {
    transform: translateY(-2px);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
    .sv-title {
        max-width: 40vw;
        font-size: 15px;
    }
    .sv-icon {
        width: 32px;
        height: 32px;
    }
    .sv-main-inner {
        padding: 24px 16px;
    }
    .sv-footer-btn span {
        display: none;
    }
    .sv-pages-dd-menu {
        width: 280px;
        max-width: calc(100vw - 32px);
    }
    /* Pe mobil blocurile au margini laterale mai mici (12px in loc de 16px) */
    .studio-view-block {
        padding: 10px 12px;
    }
}

/* ═══════════════════════════════════════
   MOBILE PILL — interfata mobil/tableta
   ═══════════════════════════════════════ */

:root {
    --svp-bk: #141414;
    --svp-bks: #1e1e1e;
    --svp-bk3: #2a2a2a;
    --svp-bk4: #353535;
    --svp-gr: #22c55e;
    --svp-grd: #16a34a;
    --svp-grl: #dcfce7;
    --svp-wh: #ffffff;
    --svp-cream: #F9F8F4;
    --svp-g100: #f3f4f6;
    --svp-g200: #e5e7eb;
    --svp-g400: #9ca3af;
    --svp-g600: #4b5563;
    --svp-rd: #ef4444;
    --svp-blu: #3b82f6;
    --svp-blud: #2563eb;
    --svp-blug: rgba(59,130,246,.25);
    --svp-R: 10px;
    --svp-RL: 16px;
    --svp-RP: 999px;
}

/* Pill dock - ascuns implicit */
.sv-pill-dock {
    display: none;
}

.sv-pill-backdrop {
    position: fixed;
    inset: 0;
    z-index: 998;
    display: none;
}

.sv-pill-backdrop.is-open {
    display: block;
}

.sv-pill-dock {
    position: fixed;
    bottom: 14px;
    left: 0;
    right: 0;
    justify-content: center;
    z-index: 999;
    pointer-events: none;
    padding: 0 24px;
    transition: justify-content 0.3s;
}

.sv-pill-dock.is-corner {
    justify-content: flex-end;
}

.sv-pill-dock-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    transition: all 0.35s ease;
}

/* ── Pill button ── */
.sv-pill-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px 10px 10px;
    border-radius: var(--svp-RP);
    cursor: pointer;
    user-select: none;
    transition: all 0.35s ease;
    -webkit-tap-highlight-color: transparent;
}

.sv-pill-btn:active {
    transform: scale(0.96);
}

.sv-pill-btn.is-light {
    background: var(--svp-cream);
    box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.03);
}

.sv-pill-btn.is-dark {
    background: var(--svp-bk);
    box-shadow: 0 4px 24px rgba(0,0,0,.25);
}

.sv-pill-normal {
    display: flex;
    align-items: center;
    gap: 9px;
}

.sv-pill-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sv-pill-timer svg {
    width: 14px;
    height: 14px;
}

.sv-pill-btn.is-light .sv-pill-timer { color: var(--svp-g400); }
.sv-pill-btn.is-dark .sv-pill-timer { color: var(--svp-g400); }

.sv-pill-sep {
    width: 1px;
    height: 18px;
    flex-shrink: 0;
}

.sv-pill-btn.is-light .sv-pill-sep { background: var(--svp-g200); }
.sv-pill-btn.is-dark .sv-pill-sep { background: var(--svp-bk4); }

.sv-pill-ring {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.sv-pill-ring svg {
    transform: rotate(-90deg);
    display: block;
}

.sv-pill-ring circle {
    fill: none;
    stroke-width: 2.5;
}

.sv-pill-ring-track { stroke: var(--svp-g200); }
.sv-pill-ring-fill { stroke: var(--svp-bk); transition: stroke-dashoffset 0.3s; }

.sv-pill-btn.is-dark .sv-pill-ring-track { stroke: var(--svp-bk3); }
.sv-pill-btn.is-dark .sv-pill-ring-fill { stroke: var(--svp-gr); }

.sv-pill-pct {
    font-size: 14.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
}

.sv-pill-btn.is-light .sv-pill-pct { color: var(--svp-bk); }
.sv-pill-btn.is-dark .sv-pill-pct { color: var(--svp-wh); }

.sv-pill-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.25s;
    flex-shrink: 0;
    margin-left: 2px;
}

.sv-pill-btn.is-light .sv-pill-chevron { color: var(--svp-g400); }
.sv-pill-btn.is-dark .sv-pill-chevron { color: var(--svp-g400); }

.sv-pill-btn.is-open .sv-pill-chevron {
    transform: rotate(180deg);
}

/* ── Finish button ── */
.sv-pill-finish {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: var(--svp-blu);
    padding: 10px 18px 10px 14px;
    border-radius: var(--svp-RP);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
    box-shadow: 0 4px 16px var(--svp-blug);
    border: none;
    font-family: inherit;
}

.sv-pill-finish:hover {
    background: var(--svp-blud);
}

.sv-pill-finish:active {
    transform: scale(0.96);
}

.sv-pill-finish svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sv-pill-btn.is-finish {
    padding: 6px 7px 6px 10px !important;
}

.sv-pill-btn.is-finish .sv-pill-normal .sv-pill-ring,
.sv-pill-btn.is-finish .sv-pill-normal .sv-pill-pct,
.sv-pill-btn.is-finish .sv-pill-normal .sv-pill-chevron {
    display: none;
}

.sv-pill-btn.is-finish .sv-pill-finish {
    display: flex !important;
}

/* ── Mod discret ── */
.sv-pill-ring-only {
    display: none;
    align-items: center;
    justify-content: center;
}

.sv-pill-ring-only .sv-pill-ring {
    width: 30px;
    height: 30px;
}

.sv-pill-btn.is-discret {
    padding: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.sv-pill-btn.is-discret .sv-pill-normal { display: none; }
.sv-pill-btn.is-discret .sv-pill-chevron { display: none; }
.sv-pill-btn.is-discret .sv-pill-ring-only { display: flex; }

.sv-pill-btn.is-discret.is-finish {
    width: auto !important;
    height: auto !important;
    border-radius: var(--svp-RP) !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.sv-pill-btn.is-discret.is-finish .sv-pill-normal { display: none !important; }
.sv-pill-btn.is-discret.is-finish .sv-pill-ring-only { display: none !important; }
.sv-pill-btn.is-discret.is-finish .sv-pill-finish { padding: 10px 18px 10px 14px; }

/* ── Meniu popup ── */
.sv-pill-menu-wrap {
    position: absolute;
    bottom: 100%;
    margin-bottom: 10px;
    left: 50%;
    width: min(340px, calc(100vw - 40px));
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 1000;
}

.sv-pill-menu-wrap.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.sv-pill-dock.is-corner .sv-pill-menu-wrap {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(8px);
}

.sv-pill-dock.is-corner .sv-pill-menu-wrap.is-open {
    transform: translateX(0) translateY(0);
}

.sv-pill-menu {
    border-radius: var(--svp-RL);
    padding: 6px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: background 0.3s, box-shadow 0.3s;
}

.sv-pill-menu::-webkit-scrollbar { width: 0; }

.sv-pill-menu.is-light {
    background: var(--svp-cream);
    box-shadow: 0 12px 48px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.04);
}

.sv-pill-menu.is-dark {
    background: var(--svp-bk);
    box-shadow: 0 12px 48px rgba(0,0,0,.35);
}

.sv-pill-menu-hdr {
    padding: 14px 14px 12px;
}

.sv-pill-menu.is-light .sv-pill-menu-hdr { border-bottom: 1px solid rgba(0,0,0,.06); }
.sv-pill-menu.is-dark .sv-pill-menu-hdr { border-bottom: 1px solid var(--svp-bk3); }

.sv-pill-menu-hdr-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sv-pill-menu.is-light .sv-pill-menu-hdr-title { color: var(--svp-bk); }
.sv-pill-menu.is-dark .sv-pill-menu-hdr-title { color: var(--svp-wh); }

.sv-pill-menu-hdr-sub {
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

.sv-pill-menu.is-light .sv-pill-menu-hdr-sub { color: var(--svp-g400); }
.sv-pill-menu.is-dark .sv-pill-menu-hdr-sub { color: rgba(255,255,255,.35); }

.sv-pill-menu-prog {
    padding: 12px 14px 4px;
}

.sv-pill-menu-prog-track {
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.sv-pill-menu.is-light .sv-pill-menu-prog-track { background: rgba(0,0,0,.05); }
.sv-pill-menu.is-dark .sv-pill-menu-prog-track { background: var(--svp-bk3); }

.sv-pill-menu-prog-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--svp-gr);
    transition: width 0.3s;
    width: 0%;
}

.sv-pill-menu-stats {
    display: flex;
    gap: 6px;
    padding: 8px 10px 6px;
}

.sv-pill-menu-stat {
    flex: 1;
    padding: 12px 8px;
    border-radius: var(--svp-R);
    text-align: center;
}

.sv-pill-menu.is-light .sv-pill-menu-stat { background: rgba(0,0,0,.03); border: 1px solid rgba(0,0,0,.05); }
.sv-pill-menu.is-dark .sv-pill-menu-stat { background: var(--svp-bks); border: 1px solid var(--svp-bk3); }

.sv-pill-menu-stat-val {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.sv-pill-menu.is-light .sv-pill-menu-stat-val { color: var(--svp-bk); }
.sv-pill-menu.is-dark .sv-pill-menu-stat-val { color: var(--svp-wh); }

.sv-pill-menu-stat-lbl {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

.sv-pill-menu.is-light .sv-pill-menu-stat-lbl { color: var(--svp-g400); }
.sv-pill-menu.is-dark .sv-pill-menu-stat-lbl { color: rgba(255,255,255,.3); }

.sv-pill-menu-pages {
    padding: 8px 10px 4px;
}

.sv-pill-menu-pages-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sv-pill-menu.is-light .sv-pill-menu-pages-label { color: var(--svp-g400); }
.sv-pill-menu.is-dark .sv-pill-menu-pages-label { color: rgba(255,255,255,.25); }

.sv-pill-menu-pages-label span:last-child {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

.sv-pill-menu.is-light .sv-pill-menu-pages-label span:last-child { color: var(--svp-grd); }
.sv-pill-menu.is-dark .sv-pill-menu-pages-label span:last-child { color: var(--svp-gr); }

.sv-pill-menu-pages-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 4px 8px;
    -webkit-overflow-scrolling: touch;
}

.sv-pill-menu-pages-scroll::-webkit-scrollbar { height: 0; }

.sv-pill-page-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
    width: 56px;
    background: none;
    border: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

.sv-pill-page-num {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.sv-pill-menu.is-light .sv-pill-page-num { background: rgba(0,0,0,.05); color: var(--svp-g400); }
.sv-pill-menu.is-dark .sv-pill-page-num { background: var(--svp-bk3); color: var(--svp-g400); }

.sv-pill-page-num.is-done { color: var(--svp-wh); background: var(--svp-gr); }

.sv-pill-menu.is-light .sv-pill-page-num.is-cur { background: var(--svp-bk); color: var(--svp-wh); }
.sv-pill-menu.is-dark .sv-pill-page-num.is-cur { background: var(--svp-wh); color: var(--svp-bk); }

.sv-pill-page-name {
    font-size: 10.5px;
    line-height: 1.2;
    width: 56px;
    overflow: hidden;
    max-height: calc(10.5px * 1.2 * 2);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sv-pill-menu.is-light .sv-pill-page-name { color: var(--svp-g600); }
.sv-pill-menu.is-dark .sv-pill-page-name { color: rgba(255,255,255,.45); }

.sv-pill-page-chip.is-current .sv-pill-page-name { font-weight: 600; }
.sv-pill-menu.is-light .sv-pill-page-chip.is-current .sv-pill-page-name { color: var(--svp-bk); }
.sv-pill-menu.is-dark .sv-pill-page-chip.is-current .sv-pill-page-name { color: var(--svp-wh); }

.sv-pill-menu-div {
    height: 1px;
    margin: 4px 10px;
}

.sv-pill-menu.is-light .sv-pill-menu-div { background: rgba(0,0,0,.05); }
.sv-pill-menu.is-dark .sv-pill-menu-div { background: var(--svp-bk3); }

.sv-pill-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: var(--svp-R);
    cursor: pointer;
    transition: background 0.12s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.sv-pill-menu.is-light .sv-pill-menu-item:hover { background: rgba(0,0,0,.03); }
.sv-pill-menu.is-dark .sv-pill-menu-item:hover { background: var(--svp-bks); }

.sv-pill-menu-ic {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sv-pill-menu-ic svg {
    width: 17px;
    height: 17px;
}

.sv-pill-menu.is-light .sv-pill-menu-ic { background: rgba(0,0,0,.04); color: var(--svp-g600); }
.sv-pill-menu.is-dark .sv-pill-menu-ic { background: var(--svp-bk3); color: var(--svp-g400); }

.sv-pill-menu-lb {
    font-size: 15px;
    font-weight: 600;
}

.sv-pill-menu.is-light .sv-pill-menu-lb { color: var(--svp-bk); }
.sv-pill-menu.is-dark .sv-pill-menu-lb { color: var(--svp-wh); }

.sv-pill-menu-ds {
    font-size: 12.5px;
}

.sv-pill-menu.is-light .sv-pill-menu-ds { color: var(--svp-g400); }
.sv-pill-menu.is-dark .sv-pill-menu-ds { color: rgba(255,255,255,.3); }

.sv-pill-tog {
    width: 46px;
    height: 28px;
    border-radius: var(--svp-RP);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.sv-pill-menu.is-light .sv-pill-tog { background: var(--svp-g200); }
.sv-pill-menu.is-dark .sv-pill-tog { background: var(--svp-bk3); }

.sv-pill-tog.is-on { background: var(--svp-gr) !important; }

.sv-pill-tog-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--svp-wh);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform 0.2s;
}

.sv-pill-tog.is-on .sv-pill-tog-thumb {
    transform: translateX(18px);
}

.sv-pill-menu-theme {
    display: flex;
    gap: 4px;
    padding: 6px 10px 2px;
}

.sv-pill-theme-btn {
    flex: 1;
    padding: 11px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.sv-pill-menu.is-light .sv-pill-theme-btn { background: rgba(0,0,0,.03); color: var(--svp-g400); }
.sv-pill-menu.is-dark .sv-pill-theme-btn { background: var(--svp-bks); color: var(--svp-g400); }

.sv-pill-theme-btn.is-active { border-color: var(--svp-gr) !important; }
.sv-pill-menu.is-light .sv-pill-theme-btn.is-active { background: var(--svp-grl); color: var(--svp-grd); }
.sv-pill-menu.is-dark .sv-pill-theme-btn.is-active { background: rgba(34,197,94,.1); color: var(--svp-gr); }

.sv-pill-theme-dot {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.sv-pill-theme-dot.is-light { background: var(--svp-cream); border: 1.5px solid var(--svp-g200); }
.sv-pill-theme-dot.is-dark { background: var(--svp-bk); border: 1.5px solid var(--svp-bk4); }

.sv-pill-danger .sv-pill-menu-ic { color: var(--svp-rd); }
.sv-pill-menu.is-light .sv-pill-danger .sv-pill-menu-ic { background: #fee2e2; }
.sv-pill-menu.is-dark .sv-pill-danger .sv-pill-menu-ic { background: rgba(239,68,68,.12); }
.sv-pill-danger .sv-pill-menu-lb { color: var(--svp-rd) !important; }

/* Tema dark pentru body */
body.sv-active.sv-theme-dark {
    background: var(--svp-bk);
}

/* ── Media query: afiseaza pill pe mobil si tableta ── */
@media (max-width: 1024px) {
    .sv-topbar {
        display: none !important;
    }
    .sv-footer {
        display: none !important;
    }
    .sv-pill-dock {
        display: flex !important;
    }
    .sv-main {
        padding: 24px 0 110px !important;
    }
    .sv-main-inner {
        padding: 16px !important;
    }
    /* Pe mobil/tableta: topbar si footer sunt ascunse, in schimb avem pill dock.
       Formula: 100vh - (24 sv-main sus + 110 sv-main jos + 16 sv-main-inner sus + 16 jos) = 100vh - 166px */
    .sv-main-inner .studio-container-height-maxima {
        min-height: calc(100vh - 166px);
    }
    .sv-complete {
        margin-top: 32px;
        padding-top: 24px;
    }
}

/* === Functionalitatea 1: buton "mai departe" blocat pana trece timpul minim === */
.sv-footer-btn.sv-time-locked,
.sv-pill-finish.sv-time-locked {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
