/*
 * Header / menu bar, harmonised with the market, chat and partners redesign
 * (brand navy #1c368a, violet #5d78ff, soft #f5f7fe surfaces, rounded pills).
 * Loaded after social_icon.css, so it also tones down that file's effects.
 */
.lx-header {
    --lx-brand: #1c368a;
    --lx-brand-dark: #13245e;
    --lx-violet: #5d78ff;
    --lx-ink: #1e2340;
    --lx-text: #3b4058;
    --lx-line: #eceff8;
    --lx-soft: #f5f7fe;
}

/* ---- Bar ---- */
.kt-header.lx-header {
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--lx-line);
    box-shadow: 0 4px 18px rgba(20, 30, 70, .05);
}

/* Desktop only: backdrop-filter turns the header into the containing block for
   position:fixed children, which on mobile traps Metronic's off-canvas menu and
   topbar panel inside the (zero-height) header so they never show. */
@media (min-width: 1025px) {
    .kt-header.lx-header {
        -webkit-backdrop-filter: saturate(160%) blur(10px);
        backdrop-filter: saturate(160%) blur(10px);
    }
}

/* ---- Menu (desktop) ---- */
@media (min-width: 1025px) {
    .lx-header .kt-header-menu .kt-menu__nav {
        gap: .35rem;
    }
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item {
        padding: 0;
    }
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item > .kt-menu__link {
        position: relative;
        display: flex;
        align-items: center;
        gap: .45rem;
        height: 40px;
        padding: 0 .95rem;
        border-radius: 12px;
        background: transparent;
        transition: background .2s ease, color .2s ease;
    }
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item > .kt-menu__link .kt-menu__link-icon {
        width: auto;
        font-size: 1.1rem;
        line-height: 1;
        color: #8a90ad;
        transition: color .2s ease;
    }
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item > .kt-menu__link .kt-menu__link-text {
        font-size: 1rem;
        font-weight: 500;
        color: var(--lx-text);
        transition: color .2s ease;
    }

    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item > .kt-menu__link:hover {
        background: var(--lx-soft);
    }
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item > .kt-menu__link:hover .kt-menu__link-icon,
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item > .kt-menu__link:hover .kt-menu__link-text {
        color: var(--lx-brand);
    }

    /* Active page: soft violet pill + brand text, with a small accent bar */
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item.kt-menu__item--active > .kt-menu__link {
        background: rgba(93, 120, 255, .12);
    }
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item.kt-menu__item--active > .kt-menu__link .kt-menu__link-icon {
        color: var(--lx-violet);
    }
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item.kt-menu__item--active > .kt-menu__link .kt-menu__link-text {
        font-weight: 700;
        color: var(--lx-brand);
    }
    .lx-header .kt-header-menu .kt-menu__nav > .kt-menu__item.kt-menu__item--active > .kt-menu__link::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -10px;
        width: 22px;
        height: 3px;
        margin-left: -11px;
        border-radius: 3px;
        background: linear-gradient(90deg, var(--lx-violet), var(--lx-brand));
    }

    /* Chat unread count sits next to the label */
    .lx-header .kt-menu__link .count-badge {
        top: -.5rem;
        margin-left: 0;
    }
}

/* ---- Topbar ---- */
.lx-header .kt-header__topbar {
    gap: .4rem;
    padding: 0;
}
/* Match the 25px side gutter used by the logo and page content (desktop header only;
   phones use the separate mobile header). */
@media (min-width: 1025px) {
    .lx-header .kt-header__topbar {
        padding-right: 24px; /* + the 1px the topbar items already leave = 25px */
    }
}
/* social_icon.css lifts and fades in every topbar item; keep it calm here. */
.lx-header .kt-header__topbar-item,
.lx-header .kt-header__topbar-item:hover {
    transform: none;
}

/* Social links: compact soft buttons */
.lx-header .social-icon,
.lx-header .social-icon--primary {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--lx-soft);
    box-shadow: none;
    transition: background .2s ease, transform .2s ease;
}
.lx-header .social-icon:hover,
.lx-header .kt-header__topbar-item .social-icon:hover {
    background: #e9edff;
    box-shadow: none;
    transform: translateY(-2px);
}
.lx-header .social-icon:hover::after {
    display: none;
}
.lx-header .social-icon-img {
    width: 18px;
    height: 18px;
}

.lx-header .lx-topbar-divider {
    width: 1px;
    height: 26px;
    margin: 0 .4rem;
    align-self: center;
    background: var(--lx-line);
}

/* Search, notifications and user: rounded icon buttons */
.lx-header .kt-header__topbar .kt-header__topbar-item .kt-header__topbar-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--lx-soft);
    transition: background .2s ease;
}
.lx-header .kt-header__topbar .kt-header__topbar-item .kt-header__topbar-icon i {
    font-size: 1.2rem;
    color: var(--lx-brand);
}
.lx-header .kt-header__topbar .kt-header__topbar-item:hover .kt-header__topbar-icon,
.lx-header .kt-header__topbar .kt-header__topbar-item.show .kt-header__topbar-icon {
    background: #e9edff;
}

/* Signed-in user: initial in a gradient avatar */
.lx-header .kt-header__topbar .kt-header__topbar-item--user .kt-header__topbar-icon.lx-avatar {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--lx-violet), var(--lx-brand));
    box-shadow: 0 6px 14px rgba(28, 54, 138, .28);
}
.lx-header .kt-header__topbar .kt-header__topbar-item--user:hover .kt-header__topbar-icon.lx-avatar {
    background: linear-gradient(135deg, var(--lx-violet), var(--lx-brand));
    filter: brightness(1.08);
}

