/*
 * JaduGo v1.0.0 (Page Speed topic) — jadugo-shared.css
 * The ~18.6 KB of STATIC header CSS that used to be inlined in header.php
 * on EVERY page load. Now enqueued on every page (jadugo_enqueue_assets)
 * and browser-cached after the first visit. The 5 admin-configurable
 * color variables stay inline in header.php (per-site values).
 */
        /* Animated brand text — slides in from the right on page load / refresh (desktop only) */
        @keyframes jadugoBrandSlideIn {
            0%   { transform: translateX(-60px); opacity: 0; }
            60%  { transform: translateX(4px); opacity: 1; }
            100% { transform: translateX(0); opacity: 1; }
        }
        .jadugo-brand.animated .jadugo-brand-text {
            animation: jadugoBrandSlideIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
        }
        /* v4.0.0: Website logo in the header brand (Settings → Appearance → Website Logo)
           v1.7.0 (Topic 6) / v1.8.0 fix: WooCommerce ships a global image rule
           `.woocommerce img, .woocommerce-page img { height:auto; max-width:100% }`
           with (0,1,1) specificity — it BEAT the old `.jadugo-brand-logo`
           (0,1,0), so on the WooCommerce checkout page the logo suddenly grew
           to its huge intrinsic size, broke the 52px header row and fell below
           it. These scoped rules use higher specificity + !important so the
           header logo can never be blown up on ANY WooCommerce page or by any
           other plugin's global `img{height:auto!important}` reset. */
        .jadugo-header .jadugo-header-top .jadugo-brand .jadugo-brand-logo {
            height: 36px !important;
            width: auto !important;
            max-width: 140px !important;
            object-fit: contain !important;
            border-radius: 8px;
            display: block;
        }
        .jadugo-brand-logo {
            height: 36px !important;
            width: auto !important;
            max-width: 140px !important;
            object-fit: contain !important;
            border-radius: 8px;
            display: block;
        }
        /* v1.7.0 (Topic 6): the header row itself stays a fixed-height flex row
           — a huge image can never push it apart (extra safety for WC pages). */
        .jadugo-header-top { overflow: hidden; }
        .jadugo-header-top-inner { align-items: center; }
        .jadugo-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
        .jadugo-brand img { flex-shrink: 0; }
        @media (max-width: 768px) {
            /* v1.7.0: mobile height — same high specificity as the desktop rule
               above so WooCommerce img resets stay defeated on mobile too. */
            .jadugo-header .jadugo-header-top .jadugo-brand .jadugo-brand-logo { height: 28px !important; }
            .jadugo-brand-logo { height: 28px !important; }
            .jadugo-brand { gap: 7px; }
        }

        /* =====================================================================
           v5.0.0 REDESIGN — Slide-out menu (SHARED mobile + desktop panel)
           Opens from the LEFT. Gradient header with avatar + user name,
           colorful gradient icon tiles, staggered entrance, glassmorphism,
           blue/purple design language. Fully responsive on every breakpoint.
           ===================================================================== */
        .jadugo-nav-mobile {
            top: 0 !important;
            left: 0 !important;
            right: auto !important;
            width: 320px;
            max-width: 86vw;
            height: 100vh !important;
            max-height: 100vh;
            z-index: 9999 !important;
            transform: translateX(-105%);
            transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
            padding-bottom: 0;
            border-radius: 0 20px 20px 0;
            overflow-y: auto;
            overflow-x: hidden;
            background: #ffffff;
            box-shadow: 20px 0 60px rgba(15, 23, 42, 0.25);
        }
        .jadugo-nav-mobile.active { transform: translateX(0); }

        /* Overlay behind the slide-out menu */
        .jadugo-nav-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.45);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.35s ease;
            z-index: 9998;
        }
        .jadugo-nav-overlay.active { opacity: 1; pointer-events: auto; }

        /* --- Gradient menu header (brand + close) --- */
        .jadugo-nav-mobile-header {
            position: relative;
            padding: 20px 20px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            background: linear-gradient(135deg, var(--jadugo-primary, #2563EB) 0%, #4F46E5 55%, var(--jadugo-secondary, #7C3AED) 100%);
            overflow: hidden;
            border-radius: 0 20px 0 0;
        }
        .jadugo-nav-mobile-header::before {
            content: '';
            position: absolute;
            top: -40px; right: -30px;
            width: 140px; height: 140px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.12);
            pointer-events: none;
        }
        .jadugo-nav-mobile-header::after {
            content: '';
            position: absolute;
            bottom: -55px; right: 30px;
            width: 90px; height: 90px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            pointer-events: none;
        }
        .jadugo-nav-mobile-brand {
            color: #ffffff;
            font-size: 20px;
            font-weight: 800;
            letter-spacing: -0.4px;
            position: relative;
            z-index: 1;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .jadugo-nav-mobile-close {
            position: relative;
            z-index: 1;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.35);
            width: 38px;
            height: 38px;
            border-radius: 12px;
            cursor: pointer;
            color: #ffffff;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .jadugo-nav-mobile-close:hover {
            background: #ffffff;
            color: var(--jadugo-primary, #2563EB);
            transform: rotate(90deg) scale(1.06);
        }

        /* --- Logged-in user info block (avatar + name + premium chip) ---
           v5.1.0 (Topic 4): the whole card is now a LINK to the Profile page —
           clickable with cursor pointer + hover lift. */
        a.jadugo-nav-user, .jadugo-nav-user {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 16px 16px 6px;
            padding: 14px;
            border-radius: 16px;
            background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);
            border: 1px solid #DBEAFE;
            text-decoration: none;
            cursor: pointer;
            transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
        }
        .jadugo-nav-user:hover {
            transform: translateY(-2px) translateX(2px);
            box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
            border-color: #93C5FD;
        }
        .jadugo-nav-user:hover .jadugo-nav-user-name { color: var(--jadugo-primary, #2563EB); }
        .jadugo-nav-user .jadugo-nav-user-arrow {
            color: #94A3B8;
            font-size: 13px;
            flex-shrink: 0;
            transition: transform 0.25s ease, color 0.25s ease;
        }
        .jadugo-nav-user:hover .jadugo-nav-user-arrow { transform: translateX(3px); color: var(--jadugo-primary, #2563EB); }
        .jadugo-nav-user-avatar {
            width: 46px;
            height: 46px;
            border-radius: 50%;
            flex-shrink: 0;
            background: linear-gradient(135deg, var(--jadugo-primary, #2563EB), var(--jadugo-secondary, #7C3AED));
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-size: 18px;
            overflow: hidden;
            border: 2px solid #ffffff;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
        }
        .jadugo-nav-user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .jadugo-nav-user-text { min-width: 0; flex: 1; }
        .jadugo-nav-user-name {
            display: block;
            font-size: 14px;
            font-weight: 800;
            color: #0F172A;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .jadugo-nav-user-hello {
            display: block;
            font-size: 11px;
            font-weight: 600;
            color: #64748B;
            margin-top: 1px;
        }

        /* --- Menu items — gradient icon tiles + labels, hover slide --- */
        .jadugo-nav-mobile-link {
            display: flex !important;
            align-items: center;
            gap: 14px;
            padding: 11px 18px !important;
            margin: 5px 14px;
            border-radius: 14px;
            font-size: 14px;
            font-weight: 600;
            color: #334155;
            text-decoration: none;
            transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
            border-left: none !important;
            background: transparent;
            position: relative;
        }
        .jadugo-nav-mobile-link::before {
            content: '';
            position: absolute;
            left: 0; top: 50%;
            transform: translateY(-50%) scaleY(0);
            width: 4px; height: 60%;
            border-radius: 4px;
            background: linear-gradient(180deg, var(--jadugo-primary, #2563EB), var(--jadugo-secondary, #7C3AED));
            transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .jadugo-nav-mobile-link:hover,
        .jadugo-nav-mobile-link.active {
            background: linear-gradient(90deg, var(--jadugo-primary-light, #DBEAFE) 0%, #F5F3FF 60%, #ffffff 100%) !important;
            color: var(--jadugo-primary, #2563EB) !important;
            border-left: none !important;
            transform: translateX(6px);
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
        }
        .jadugo-nav-mobile-link:hover::before,
        .jadugo-nav-mobile-link.active::before { transform: translateY(-50%) scaleY(1); }
        /* Each link's icon sits inside a colorful gradient tile */
        .jadugo-nav-mobile-link .mv-nav-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 16px;
            flex-shrink: 0;
            box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
            transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
        }
        .jadugo-nav-mobile-link:hover .mv-nav-icon,
        .jadugo-nav-mobile-link.active .mv-nav-icon {
            transform: scale(1.12) rotate(-6deg);
            box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
        }
        /* v5.0.0: Blue/Purple gradient icon tiles (primary-first ordering) */
        .mv-nav-icon-dashboard { background: linear-gradient(135deg, #2563EB, #1E40AF); }
        .mv-nav-icon-links     { background: linear-gradient(135deg, #3B82F6, #2563EB); }
        /* v5.1.0 (Topic 4): Victim (leads) icon — purple changed to RED per admin request. */
        .mv-nav-icon-leads     { background: linear-gradient(135deg, #EF4444, #B91C1C); }
        .mv-nav-icon-profile   { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
        .mv-nav-icon-premium   { background: linear-gradient(135deg, #F59E0B, #D97706); }
        .mv-nav-icon-webcam    { background: linear-gradient(135deg, #EC4899, #BE185D); }
        .mv-nav-icon-contact   { background: linear-gradient(135deg, #06B6D4, #0891B2); }
        .mv-nav-icon-privacy   { background: linear-gradient(135deg, #10B981, #059669); }
        .mv-nav-icon-home      { background: linear-gradient(135deg, #2563EB, #7C3AED); }
        .mv-nav-icon-login     { background: linear-gradient(135deg, #10B981, #047857); }
        .mv-nav-icon-register  { background: linear-gradient(135deg, #7C3AED, #2563EB); }
        .mv-nav-icon-logout    { background: linear-gradient(135deg, #EF4444, #DC2626); }
        /* v1.0.1 (Topic 3): the App item — BLUE (android icon tile + blue label).
           It was green before; changed to blue per admin request. The link
           still opens websitename/app — the page the admin builds in
           WordPress with the slug "app". */
        .mv-nav-icon-app       { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
        .jadugo-nav-mobile-app { color: #2563EB !important; font-weight: 700; }
        .jadugo-nav-mobile-app:hover,
        .jadugo-nav-mobile-app.active {
            color: #1D4ED8 !important;
            background: linear-gradient(90deg, #DBEAFE 0%, #EFF6FF 60%, #ffffff 100%) !important;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
        }
        .jadugo-nav-mobile-app .mv-nav-icon { box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35); }
        .jadugo-nav-mobile-app:hover .mv-nav-icon,
        .jadugo-nav-mobile-app.active .mv-nav-icon { box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45); }

        /* v5.2.0 (Topic 7): MOBILE MENU SCROLL FIX — when the slide-out menu is
           open the PAGE behind it must never scroll; only the menu items inside
           .jadugo-nav-mobile scroll (it already has overflow-y:auto). Without
           this rule the body kept scrolling behind the open menu. */
        body.jadugo-nav-open { overflow: hidden !important; }
        html.jadugo-nav-open { overflow: hidden !important; }

        /* Staggered entrance: items slide in from the LEFT one after another */
        @keyframes jadugoMenuItemIn {
            from { opacity: 0; transform: translateX(-36px); }
            to   { opacity: 1; transform: translateX(0); }
        }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link,
        .jadugo-nav-mobile.active .jadugo-nav-user {
            animation: jadugoMenuItemIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
        }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(1)  { animation-delay: 0.06s; }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(2)  { animation-delay: 0.11s; }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(3)  { animation-delay: 0.16s; }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(4)  { animation-delay: 0.21s; }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(5)  { animation-delay: 0.26s; }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(6)  { animation-delay: 0.31s; }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(7)  { animation-delay: 0.36s; }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(8)  { animation-delay: 0.41s; }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(9)  { animation-delay: 0.46s; }
        .jadugo-nav-mobile.active .jadugo-nav-mobile-link:nth-child(10) { animation-delay: 0.51s; }

        .jadugo-nav-mobile-logout {
            margin-top: 10px !important;
            border-top: 1px solid #E2E8F0 !important;
            padding-top: 12px !important;
            margin-bottom: 18px !important;
        }
        .jadugo-nav-mobile-extra { opacity: 0.92; }

        /* === Mobile header (max-width:768px) === */
        @media (max-width: 768px) {
            .jadugo-header-top-inner {
                position: relative;
                justify-content: flex-start;
            }
            .jadugo-header-top .jadugo-brand {
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
            }
            .jadugo-header-top .jadugo-brand.animated .jadugo-brand-text {
                animation: none;
            }
            /* Hamburger stays left */
            .jadugo-hamburger { display: flex; }
            /* Hide the right-side spacer on mobile (we center the brand) */
            .jadugo-header-spacer { display: none; }
        }

        /* === Tablet / small desktop (769px–1024px) === */
        @media (min-width: 769px) and (max-width: 1024px) {
            .jadugo-nav-mobile { width: 300px; max-width: 75vw; }
        }

        /* === Desktop header (min-width:769px) === */
        @media (min-width: 769px) {
            /* Brand on LEFT, hamburger on TOP-RIGHT */
            .jadugo-header-top-inner {
                justify-content: space-between;
                position: relative;
            }
            .jadugo-header-top .jadugo-brand {
                order: 1;
                margin-right: auto;
            }
            .jadugo-header-spacer { display: none; }
            /* Hamburger visible on desktop too (top-right) */
            .jadugo-hamburger {
                display: flex;
                order: 2;
                width: 42px;
                height: 42px;
                padding: 6px;
                border-radius: 12px;
                background: linear-gradient(135deg, #EFF6FF, #F5F3FF);
                border: 1px solid #DBEAFE;
                transition: all 0.25s ease;
            }
            .jadugo-hamburger:hover {
                background: linear-gradient(135deg, var(--jadugo-primary-light, #DBEAFE), #EDE9FE);
                border-color: var(--jadugo-primary, #2563EB);
                box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
            }
            .jadugo-hamburger span {
                width: 20px;
                height: 2px;
                background: var(--jadugo-primary, #2563EB);
                border-radius: 2px;
            }
            /* Desktop menu slide-out — same shared panel, slightly wider */
            .jadugo-nav-mobile {
                width: 330px;
                max-width: 80vw;
            }
        }
