/* 
  OHM V3 - Standalone Header Styles 
  Used by design-system-v3.js for pages that don't load the full theme-v3.css
*/

:root {
    --header-glass: rgba(15, 23, 42, 0.6);
    --header-border: rgba(255, 255, 255, 0.1);
    --header-ink: #f8fafc;
    --header-muted: #94a3b8;
    --header-accent-glow: rgba(129, 140, 248, 0.4);
}

body.light-mode {
    --header-glass: rgba(255, 255, 255, 0.6);
    --header-border: rgba(0, 0, 0, 0.05);
    --header-ink: #1d1d1f;
    --header-muted: #86868b;
    --header-accent-glow: rgba(0, 102, 204, 0.2);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    /* Folosește variabile sensibile la light/dark */
    background: var(--header-glass);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-bottom: 1px solid var(--header-border);
    box-sizing: border-box;
    z-index: 9999;
    display: flex;
    align-items: center;
    padding: 0 32px;
    font-family: "Outfit", "Inter", sans-serif;
    overflow: visible;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.4), rgba(129, 140, 248, 0.4), rgba(45, 212, 191, 0.4), transparent);
    background-size: 200% auto;
    animation: shineHeaderLine 4s linear 2;
}

@keyframes shineHeaderLine {
    to {
        background-position: 200% center;
    }
}

.site-header .header-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.site-header .header-brand {
    --header-logo-size: 52px;
    --header-logo-gap: 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    color: var(--header-ink);
    text-decoration: none;
}

.site-header .header-brand-title-row {
    display: inline-flex;
    align-items: center;
    gap: var(--header-logo-gap);
    line-height: 1;
}

.site-header .header-brand img {
    width: var(--header-logo-size);
    height: var(--header-logo-size);
    object-fit: contain;
    flex-shrink: 0;
}

.site-header .header-brand .brand-title {
    display: inline-flex;
    align-items: baseline;
    gap: 0.12em;
    font-size:var(--text-kpi);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.site-header .header-brand .brand-bim {
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-header .header-brand .brand-flow {
    background: linear-gradient(
        90deg,
        rgba(248, 250, 252, 0.92) 0%,
        rgba(255, 255, 255, 1) 30%,
        rgba(191, 219, 254, 0.95) 50%,
        rgba(255, 255, 255, 1) 70%,
        rgba(248, 250, 252, 0.92) 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 12px rgba(148, 163, 184, 0.18);
    animation: brandFlowShimmer 6s linear 2;
}

.site-header .header-brand .brand-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0 0 calc(var(--header-logo-size) + var(--header-logo-gap));
    align-self: flex-start;
    font-size:var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--header-muted);
    text-transform: none;
}

.site-header .header-brand .brand-subtitle::before,
.site-header .header-brand .brand-subtitle::after {
    content: "";
    width: 48px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0), rgba(37, 99, 235, 0.65));
}

.site-header .header-brand .brand-subtitle::after {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.65), rgba(37, 99, 235, 0));
}

.site-header .header-brand .brand-ohm {
    color: #22c55e;
    font-weight: 800;
}

@keyframes brandFlowShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 220% 50%; }
}

.site-header .header-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.site-header .header-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: stretch;
}

.site-header .header-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--header-muted);
    text-decoration: none;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1;
    padding: 0;
    height: 100%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.site-header .header-link:hover .header-link-text,
.site-header .header-link.active .header-link-text,
.site-header .header-link[aria-expanded="true"] .header-link-text {
    background: linear-gradient(135deg, #2dd4bf, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(45, 212, 191, 0.2);
}

.site-header .header-link:hover,
.site-header .header-link.active,
.site-header .header-link[aria-expanded="true"] {
    color: #2dd4bf;
}

.site-header .header-nav .header-link {
    color: var(--header-muted);
    font-size: 16px;
    font-weight: 550;
    letter-spacing: 0.3px;
}

.site-header .header-nav .nav-product-icon,
.header-nav .nav-product-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin: 0;
    flex-shrink: 0;
    vertical-align: middle;
    -webkit-text-fill-color: initial;
}

.site-header .header-drop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 236px;
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(11, 18, 34, 0.98), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(45, 212, 191, 0.24);
    box-shadow:
        0 0 0 1px rgba(45, 212, 191, 0.08),
        0 20px 40px rgba(2, 8, 23, 0.58);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10002;
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
    transform-origin: top right;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .24s cubic-bezier(0.22, 1, 0.36, 1), visibility .2s ease;
}

.site-header .header-drop--end {
    left: auto;
    right: 0;
}

.site-header .header-drop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.site-header .header-drop[hidden] {
    display: none !important;
}

