/* ============================================================
   einvestitii.ro — Nav fix
   ============================================================ */

/* ── ANTI-FLASH: aplicat INAINTE de JS, ascunde elementele care se vor muta ── */
/* .menu-tg original (pos-abs) ascuns pana JS il muta in nav-actions */
#nav-mob .in-wrp > .menu-tg {
    opacity: 0;
    pointer-events: none;
}
/* Cand JS a rulat, clasa einv-ready e adaugata pe body */
body.einv-ready #nav-mob .in-wrp > .menu-tg {
    display: none !important;
}

/* ── LOGO PE MOBILE ──────────────────────────────────────────────────────── */
#nav-mob .logo-wrp img {
    width: 110px !important;
    height: auto !important;
    max-height: 40px;
    object-fit: contain;
}

/* ── HAMBURGER IN NAV-ACTIONS ────────────────────────────────────────────── */
#nav-mob .nav-actions .einv-hbg-li {
    padding-right: var(--jkd-c-off);
    margin-right: calc(-1 * var(--jkd-c-off));
}
#nav-mob .nav-actions .menu-tg {
    position: static !important;
    left: auto !important;
    top: auto !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 32px;
    width: 18px;
    padding: 7px;
    box-sizing: content-box;
    cursor: pointer;
    border-left: none;
    margin-left: 0;
    margin-top: -1px;
    opacity: 1;
    pointer-events: auto;
}

/* ── Ascunde search-ul original al temei ─────────────────────────────────── */
#nav-mob .nav-search,
#nav-desk .nav-search {
    display: none !important;
}

/* ── POPUP ───────────────────────────────────────────────────────────────── */
#einv-search-popup {
    display: none;
    position: fixed;
    z-index: 9997;
    background: var(--jkd-bg-col);
    border: 1px solid var(--jkd-b-col);
    border-top: none;
    border-bottom-left-radius: var(--jkd-br-lg);
    border-bottom-right-radius: var(--jkd-br-lg);
    padding: 14px 16px 18px;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    box-sizing: border-box;
}
#einv-search-popup.einv-open {
    display: flex;
}
#einv-search-popup .einv-pop-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
#einv-search-popup .einv-tabs {
    display: flex;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
}
#einv-search-popup .einv-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--jkd-b-col);
    border-radius: var(--jkd-br-md);
    color: var(--jkd-h-col);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.7;
    padding: 6px 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
#einv-search-popup .einv-tab svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}
#einv-search-popup .einv-tab:hover { opacity: 1; border-color: var(--jkd-pr-col); color: var(--jkd-pr-col); }
#einv-search-popup .einv-tab.on {
    background: var(--jkd-pr-col);
    border-color: var(--jkd-pr-col);
    color: var(--jkd-wh-col);
    opacity: 1;
}
#einv-search-popup .einv-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid var(--jkd-b-col);
    border-radius: var(--jkd-br-md);
    color: var(--jkd-h-col);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}
#einv-search-popup .einv-close-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}
#einv-search-popup .einv-pane { display: none; width: 100%; }
#einv-search-popup .einv-pane.on { display: block; }

/* Form standard WordPress */
#einv-search-popup .sf-form,
#einv-search-popup form[role="search"] {
    display: flex;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid var(--jkd-b-col);
    padding-bottom: 4px;
}
#einv-search-popup input[type="search"],
#einv-search-popup input[type="text"] {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--jkd-h-col);
    font-size: 15px;
    padding: 4px 0;
}
#einv-search-popup button[type="submit"] {
    background: transparent;
    border: none;
    color: var(--jkd-h-col);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
#einv-search-popup button[type="submit"] svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

/* ECS live search stilizat sa se potriveasca cu tema */
#einv-search-popup .ecs-live-search {
    width: 100%;
}
#einv-search-popup .ecs-live-search-input-wrap {
    position: relative;
    width: 100%;
}
#einv-search-popup .ecs-live-search-input {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--jkd-b-col) !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--jkd-h-col) !important;
    font-size: 15px !important;
    padding: 4px 32px 4px 0 !important;
    box-sizing: border-box;
}
#einv-search-popup .ecs-live-search-results {
    position: absolute;
    width: 100%;
    background: var(--jkd-bg-col);
    border: 1px solid var(--jkd-b-col);
    border-radius: var(--jkd-br-md);
    z-index: 10000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

/* Overlay */
#einv-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9996;
    background: rgba(0,0,0,0.35);
}
#einv-search-overlay.einv-open { display: block; }
