/**
 * SIDEBAR MENU — Blue Concursos
 * Arquivo: astra-child/assets/css/components/sidebar-menu.css
 * @version 2.0.0
 */

/* ============================================================
   BOTÃO HAMBÚRGUER
============================================================ */
.bc-menu-hamburger {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.55);
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    outline: none;
    flex-shrink: 0;
    pointer-events: all !important;
    position: relative;
    z-index: 99999;
    transition: border-color .25s, transform .25s, background .25s;
}
.bc-menu-hamburger:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.12);
    transform: scale(1.08);
}
.bc-menu-hamburger svg {
    pointer-events: none;
    stroke: #fff;
}

/* ============================================================
   OVERLAY — apenas sombra, sem fundo escuro
============================================================ */
#bc-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999997;
    background: transparent;
    cursor: pointer;
}
#bc-sidebar-overlay.bc-sidebar-active {
    display: block;
}

/* ============================================================
   PAINEL LATERAL — TEMA CLARO
   Gradiente igual ao cabeçalho: #0794DE → #0B1D79 (90°)
============================================================ */
#bc-sidebar-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    height: 100vh;
    z-index: 999998;
    /* Gradiente no tema claro */
    background: linear-gradient(180deg, #0794DE 0%, #0B1D79 100%);
    box-shadow: -6px 0 32px rgba(0,0,0,0.22), -1px 0 8px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
}
#bc-sidebar-panel.bc-sidebar-open {
    right: 0;
}

/* ============================================================
   TEMA ESCURO — painel e topo escuros
============================================================ */
.dark-mode #bc-sidebar-panel,
[data-theme="dark"] #bc-sidebar-panel,
body.bc-dark #bc-sidebar-panel {
    background: #111827;
    box-shadow: -6px 0 32px rgba(0,0,0,0.55);
}

/* ============================================================
   CABEÇALHO DO PAINEL
============================================================ */
.bc-sidebar-header {
    /* Tema claro: topo mais escuro dentro do gradiente */
    background: rgba(0,0,0,0.18);
    padding: 22px 18px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* Tema escuro: topo bem escuro */
.dark-mode .bc-sidebar-header,
[data-theme="dark"] .bc-sidebar-header,
body.bc-dark .bc-sidebar-header {
    background: #0a0f1a;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bc-sidebar-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    flex-shrink: 0;
    cursor: pointer;
}
.bc-sidebar-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background .2s;
}
.bc-sidebar-avatar-placeholder:hover {
    background: rgba(255,255,255,0.25);
}
.bc-sidebar-avatar-placeholder svg {
    width: 26px;
    height: 26px;
    stroke: rgba(255,255,255,0.9);
}
.bc-sidebar-user-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.bc-sidebar-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.bc-sidebar-user-email {
    font-size: 12px;
    color: rgba(255,255,255,0.70);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.bc-sidebar-login-hint {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    cursor: pointer;
}
.bc-sidebar-login-hint:hover {
    color: #fff;
    text-decoration: underline;
}

/* Botão fechar — apenas o × sem fundo */
.bc-sidebar-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.80);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    transition: color .2s, transform .2s;
    padding: 0;
}
.bc-sidebar-close-btn:hover {
    color: #ffffff;
    transform: scale(1.15);
}
.bc-sidebar-close-btn svg {
    pointer-events: none;
}

/* ============================================================
   NAVEGAÇÃO DO PAINEL
============================================================ */
.bc-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.bc-sidebar-nav::-webkit-scrollbar { width: 4px; }
.bc-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.bc-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.bc-sidebar-section-label {
    padding: 12px 12px 5px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.50);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Itens — tema claro (fundo gradiente azul) */
.bc-sidebar-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 11px 14px !important;
    border-radius: 10px !important;
    color: rgba(255,255,255,0.88) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    transition: background .15s, color .15s !important;
    margin-bottom: 2px !important;
    position: relative;
}
.bc-sidebar-item:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
}
.bc-sidebar-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity .15s;
    stroke: currentColor;
}
.bc-sidebar-item:hover svg { opacity: 1; }

/* Item ativo */
.bc-sidebar-item.bc-sidebar-current {
    background: rgba(255,255,255,0.18) !important;
    color: #ffffff !important;
}
.bc-sidebar-item.bc-sidebar-current svg { opacity: 1; }
.bc-sidebar-item.bc-sidebar-current::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #ffffff;
    border-radius: 0 3px 3px 0;
}