.site-header .header-drop a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #e2e8f0 !important;
    background: transparent !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    text-shadow: none !important;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.12px;
    padding: 10px 11px;
    border-radius: 10px;
    transition: transform .18s ease, background .18s ease;
}

.site-header .header-drop a:hover,
.site-header .header-drop a.active {
    background: rgba(45, 212, 191, 0.12) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: none !important;
    transform: translateX(2px);
}

body.light-mode .site-header .header-drop {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(248, 250, 252, 0.98));
    border-color: rgba(20, 184, 166, 0.24);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

body.light-mode .site-header .header-drop a {
    color: #1d1d1f !important;
    -webkit-text-fill-color: #1d1d1f !important;
}

body.light-mode .site-header .header-drop a:hover {
    background: rgba(20, 184, 166, 0.12) !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

.site-header .header-item--account {
    position: relative;
}

.site-header .header-drop-lang {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
    padding: 8px 11px 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .site-header .header-drop-lang {
    border-top-color: rgba(15, 23, 42, 0.08);
}

.site-header .header-drop-lang-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
}

.site-header .header-account-chevron {
    width: 14px;
    height: 14px;
    margin-left: 2px;
    opacity: .75;
    flex-shrink: 0;
    transition: transform .24s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header #nav-account[aria-expanded="true"] .header-account-chevron {
    transform: rotate(180deg);
}

.site-header #auth-section.account-menu-disabled .header-btn-cont {
    padding-right: 24px;
}

.site-header #auth-section.account-menu-disabled .header-account-chevron {
    display: none;
}

body.light-mode .site-header .header-drop-lang-label {
    color: #64748b;
}

.site-header .lang-switcher--inline {
    position: static;
    width: 100%;
}

.site-header .lang-switcher--inline .lang-switcher-btn {
    display: none;
}

.site-header .lang-switcher--inline .lang-switcher-menu {
    position: static;
    display: flex !important;
    flex-direction: row;
    gap: 6px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.site-header .lang-switcher--inline .lang-switcher-option {
    flex: 1;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 10px;
}

body.light-mode .site-header .lang-switcher--inline .lang-switcher-option {
    border-color: rgba(15, 23, 42, 0.1);
}

.site-header .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-header .header-item--mobile-nav {
    display: none;
    position: relative;
}

.site-header .header-mobile-menu-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    cursor: pointer;
}

.site-header .header-mobile-menu-btn svg {
    width: 22px;
    height: 22px;
}

body.light-mode .site-header .header-mobile-menu-btn {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.15);
}

.site-header .header-drop--mobile {
    width: min(320px, calc(100vw - 32px));
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.site-header .header-drop--mobile .nav-product-icon {
    width: 22px;
    height: 22px;
}

.site-header .header-mobile-menu-divider {
    height: 1px;
    margin: 6px 4px;
    background: rgba(148, 163, 184, 0.2);
}

.site-header a:focus-visible,
.site-header button:focus-visible {
    outline: 3px solid rgba(45, 212, 191, 0.9);
    outline-offset: 3px;
}

/* Versiune site — discretă, dreapta sus */
.site-header .site-version {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size:var(--text-micro);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.72);
    user-select: none;
    white-space: nowrap;
    line-height: 1;
    padding: 4px 0;
}

body.light-mode .site-header .site-version {
    color: rgba(100, 116, 139, 0.65);
}

@media (max-width: 520px) {
    .site-header .site-version {
        font-size:var(--text-micro);
    }
}

.site-header #auth-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.header-btn-admin::before {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.header-btn-admin-active {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.45);
}

.site-header .header-scope-chip {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size:var(--text-sm);
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    color: #fdba74;
    background: rgba(249, 115, 22, .14);
    border: 1px solid rgba(249, 115, 22, .35);
}

.site-header .header-scope-chip .nav-product-icon {
    width: 18px;
    height: 18px;
    margin: 0;
}
.site-header .header-scope-chip.active,
.site-header .header-scope-chip:hover {
    color: #fff7ed;
    background: rgba(249, 115, 22, .28);
    border-color: rgba(249, 115, 22, .55);
}