/* ---- Dropdown heads (notifications + profile) ---- */
.lx-dropdown-head {
    position: relative;
    background-image:
        radial-gradient(circle at 10% 0%, rgba(34, 185, 255, .35), transparent 50%),
        radial-gradient(circle at 95% 120%, rgba(93, 120, 255, .45), transparent 55%),
        linear-gradient(120deg, #13245e, #1c368a 60%, #2a47b0) !important;
}
.lx-dropdown-head.kt-user-card .kt-user-card__avatar .kt-badge {
    color: #1c368a !important;
    background: #fff;
}
.lx-dropdown-head .nav-tabs.nav-tabs-line .nav-link.active {
    color: #fff;
    border-bottom-color: #22b9ff;
}

/* Profile dropdown body */
.lx-header .kt-header__topbar-item--user .kt-notification .kt-notification__item:hover {
    background: var(--lx-soft);
}
.lx-header .kt-header__topbar-item--user .kt-notification__custom .btn-label-brand {
    border-radius: 10px;
    padding: .45rem 1rem;
}

/* Rounded dropdown panels */
.lx-header .kt-header__topbar .dropdown-menu {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(10, 20, 60, .18);
}

@media (prefers-reduced-motion: reduce) {
    .lx-header .social-icon:hover {
        transform: none;
    }
}

/* "N new" counter in the notifications head: translucent pill instead of bright green */
.lx-dropdown-head .kt-head__title .btn {
    border: 0;
    border-radius: 999px;
    padding: .3rem .8rem;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}

/* ================= Floating "New Inquiry" button ================= */
/* Icon-only tab attached to the right edge, vertically centred:
   rounded on the left, flat on the right (flush with the screen edge). */
.lx-fab {
    position: fixed;
    right: 0;
    top: 50%;
    margin-top: -32px; /* half its height; transform is reserved for the animations */
    z-index: 1040; /* above page content, below Bootstrap modals (1050) */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 64px;
    padding-right: 4px;
    border-radius: 32px 0 0 32px;
    color: #fff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #5d78ff 0%, #1c368a 100%);
    box-shadow: -6px 10px 26px rgba(28, 54, 138, .35), 0 0 0 1px rgba(255, 255, 255, .12) inset;
    transition: transform .2s ease, box-shadow .2s ease;
    animation: lx-fab-in .5s cubic-bezier(.2, .9, .3, 1.2) both;
}
/* Soft glowing ring so the button is noticed without shouting */
.lx-fab::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(93, 120, 255, .55);
    animation: lx-fab-ring 2.8s ease-out infinite;
    pointer-events: none;
}
.lx-fab:hover {
    transform: translateX(-4px);
    box-shadow: -10px 14px 32px rgba(28, 54, 138, .45), 0 0 0 1px rgba(255, 255, 255, .18) inset;
}
.lx-fab:active {
    transform: translateX(-2px) scale(.98);
}
.lx-fab:focus-visible {
    outline: 3px solid rgba(93, 120, 255, .45);
    outline-offset: 3px;
}
.lx-fab__icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #1c368a;
    background: #fff;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(10, 20, 60, .2);
    transition: transform .3s ease;
}
.lx-fab__icon i {
    font-weight: 700;
}
.lx-fab:hover .lx-fab__icon {
    transform: rotate(90deg);
}

/* Chat page: light blue variant (theme primary #94DAFF) */
.lx-fab.lx-fab--light {
    background: linear-gradient(135deg, #b5e6ff 0%, #94daff 100%);
    box-shadow: -6px 10px 26px rgba(34, 185, 255, .35), 0 0 0 1px rgba(255, 255, 255, .4) inset;
}
.lx-fab.lx-fab--light:hover {
    box-shadow: -10px 14px 32px rgba(34, 185, 255, .45), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}
.lx-fab.lx-fab--light::before {
    animation-name: lx-fab-ring-light;
}
@keyframes lx-fab-ring-light {
    0% { box-shadow: 0 0 0 0 rgba(34, 185, 255, .55); }
    70% { box-shadow: 0 0 0 12px rgba(34, 185, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 185, 255, 0); }
}

@keyframes lx-fab-ring {
    0% { box-shadow: 0 0 0 0 rgba(93, 120, 255, .55); }
    70% { box-shadow: 0 0 0 12px rgba(93, 120, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(93, 120, 255, 0); }
}
@keyframes lx-fab-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}

/* Phones: a little smaller */
@media (max-width: 767px) {
    .lx-fab {
        width: 58px;
        height: 56px;
        margin-top: -28px;
        border-radius: 28px 0 0 28px;
    }
    .lx-fab__icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lx-fab,
    .lx-fab::before {
        animation: none;
    }
    .lx-fab:hover,
    .lx-fab:hover .lx-fab__icon {
        transform: none;
    }
}

/* Mobile account bar (opened by the "⋮" button): Metronic slides a single 50px row
   into view. Keep it on one row; social_icon.css lets it wrap, which pushed the
   avatar below the header and broke the bar. Social links stay on desktop. */
@media (max-width: 1024px) {
    .lx-header .kt-header__topbar {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: .35rem;
        padding: 0 15px;
    }
    .lx-header .kt-header__topbar > .kt-header__topbar-item:has(.social-icon),
    .lx-header .kt-header__topbar > .lx-topbar-divider {
        display: none;
    }
    .lx-header .kt-header__topbar .kt-header__topbar-item .kt-header__topbar-icon {
        width: 36px;
        height: 36px;
    }
}
