/* Meu Palcco v220 — Tour Guiado de Onboarding responsivo. */
.guided-onboarding[hidden] {
    display: none !important;
}

.guided-onboarding {
    position: fixed;
    inset: 0;
    z-index: 6200;
    pointer-events: none;
    font: inherit;
}

body.onboarding-active {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.onboarding-active [data-sidebar-backdrop] {
    visibility: hidden !important;
}

.guided-onboarding__shield {
    position: fixed;
    inset: 0;
    z-index: 6200;
    pointer-events: auto;
    background: rgba(20, 11, 34, 0.58);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

.guided-onboarding--targeted .guided-onboarding__shield {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.guided-onboarding__spotlight {
    position: fixed;
    z-index: 6201;
    display: none;
    pointer-events: none;
    border: 3px solid #6d28d9;
    border-radius: 14px;
    background: transparent;
    box-shadow:
        0 0 0 9999px rgba(20, 11, 34, 0.62),
        0 0 0 6px rgba(109, 40, 217, 0.14),
        0 12px 36px rgba(32, 20, 47, 0.18);
    transition: top 180ms ease, left 180ms ease, width 180ms ease, height 180ms ease;
}

.guided-onboarding--targeted .guided-onboarding__spotlight {
    display: block;
}

.guided-onboarding__card {
    position: fixed;
    z-index: 6203;
    width: min(390px, calc(100vw - 32px));
    max-height: min(720px, calc(100dvh - 32px));
    overflow: auto;
    overscroll-behavior: contain;
    padding: 24px;
    border: 1px solid rgba(109, 40, 217, 0.16);
    border-radius: 22px;
    background: #ffffff;
    color: #20142f;
    box-shadow: 0 24px 64px rgba(32, 20, 47, 0.28);
    pointer-events: auto;
    outline: none;
}

.guided-onboarding--centered .guided-onboarding__card {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
}

.guided-onboarding__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #4c1d95;
    cursor: pointer;
}

.guided-onboarding__close:hover,
.guided-onboarding__close:focus-visible {
    background: #f7f3ff;
    outline: 2px solid rgba(109, 40, 217, 0.25);
    outline-offset: 2px;
}

.guided-onboarding__close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.guided-onboarding__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-right: 40px;
    margin-bottom: 14px;
}

.guided-onboarding__eyebrow {
    color: #6d28d9;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.guided-onboarding__counter {
    flex: 0 0 auto;
    color: #6a5b78;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.guided-onboarding__icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(109, 40, 217, 0.14));
    color: #6d28d9;
}

.guided-onboarding__icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.guided-onboarding__card h2 {
    margin: 0 48px 10px 0;
    color: #20142f;
    font-size: clamp(1.18rem, 2vw, 1.45rem);
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
}

.guided-onboarding__card p {
    margin: 0;
    color: #62546f;
    font-size: 0.95rem;
    line-height: 1.55;
    overflow-wrap: normal;
    word-break: normal;
}

.guided-onboarding__progress {
    width: 100%;
    height: 5px;
    margin: 22px 0 20px;
    overflow: hidden;
    border-radius: 999px;
    background: #eee8f7;
}

.guided-onboarding__progress > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f97316, #6d28d9);
    transition: width 180ms ease;
}

.guided-onboarding__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.guided-onboarding__nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.guided-onboarding__actions .button {
    min-height: 44px;
    white-space: nowrap;
}

.guided-onboarding__skip {
    padding-inline: 4px !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #6a5b78 !important;
}

.guided-onboarding__skip:hover,
.guided-onboarding__skip:focus-visible {
    color: #4c1d95 !important;
}

@media (max-width: 1060px) {
    .guided-onboarding__card,
    .guided-onboarding--centered .guided-onboarding__card {
        top: auto !important;
        right: max(12px, env(safe-area-inset-right)) !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        left: max(12px, env(safe-area-inset-left)) !important;
        width: auto;
        max-height: min(54dvh, 520px);
        transform: none;
        border-radius: 22px;
        padding: 20px;
    }

    .guided-onboarding__spotlight {
        border-radius: 12px;
    }

    .guided-onboarding__card h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    .guided-onboarding__card,
    .guided-onboarding--centered .guided-onboarding__card {
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100%;
        max-height: min(58dvh, 520px);
        padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 24px 24px 0 0;
    }

    .guided-onboarding__close {
        top: 10px;
        right: 10px;
    }

    .guided-onboarding__meta {
        margin-bottom: 10px;
    }

    .guided-onboarding__icon {
        width: 46px;
        height: 46px;
        margin-bottom: 12px;
        border-radius: 14px;
    }

    .guided-onboarding__icon svg {
        width: 25px;
        height: 25px;
    }

    .guided-onboarding__card h2 {
        margin-right: 42px;
        margin-bottom: 8px;
        font-size: 1.08rem;
    }

    .guided-onboarding__card p {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .guided-onboarding__progress {
        margin: 16px 0 14px;
    }

    .guided-onboarding__actions {
        align-items: stretch;
        gap: 8px;
    }

    .guided-onboarding__nav-actions {
        flex: 1 1 auto;
        min-width: 0;
    }

    .guided-onboarding__nav-actions .button {
        flex: 1 1 auto;
        min-width: 0;
        padding-inline: 12px;
    }

    .guided-onboarding__skip {
        flex: 0 0 auto;
        font-size: 0.84rem;
    }
}

@media (max-width: 370px) {
    .guided-onboarding__card,
    .guided-onboarding--centered .guided-onboarding__card {
        max-height: 64dvh;
        padding-inline: 14px;
    }

    .guided-onboarding__actions {
        flex-wrap: wrap;
    }

    .guided-onboarding__skip {
        order: 2;
        width: 100%;
        min-height: 36px;
    }

    .guided-onboarding__nav-actions {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guided-onboarding__spotlight,
    .guided-onboarding__progress > span {
        transition: none;
    }
}

/* Reentrada do tour em Configurações. */
.settings-tour-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.settings-tour-panel__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: #f7f3ff;
    color: #6d28d9;
}

.settings-tour-panel__icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-tour-panel__copy {
    min-width: 0;
}

.settings-tour-panel__copy h2 {
    margin: 4px 0 5px;
    font-size: 1.05rem;
}

.settings-tour-panel__copy p {
    margin: 0;
    color: #6a5b78;
    line-height: 1.45;
}

.settings-tour-panel__action {
    min-height: 44px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .settings-tour-panel {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }

    .settings-tour-panel__action {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }
}