@media (max-width: 900px) {
    .site-header {
        height: 78px;
        padding: 0 20px;
    }
    .site-header .header-nav {
        display: none;
    }
    .site-header .header-item--mobile-nav {
        display: block;
    }
    .site-header .header-scope-chip:not([hidden]) {
        display: none;
    }
    .site-header .header-brand {
        --header-logo-size: 60px;
        --header-logo-gap: 10px;
    }
    .site-header .header-brand .brand-title {
        font-size:var(--text-2xl);
    }
    .site-header .header-brand .brand-subtitle {
        font-size:var(--text-micro);
        gap: 8px;
    }
    .site-header .header-brand .brand-subtitle::before,
    .site-header .header-brand .brand-subtitle::after {
        width: 36px;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 0 14px;
    }
    .site-header .header-right {
        gap: 8px;
    }
    .site-header .site-version {
        display: none;
    }
    .site-header .header-btn-cont {
        width: 42px;
        height: 42px;
        justify-content: center;
        padding: 0;
    }
    .site-header .header-btn-cont span,
    .site-header .header-account-chevron {
        display: none;
    }
    .site-header .header-brand .brand-subtitle {
        display: none;
    }
    .site-header .header-brand .brand-title {
        font-size:var(--text-2xl);
    }

    /* Mobile perf: reduce expensive blur + animations */
    .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .site-header::after {
        animation: none;
    }
}

@media (max-width: 420px) {
    .site-header .header-brand {
        --header-logo-size: 46px;
        --header-logo-gap: 7px;
    }
    .site-header .header-brand .brand-title {
        font-size: 20px;
        letter-spacing: 0.05em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header .header-brand .brand-flow,
    .site-header::after {
        animation: none !important;
    }
}

/* Modern "Contul meu" Header Button (Variant 1 + Shine from V3) */
.header-btn-cont {
    position: relative;
    background: #0f172a;
    color: #fff !important;
    padding: 10px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size:var(--text-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    background-clip: padding-box;
    transition: all 0.3s ease;
    overflow: hidden;
    /* Important pt efectul shine */
    z-index: 1;
}

body.light-mode .header-btn-cont {
    background: #f8fafc;
    color: #0f172a !important;
}

/* 1. Marginea colorată (Gradient Border de la Variant 1) */
.header-btn-cont::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 100px;
    background: linear-gradient(135deg, #2dd4bf, #818cf8);
    z-index: -1;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* 2. Reflexia (Shine de la Variant 3) */
.header-btn-cont::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 2;
    /* Peste background, dar textul are si el z-index implicit mai mare dintr-un wrapper de flex, though we'll make sure */
    pointer-events: none;
}

body.light-mode .header-btn-cont::after {
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.15), transparent);
}

.header-btn-cont:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 212, 191, 0.25);
}

.header-btn-cont:hover::before {
    background: linear-gradient(135deg, #14b8a6, #6366f1);
}

.header-btn-cont:hover::after {
    transform: translateX(100%);
}

/* Language switcher (RO / ENG) */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--header-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--header-ink);
    font-family: inherit;
    font-size:var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

body.light-mode .lang-switcher-btn {
    background: rgba(0, 0, 0, 0.04);
}

.lang-switcher-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

body.light-mode .lang-switcher-btn:hover {
    background: rgba(0, 0, 0, 0.07);
}

.lang-switcher-code {
    font-size:var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
}

.lang-switcher-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 72px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--header-border);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    z-index: 10001;
}

body.light-mode .lang-switcher-menu {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.lang-switcher.is-open .lang-switcher-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lang-switcher-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--header-ink);
    font-family: inherit;
    font-size:var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}

.lang-switcher-caret {
    font-size:var(--text-micro);
    opacity: 0.7;
    margin-left: 1px;
}

.lang-switcher-option:hover,
.lang-switcher-option.is-active {
    background: rgba(129, 140, 248, 0.18);
}

body.light-mode .lang-switcher-option:hover,
body.light-mode .lang-switcher-option.is-active {
    background: rgba(99, 102, 241, 0.1);
}

/* Account page language picker */
.lang-account-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.lang-account-option {
    cursor: pointer;
}

.lang-account-option input {
    display: none;
}

.lang-account-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 16px;
    border-radius: 16px;
    border: 2px solid var(--glass-border);
    font-weight: 700;
    font-size:var(--text-base);
    transition: all 0.2s;
}

.lang-account-option input:checked + .lang-account-preview {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Produse în dezvoltare — blocare pentru non-admin */
.site-header .header-link.dev-locked,
.site-header .header-scope-chip.dev-locked {
    opacity: 0.55;
    cursor: not-allowed;
    position: relative;
}

.site-header .header-link.dev-locked:hover .header-link-text,
.site-header .header-link.dev-locked.active .header-link-text {
    background: none;
    -webkit-text-fill-color: #94a3b8;
    text-shadow: none;
}

.site-header .header-link.dev-locked::after,
.site-header .header-scope-chip.dev-locked::after {
    content: attr(data-dev-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #f8fafc;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 30;
}

.site-header .header-link.dev-locked:hover::after,
.site-header .header-scope-chip.dev-locked:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dev-locked-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(12px);
    opacity: 0;
    z-index: 1400;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.dev-locked-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.light-mode .dev-locked-toast {
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.45);
}
