/* STUDIO FINDER — GUIDA INTERATTIVA V1 */
:root {
    --sf-tour-blue: #056384;
    --sf-tour-blue-dark: #056384;
    --sf-tour-ink: #000000;
    --sf-tour-muted: #64748b;
    --sf-tour-border: #dbe3ef;
    --sf-tour-z: 2147483000;
}

html.sf-guided-tour-active,
html.sf-guided-tour-active body {
    overflow: hidden !important;
}

.sf-guided-tour-root {
    position: fixed;
    inset: 0;
    z-index: var(--sf-tour-z);
    pointer-events: auto;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sf-guided-tour-root[hidden] {
    display: none !important;
}

/*
 * Completion Guide: mantiene identica la grafica della guida esistente ma
 * lascia interagire con il campo evidenziato del profilo sotto l'overlay.
 */
.sf-guided-tour-root.is-completion-guide {
    pointer-events: none;
}

.sf-guided-tour-root.is-completion-guide .sf-guided-tour-card {
    pointer-events: auto;
}

.sf-guided-tour-spotlight {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border: 2px solid rgba(1, 171, 175, .98);
    border-radius: 18px;
    background: transparent;
    box-shadow:
        0 0 0 7px rgba(1, 171, 175, .16),
        0 0 38px rgba(1, 171, 175, .48),
        0 0 0 9999px rgba(2, 6, 23, .74);
    transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease, border-radius .2s ease;
    pointer-events: none;
}

.sf-guided-tour-spotlight.is-centered {
    left: 50%;
    top: 50%;
    width: 2px;
    height: 2px;
    border-color: transparent;
    box-shadow: 0 0 0 9999px rgba(2, 6, 23, .74);
}

.sf-guided-tour-card {
    position: fixed;
    width: min(430px, calc(100vw - 32px));
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 22px;
    background: #fff;
    color: var(--sf-tour-ink);
    box-shadow: 0 28px 90px rgba(2, 6, 23, .4);
    pointer-events: auto;
    outline: none;
    transform-origin: center;
    animation: sfTourCardIn .2s ease both;
}

@keyframes sfTourCardIn {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.sf-guided-tour-card::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
    border: solid var(--sf-tour-border);
    border-width: 1px 0 0 1px;
}

.sf-guided-tour-card[data-arrow="top"]::after {
    top: -8px;
    left: var(--sf-tour-arrow-x, 50%);
    margin-left: -7px;
}

.sf-guided-tour-card[data-arrow="bottom"]::after {
    bottom: -8px;
    left: var(--sf-tour-arrow-x, 50%);
    margin-left: -7px;
    transform: rotate(225deg);
}

.sf-guided-tour-card[data-arrow="left"]::after {
    left: -8px;
    top: var(--sf-tour-arrow-y, 50%);
    margin-top: -7px;
    transform: rotate(-45deg);
}

.sf-guided-tour-card[data-arrow="right"]::after {
    right: -8px;
    top: var(--sf-tour-arrow-y, 50%);
    margin-top: -7px;
    transform: rotate(135deg);
}

.sf-guided-tour-card[data-arrow="none"]::after {
    display: none;
}

.sf-guided-tour-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.sf-guided-tour-progress {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: var(--sf-tour-blue-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .03em;
}

.sf-guided-tour-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.sf-guided-tour-close:hover,
.sf-guided-tour-close:focus-visible {
    background: #e2e8f0;
    color: #0f172a;
}

.sf-guided-tour-card h2 {
    margin: 0 0 10px;
    color: var(--sf-tour-ink);
    font-size: clamp(22px, 3vw, 27px);
    line-height: 1.15;
    letter-spacing: -.025em;
}

.sf-guided-tour-copy {
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.62;
}

.sf-guided-tour-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 20px 0 16px;
}

.sf-guided-tour-dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
    padding: 0;
}

.sf-guided-tour-dot.is-active {
    width: 24px;
    background: var(--sf-tour-blue);
}

