/**
 * Vana V19 - Navigation UI
 * Versão: 2.2.5
 * Componentes: Header Desktop, Mobile Bottom Nav, FAB, Personal Sidebar.
 */

:root {
    --v19-nav-bg: #ffffff;
    --v19-nav-border: #e5e7eb;
    --v19-primary: #7c3aed; /* Violet 600 */
    --v19-text-main: #1f2937;
    --v19-text-sub: #6b7280;
    --v19-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --v19-z-nav: 9990;
    --v19-z-modal: 10000;
}

/* ==========================================================================
   1. DESKTOP HEADER (Tulsi Bar)
   ========================================================================== */
.v19-header-main {
    background: var(--v19-nav-bg);
    border-bottom: 1px solid var(--v19-nav-border);
    position: sticky;
    top: 0;
    z-index: var(--v19-z-nav);
    box-shadow: var(--v19-shadow);
    padding: 0 20px;
}

.v19-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.v19-logo {
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    color: var(--v19-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Menu Desktop */
.v19-desktop-menu {
    display: flex;
    gap: 25px;
    align-items: center;
}

.v19-desktop-menu a {
    text-decoration: none;
    color: var(--v19-text-main);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.v19-desktop-menu a:hover {
    color: var(--v19-primary);
}

/* Dropdown */
.v19-dropdown {
    position: relative;
    display: inline-block;
}

.v19-drop-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--v19-text-main);
    padding: 0;
}

.v19-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    border: 1px solid var(--v19-nav-border);
    z-index: var(--v19-z-nav);
}

.v19-dropdown:hover .v19-dropdown-content {
    display: block;
}

.v19-dropdown-content a {
    color: var(--v19-text-main);
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px;
}

.v19-dropdown-content a:hover {
    background-color: #f9fafb;
    color: var(--v19-primary);
}

/* User Actions */
.v19-user-actions .v19-profile-link {
    font-size: 13px;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--v19-text-main);
    font-weight: 500;
}

/* Esconde Desktop Menu em Mobile */
@media (max-width: 768px) {
    .v19-desktop-menu, .v19-user-actions {
        display: none;
    }
    .v19-nav-container {
        justify-content: center;
    }
}

/* ==========================================================================
   2. MOBILE BOTTOM NAV
   ========================================================================== */
.v19-mobile-nav {
    display: none; /* Ativado via Media Query ou JS */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid var(--v19-nav-border);
    height: 60px; /* Altura segura */
    padding-bottom: env(safe-area-inset-bottom); /* iOS Safe Area */
    justify-content: space-around;
    align-items: center;
    z-index: var(--v19-z-nav);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}

@media (max-width: 768px) {
    .v19-mobile-nav { display: flex; }
}

.v19-mobile-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--v19-text-sub);
    font-size: 10px;
    gap: 4px;
}

.v19-mobile-item .icon {
    font-size: 18px;
}

.v19-mobile-item.active {
    color: var(--v19-primary);
}

/* FAB (Floating Action Button) Central */
.v19-fab-container {
    position: relative;
    top: -20px; /* Flutua acima da barra */
}

.v19-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--v19-primary);
    border: 4px solid #fff; /* Borda branca para destacar */
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    padding: 0;
}

.v19-fab:active {
    transform: scale(0.95);
}

/* ==========================================================================
   3. BOTTOM SHEET (Modal Mobile)
   ========================================================================== */
.v19-bottom-sheet {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: var(--v19-z-modal);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
}

.v19-bottom-sheet.is-open {
    opacity: 1;
    visibility: visible;
}

.v19-sheet-content {
    background: #fff;
    width: 100%;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.v19-bottom-sheet.is-open .v19-sheet-content {
    transform: translateY(0);
}

.v19-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.v19-sheet-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--v19-text-main);
}

#v19-sheet-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--v19-text-sub);
}

.v19-sheet-body {
    padding: 10px 0;
}

.v19-sheet-item {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--v19-text-main);
    font-size: 15px;
    border-bottom: 1px solid #f9fafb;
}

.v19-sheet-item:active {
    background: #f3f4f6;
}

/* ==========================================================================
   4. PERSONAL NAV (Floating Sidebar)
   ========================================================================== */
.v19-personal-nav {
    position: fixed;
    bottom: 80px; /* Acima da mobile nav */
    right: 20px;
    z-index: 9980;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.v19-nav-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.v19-nav-toggle:hover {
    transform: scale(1.1);
}

.v19-nav-menu {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
    width: 200px;
    overflow: hidden;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.v19-nav-header {
    background: #f9fafb;
    padding: 10px 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--v19-text-sub);
    border-bottom: 1px solid #eee;
}

.v19-nav-item {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--v19-text-main);
    font-size: 13px;
    transition: background 0.1s;
}

.v19-nav-item:hover {
    background: #f3f4f6;
}

.v19-nav-footer {
    padding: 8px 15px;
    background: #f9fafb;
    text-align: center;
}