/* ========================================
   Header.css - Estilos do Header
   ======================================== */

/* Container do Header */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    height: 56px;
    background: var(--app-bg-secondary);
    border-bottom: 1px solid var(--app-border-color);
    position: relative;
    z-index: 100;
}

/* Lado esquerdo: logo + nome */
.header-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.header-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    cursor: pointer;
}

.header-app-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--app-text-primary);
    letter-spacing: 0.02em;
}

/* Lado direito: botão hamburger */
.header-right {
    display: flex;
    align-items: center;
}

.header-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--app-text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-menu-btn:hover {
    background: var(--app-bg-tertiary);
}

.header-menu-btn:active {
    transform: scale(0.95);
}

/* Overlay */
.header-menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--app-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 199;
}

.header-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Menu Dropdown */
.header-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 1rem;
    width: 240px;
    background: var(--app-bg-secondary);
    border: 1px solid var(--app-border-color);
    border-radius: 12px;
    box-shadow: var(--app-shadow);
    padding: 0.5rem;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.header-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Seções do menu */
.header-menu-section {
    padding: 0.25rem 0;
}

.header-menu-section + .header-menu-section {
    border-top: 1px solid var(--app-border-color);
    margin-top: 0.25rem;
    padding-top: 0.5rem;
}

/* Título da seção */
.header-menu-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--app-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-menu-section-title svg {
    width: 16px;
    height: 16px;
}

/* Opções do menu (idioma, tema) */
.header-menu-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-menu-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--app-text-primary) !important;
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
}

.header-menu-option:hover {
    background: var(--app-bg-tertiary);
}

.header-menu-option svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.header-menu-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.header-menu-option-icon svg {
    width: 16px;
    height: 16px;
}

.header-menu-option-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--app-primary-color);
}

.header-menu-option-check svg {
    width: 14px;
    height: 14px;
}

/* Item simples do menu (Storage) */
.header-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--app-text-primary) !important;
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
}

.header-menu-item:hover {
    background: var(--app-bg-tertiary);
}

.header-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
