/**
 * PHARMDATA DESIGN SYSTEM - RPDA Navigation
 * Navegação por eixos Regulatório / Prescrever / Dispensar / Administrar.
 *
 * Requires: pharmdata-tokens.css
 *
 * @example
 * <div class="rpda-layout">
 *   <aside class="rpda-sidebar">
 *     <nav class="rpda-nav">
 *       <button class="rpda-btn rpda-btn--active" data-eixo="R">
 *         <i class="fas fa-file-medical"></i>
 *         <span>Regulatório</span>
 *       </button>
 *     </nav>
 *   </aside>
 *   <main class="rpda-main" id="rpda-content">...</main>
 * </div>
 */

/* ─── Layout principal ─── */
.rpda-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* ─── Sidebar ─── */
.rpda-sidebar {
    width: 80px;
    background: var(--arctic-mist);
    border-right: 1px solid var(--soft-arctic);
    flex-shrink: 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.rpda-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
    gap: 4px;
}

/* ─── Botões de eixo ─── */
.rpda-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 6px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--soft-steel);
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    transition: background 0.15s, color 0.15s;
    width: 100%;
}

.rpda-btn i {
    font-size: 18px;
    margin-bottom: 2px;
}

.rpda-btn:hover {
    background: var(--mint-signal);
    color: var(--emerald-abyss);
}

.rpda-btn--active {
    background: var(--teal-intense);
    color: white;
}

.rpda-btn--active:hover {
    background: var(--emerald-abyss);
    color: white;
}

/* ─── Área de conteúdo ─── */
.rpda-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--cloud);
    min-width: 0;
}

/* ─── Header do eixo ─── */
.rpda-eixo-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--soft-arctic);
}

.rpda-eixo-titulo {
    font-size: 20px;
    font-weight: 700;
    color: var(--emerald-abyss);
    margin: 0 0 4px 0;
}

.rpda-eixo-titulo i {
    margin-right: 8px;
}

.rpda-eixo-descricao {
    font-size: 13px;
    color: var(--soft-steel);
    margin: 0;
}

/* ─── PRO gate — blur overlay sobre conteúdo bloqueado ─── */
.rpda-pro-gate {
    position: relative;
}

.rpda-pro-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, color-mix(in srgb, var(--cloud) 85%, transparent) 40%, var(--cloud));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.rpda-pro-cta {
    text-align: center;
    background: var(--arctic-mist);
    border: 1px solid var(--soft-arctic);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--graphite-depth) 10%, transparent);
}

.rpda-pro-cta i {
    font-size: 20px;
    color: var(--teal-intense);
    display: block;
    margin-bottom: 4px;
}

.rpda-pro-cta p {
    font-size: 12px;
    color: var(--soft-steel);
    margin: 0 0 8px 0;
}

.rpda-pro-cta button {
    padding: 6px 14px;
    background: var(--emerald-abyss);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.rpda-pro-cta button:hover {
    background: var(--graphite-depth);
}

/* ─── Cores semânticas por eixo (border-l e badges) ─── */
:root {
    --eixo-r: #0277bd;
    --eixo-r-bg: #e1f5fe;
    --eixo-p: #6a1b9a;
    --eixo-p-bg: #f3e5f5;
    --eixo-d: #ef6c00;
    --eixo-d-bg: #fff3e0;
    --eixo-a: #2e7d32;
    --eixo-a-bg: #e8f5e9;
}

/* ─── Responsive: sidebar colapsa em mobile ─── */
@media (max-width: 640px) {
    .rpda-layout {
        flex-direction: column;
    }

    .rpda-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--soft-arctic);
    }

    .rpda-nav {
        flex-direction: row;
        justify-content: space-around;
        padding: 8px;
        gap: 4px;
    }

    .rpda-btn {
        padding: 8px 4px;
        font-size: 9px;
    }

    .rpda-btn i {
        font-size: 16px;
    }

    .rpda-main {
        padding: 16px;
    }
}
