/**
 * Ponte AdminLTE — utilitários + extras Privacy.
 * Layout geométrico = AdminLTE nativo (igual planejamentopublico).
 * Normalização do shell legado: privacy-shell-normalize.js
 */

/* Evita flash do shell legado antes da normalização */
body.sidebar-mini:not(:has(> .wrapper)) > .container-fluid {
    opacity: 0;
}
body.sidebar-mini:has(> .wrapper) > .wrapper {
    opacity: 1;
}

/* ========== Utilitários BS5 → BS4 ========== */
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-auto { margin-left: auto !important; }
.mt-auto { margin-top: auto !important; }
.mb-0 { margin-bottom: 0 !important; }
.g-3 > [class*="col-"] { margin-bottom: 1rem; }
.gap-2 { gap: 0.5rem; }
.btn-close {
    float: right;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
    background: transparent;
    border: 0;
}
.btn-close::before { content: "×"; }

/* ========== Roteiro Guiado ========== */
.guided-tour-header-btn {
    font-weight: 600;
    border-radius: 8px;
    max-width: min(280px, 42vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guided-tour-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1040;
}

.guided-tour-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 92vw);
    background: #fff;
    z-index: 1045;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Nunca ocupar fluxo do .wrapper (evita div branca no topo) */
    margin: 0 !important;
    pointer-events: none;
}

.guided-tour-drawer.show {
    transform: translateX(0);
    pointer-events: auto;
}

.guided-tour-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

.guided-tour-drawer .guided-tour-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 45vh;
    overflow-y: auto;
}

.guided-tour-step {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
}

.guided-tour-step:hover {
    border-color: #94a3b8;
}

.guided-tour-step.is-current {
    border-color: #198754;
    box-shadow: 0 0 0 1px #198754;
}

.guided-tour-step.is-done {
    opacity: 0.85;
}

.guided-tour-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #e2e8f0;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.guided-tour-step.is-current .guided-tour-step-index {
    background: #198754;
    color: #fff;
}

body.guided-tour-open {
    overflow: hidden;
}
