/* css/drawer.css - Menu lateral mobile */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: white;
    z-index: 2001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
}

.drawer-menu.open {
    transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
    background: var(--primary);
    padding: 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.drawer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    overflow: hidden;
    flex-shrink: 0;
}

.drawer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-user-details {
    color: white;
}

.drawer-user-details span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.drawer-user-details small {
    font-size: 11px;
    opacity: 0.8;
}

.drawer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.drawer-close:active {
    background: rgba(255, 255, 255, 0.4);
}

/* Drawer Navigation */
.drawer-nav {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.drawer-nav-item:active {
    background: #f5f5f5;
}

.drawer-nav-item.active {
    background: #e8f0fe;
    color: #000000;
    border-right: 3px solid #910085;
}

.drawer-nav-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

/* Drawer Categorias */
.drawer-divider {
    height: 8px;
    background: #f5f5f5;
}

.drawer-categorias {
    flex: 1;
    padding: 16px 0;
}

.drawer-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.5px;
    padding: 0 16px;
    margin-bottom: 12px;
}

.drawer-categorias-list {
    display: flex;
    flex-direction: column;
}

.drawer-categoria-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.drawer-categoria-item:active {
    background: #f5f5f5;
}

.drawer-categoria-item .categoria-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

/* Drawer Footer */
.drawer-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.drawer-footer-text {
    font-size: 11px;
    color: var(--gray);
    margin-bottom: 4px;
}

.drawer-footer-version {
    font-size: 10px;
    color: var(--gray-light);
}

/* Menu Toggle Button */
.menu-toggle {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.menu-toggle:active {
    background: rgba(255, 255, 255, 0.2);
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Header Left Section */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Desktop only classes */
.desktop-only {
    display: block;
}

.desktop-nav {
    display: flex;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .logo-container h1 {
        display: none;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .drawer-menu,
    .drawer-overlay {
        display: none;
    }
}

/* Safe area support */
@supports (padding: max(0px)) {
    .drawer-menu {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
    
    .drawer-header {
        padding-top: max(20px, env(safe-area-inset-top));
    }
}