.sf-guided-tour-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.sf-guided-tour-button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.sf-guided-tour-button.is-primary {
    background: var(--sf-tour-blue);
    color: #fff;
    box-shadow: none;
}

.sf-guided-tour-button.is-primary:hover,
.sf-guided-tour-button.is-primary:focus-visible {
    background: var(--sf-tour-blue-dark);
}

.sf-guided-tour-button.is-secondary {
    border-color: #cbd5e1;
    background: #fff;
    color: #334155;
}

.sf-guided-tour-button.is-ghost {
    margin-right: auto;
    background: transparent;
    color: var(--sf-tour-blue-dark);
}

.sf-guided-tour-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.sf-guided-tour-launcher-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--sf-tour-z) + 20);
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 6, 23, .72);
    pointer-events: auto;
}

.sf-guided-tour-launcher-overlay[hidden] {
    display: none !important;
}

.sf-guided-tour-launcher-panel {
    width: min(720px, 100%);
    max-height: min(86vh, 780px);
    overflow: auto;
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 100px rgba(2, 6, 23, .45);
    color: #0f172a;
    pointer-events: auto;
}

.sf-guided-tour-launcher-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.sf-guided-tour-launcher-head h2 {
    margin: 0 0 6px;
    font-size: 26px;
    letter-spacing: -.025em;
}

.sf-guided-tour-launcher-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.sf-guided-tour-launcher-list {
    display: grid;
    gap: 12px;
    padding: 20px 24px 26px;
}

.sf-guided-tour-launcher-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
}

.sf-guided-tour-launcher-item h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.sf-guided-tour-launcher-item p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.sf-guided-tour-launcher-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.sf-guided-tour-status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sf-guided-tour-status.is-completed {
    background: rgba(58,157,98,.12);
    color: #000000;
}

.sf-guided-tour-status.is-started {
    background: rgba(1,171,175,.12);
    color: #000000;
}

.sf-guided-tour-status.is-skipped {
    background: rgba(231,166,58,.16);
    color: #000000;
}

.sf-guided-tour-launch-button {
    min-width: 118px;
    min-height: 42px;
    padding: 9px 14px;
    border: 0;
    border-radius: 12px;
    background: #056384;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.sf-guided-tour-launch-button:hover,
.sf-guided-tour-launch-button:focus-visible {
    background: #056384;
}

.sf-guided-tour-menu-button {
    width: 100%;
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sf-artist-sidebar .sf-guided-tour-menu-button,
.sf-studio-sidebar .sf-guided-tour-menu-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255,255,255,.82);
    font-weight: 800;
}

.sf-artist-sidebar .sf-guided-tour-menu-button:hover,
.sf-studio-sidebar .sf-guided-tour-menu-button:hover {
    background: rgba(5, 99, 132, .22);
    color: #fff;
}

.sf-studio-pwa-sheet-link.sf-guided-tour-menu-button {
    display: flex;
}

@media (max-width: 760px) {
    .sf-guided-tour-card {
        left: 12px !important;
        right: 12px !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        top: auto !important;
        width: auto;
        max-height: min(72vh, 640px);
        overflow: auto;
        padding: 20px;
        border-radius: 22px;
    }

    .sf-guided-tour-card::after {
        display: none;
    }

    .sf-guided-tour-actions {
        flex-wrap: wrap;
    }

    .sf-guided-tour-button.is-ghost {
        order: 3;
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .sf-guided-tour-button.is-secondary,
    .sf-guided-tour-button.is-primary {
        flex: 1 1 120px;
    }

    .sf-guided-tour-launcher-overlay {
        align-items: end;
        padding: 0;
    }

    .sf-guided-tour-launcher-panel {
        width: 100%;
        max-height: 92vh;
        border-radius: 24px 24px 0 0;
    }

    .sf-guided-tour-launcher-item {
        grid-template-columns: 1fr;
    }

    .sf-guided-tour-launch-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-guided-tour-card,
    .sf-guided-tour-spotlight {
        animation: none;
        transition: none;
    }
}