.bc-sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.12);
    margin: 6px 8px;
}

/* Item Sair */
.bc-sidebar-item-sair {
    color: rgba(255,180,180,0.90) !important;
}
.bc-sidebar-item-sair:hover {
    background: rgba(220,38,38,0.20) !important;
    color: #fca5a5 !important;
}

/* ============================================================
   TEMA ESCURO — itens
============================================================ */
.dark-mode .bc-sidebar-item,
[data-theme="dark"] .bc-sidebar-item,
body.bc-dark .bc-sidebar-item {
    color: #d1d5db !important;
}
.dark-mode .bc-sidebar-item:hover,
[data-theme="dark"] .bc-sidebar-item:hover,
body.bc-dark .bc-sidebar-item:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
}
.dark-mode .bc-sidebar-item.bc-sidebar-current,
[data-theme="dark"] .bc-sidebar-item.bc-sidebar-current,
body.bc-dark .bc-sidebar-item.bc-sidebar-current {
    background: rgba(37,99,235,0.30) !important;
    color: #93c5fd !important;
}
.dark-mode .bc-sidebar-item.bc-sidebar-current::before,
[data-theme="dark"] .bc-sidebar-item.bc-sidebar-current::before,
body.bc-dark .bc-sidebar-item.bc-sidebar-current::before {
    background: #60a5fa;
}
.dark-mode .bc-sidebar-section-label,
[data-theme="dark"] .bc-sidebar-section-label,
body.bc-dark .bc-sidebar-section-label {
    color: #4b5563;
}
.dark-mode .bc-sidebar-divider,
[data-theme="dark"] .bc-sidebar-divider,
body.bc-dark .bc-sidebar-divider {
    background: rgba(255,255,255,0.07);
}

/* ============================================================
   ANIMAÇÃO DOS ITENS ao abrir
============================================================ */
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item {
    animation: bc-item-in 0.3s ease both;
}
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(1)  { animation-delay:.05s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(2)  { animation-delay:.08s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(3)  { animation-delay:.11s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(4)  { animation-delay:.14s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(5)  { animation-delay:.17s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(6)  { animation-delay:.20s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(7)  { animation-delay:.23s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(8)  { animation-delay:.26s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(9)  { animation-delay:.29s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(10) { animation-delay:.32s }
#bc-sidebar-panel.bc-sidebar-open .bc-sidebar-item:nth-child(11) { animation-delay:.35s }
@keyframes bc-item-in {
    from { opacity:0; transform:translateX(16px); }
    to   { opacity:1; transform:translateX(0); }
}

/* ============================================================
   RESPONSIVO — MOBILE
   Largura parcial (~85%), não cobre toda a tela
============================================================ */
@media (max-width: 768px) {
    #bc-sidebar-panel {
        width: 85vw;
        max-width: 360px;
        right: calc(-85vw - 10px);
    }
}
@media (max-width: 480px) {
    #bc-sidebar-panel {
        width: 85vw;
        max-width: 320px;
        right: calc(-85vw - 10px);
    }
}

/* ============================================================
   ALTERNADOR DE TEMA (claro/escuro) — rodapé da nav
   Renderiza o shortcode [wp_dark_mode_switch] (WP Dark Mode)
============================================================ */
.bc-sidebar-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px !important;
    margin-bottom: 2px !important;
    color: rgba(255,255,255,0.88) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 10px;
}
.bc-sidebar-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.bc-sidebar-toggle-label svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.65;
    stroke: currentColor;
}

/* ============================================================
   SWITCH DE TEMA — 100% próprio, sem shortcode do plugin
============================================================ */
.bc-sidebar-theme-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 11px 14px !important;
    margin-bottom: 2px;
}

.bc-sidebar-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 500;
}

.bc-sidebar-toggle-label svg {
    width: 18px;
    height: 18px;
    opacity: 0.65;
    stroke: currentColor;
}

.bc-theme-switch {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    position: relative;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.25s ease;
}

.bc-theme-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .bc-theme-switch {
    background: #076fde;
}

html[data-theme="dark"] .bc-theme-switch .bc-theme-switch-knob {
    transform: translateX(20px);
}

/* Tema escuro — painel fica #111827; rótulo acompanha os itens */
.dark-mode .bc-sidebar-theme-toggle,
[data-theme="dark"] .bc-sidebar-theme-toggle,
body.bc-dark .bc-sidebar-theme-toggle {
    color: #d1d5db !important;
}