/* OVERLAY */
    #ei-overlay {
        position: fixed;
        inset: 0;
        background: rgba(10, 0, 18, 0.88);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    #ei-overlay.active {
        opacity: 1;
        pointer-events: all;
    }

    /* POPUP */
    #ei-overlay #ei-popup {
        position: relative;
        width: min(520px, 100%);
        background: #1c0030;
        border: 1px solid rgba(145, 10, 103, 0.35);
        border-radius: 16px;
        overflow: hidden;
        transform: translateY(28px) scale(0.96);
        transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 0 0 1px rgba(255, 108, 44, 0.06), 0 28px 80px rgba(60, 7, 83, 0.85);
    }

    #ei-overlay.active #ei-popup {
        transform: translateY(0) scale(1);
    }

    /* shimmer top bar */
    #ei-overlay .ei-topbar {
        height: 3px;
        background: linear-gradient(90deg, #3C0753 0%, #720455 25%, #910A67 50%, #ff6c2c 75%, #910A67 100%);
        background-size: 200% 100%;
        animation: shimmer 2.8s linear infinite;
    }

    @keyframes shimmer {
        0% {
            background-position: 0% 0
        }

        100% {
            background-position: 200% 0
        }
    }

    /* HEADER */
    #ei-overlay .ei-header {
        background: linear-gradient(135deg, #3C0753 0%, #720455 55%, #910A67 100%);
        padding: 26px 30px 22px;
        position: relative;
        overflow: hidden;
    }

    #ei-overlay .ei-header::after {
        content: '';
        position: absolute;
        bottom: -50px;
        right: -50px;
        width: 130px;
        height: 130px;
        border-radius: 50%;
        background: rgba(255, 108, 44, 0.1);
        pointer-events: none;
    }

    #ei-overlay .ei-header::before {
        content: '';
        position: absolute;
        top: -40px;
        left: -40px;
        width: 110px;
        height: 110px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.04);
        pointer-events: none;
    }

    #ei-overlay #ei-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: rgba(255, 255, 255, 0.65);
        font-size: 15px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s, color 0.2s;
        font-family: 'Poppins', sans-serif;
        z-index: 3;
        line-height: 1;
    }

    #ei-overlay #ei-close:hover {
        background: rgba(255, 108, 44, 0.3);
        color: #fff;
    }

    #ei-overlay .ei-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(255, 108, 44, 0.18);
        border: 1px solid rgba(255, 108, 44, 0.38);
        border-radius: 20px;
        padding: 3px 12px;
        font-size: 10px;
        font-weight: 600;
        font-family: 'Poppins', sans-serif;
        color: #ffaa7a;
        letter-spacing: 0.09em;
        text-transform: uppercase;
        margin-bottom: 10px;
    }

    #ei-overlay .ei-badge-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #ff6c2c;
        animation: blink 1.4s ease infinite;
        flex-shrink: 0;
    }

    @keyframes blink {

        0%,
        100% {
            opacity: 1;
            transform: scale(1)
        }

        50% {
            opacity: 0.4;
            transform: scale(0.65)
        }
    }

    #ei-overlay .ei-title {
        font-family: 'Poppins', sans-serif;
        font-size: 30px;
        font-weight: 800;
        color: #fff;
        line-height: 1.3;
        margin-bottom: 6px;
    }

    #ei-overlay .ei-title em {
        color: #ff6c2c;
        font-style: normal;
    }

    /* BODY */
    #ei-overlay .ei-body {
        padding: 24px 30px 28px;
    }

    #ei-overlay .ei-label {
        font-family: 'Poppins', sans-serif;
        font-size: 12px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.8);
        letter-spacing: 0.07em;
        text-transform: uppercase;
        margin-bottom: 8px;
        display: block;
    }

    #ei-overlay .ei-search-wrap {
        position: relative;
        margin-bottom: 8px;
    }

    #ei-overlay .ei-search-wrap .si {
        position: absolute;
        left: 13px;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        stroke: rgba(255, 255, 255, 0.28);
        pointer-events: none;
    }

    #ei-overlay #ei-location-input {
        width: 100%;
        padding: 12px 14px 12px 40px;
        background: rgba(255, 255, 255, 0.05);
        border: 1.5px solid rgba(145, 10, 103, 0.35);
        border-radius: 10px;
        color: #fff;
        font-family: 'Poppins', sans-serif;
        font-size: 13.5px;
        font-weight: 400;
        outline: none;
        transition: border-color 0.2s, background 0.2s;
    }

    #ei-overlay #ei-location-input::placeholder {
        color: rgba(255, 255, 255, 0.22);
    }

    #ei-overlay #ei-location-input:focus {
        border-color: #910A67;
        background: rgba(145, 10, 103, 0.08);
    }

    #ei-overlay #ei-suggestions {
        background: #1a0028;
        border: 1px solid rgba(145, 10, 103, 0.28);
        border-radius: 10px;
        overflow: hidden;
        display: none;
        margin-bottom: 10px;
    }

    #ei-overlay .ei-sug-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        cursor: pointer;
        font-family: 'Poppins', sans-serif;
        font-size: 13px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.75);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.15s;
    }

    #ei-overlay .ei-sug-item:last-child {
        border-bottom: none;
    }

    #ei-overlay .ei-sug-item:hover {
        background: rgba(145, 10, 103, 0.2);
        color: #fff;
    }

    #ei-overlay .ei-sug-pin {
        width: 13px;
        height: 13px;
        stroke: #910A67;
        flex-shrink: 0;
    }

    #ei-overlay .ei-sug-dc {
        margin-left: auto;
        font-size: 11px;
        font-weight: 300;
        color: rgba(255, 255, 255, 0.32);
    }

    #ei-overlay #ei-result {
        display: none;
        background: rgba(145, 10, 103, 0.1);
        border: 1px solid rgba(145, 10, 103, 0.28);
        border-radius: 10px;
        padding: 12px 14px;
        font-family: 'Poppins', sans-serif;
        font-size: 12.5px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.6;
        margin-bottom: 14px;
    }

    #ei-overlay #ei-result strong {
        color: #ff6c2c;
        font-weight: 600;
    }

    #ei-overlay #ei-find-btn {
        width: 100%;
        padding: 13px 20px;
        background: linear-gradient(135deg, #720455 0%, #910A67 55%, #ff6c2c 100%);
        border: none;
        border-radius: 8px;
        color: #fff;
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: opacity 0.2s, transform 0.15s;
        margin-bottom: 16px;
        position: relative;
        overflow: hidden;
    }

    #ei-overlay #ei-find-btn::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 60%);
    }

    #ei-overlay #ei-find-btn:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

    #ei-overlay #ei-find-btn:active {
        transform: translateY(0);
    }

    #ei-overlay #ei-find-btn svg {
        width: 16px;
        height: 16px;
    }

    #ei-overlay .ei-divider {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
    }

    #ei-overlay .ei-divider::before,
    #ei-overlay .ei-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: rgba(255, 255, 255, 0.08);
    }

    #ei-overlay .ei-divider span {
        font-family: 'Poppins', sans-serif;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.48);
        font-weight: 400;
        white-space: nowrap;
    }

    #ei-overlay #ei-gps-btn {
        width: 100%;
        padding: 11px 14px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.8);
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        font-weight: 400;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: background 0.2s, border-color 0.2s, color 0.2s;
        margin-bottom: 20px;
    }

    #ei-overlay #ei-gps-btn:hover {
        background: rgba(145, 10, 103, 0.14);
        border-color: rgba(145, 10, 103, 0.4);
        color: #fff;
    }

    #ei-overlay #ei-gps-btn svg {
        width: 15px;
        height: 15px;
    }

    #ei-overlay .ei-regions-label {
        font-family: 'Poppins', sans-serif;
        font-size: 10.5px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.38);
        text-transform: uppercase;
        letter-spacing: 0.07em;
        margin-bottom: 10px;
    }

    #ei-overlay .ei-regions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
    }

    #ei-overlay .ei-region-chip {
        padding: 7px 13px;
        background: rgba(60, 7, 83, 0.5);
        border: 1px solid rgba(145, 10, 103, 0.35);
        border-radius: 6px;
        font-family: 'Poppins', sans-serif;
        font-size: 12px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.7);
        cursor: pointer;
        transition: background 0.18s, border-color 0.18s, color 0.18s;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    #ei-overlay .ei-region-chip:hover {
        background: rgba(145, 10, 103, 0.35);
        border-color: rgba(145, 10, 103, 0.65);
        color: #fff;
    }

    #ei-overlay .ei-skip {
        text-align: center;
    }

    #ei-overlay .ei-skip button {
        background: none;
        border: none;
        cursor: pointer;
        font-family: 'Poppins', sans-serif;
        font-size: 12px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.28);
        text-decoration: underline;
        transition: color 0.2s;
    }

    #ei-overlay .ei-skip button:hover {
        color: rgba(255, 255, 255, 0.55);
    }

    #ei-overlay #ei-timer-bar {
        position: absolute;
        bottom: 0;
        left: 0;
        height: 2px;
        background: linear-gradient(90deg, #3C0753, #ff6c2c);
        width: 100%;
        transform-origin: left;
        display: none;
        animation: shrink 45s linear forwards;
    }

    @keyframes shrink {
        from {
            transform: scaleX(1)
        }

        to {
            transform: scaleX(0)
        }
    }

    /* DEMO BACKDROP */
    #ei-overlay .demo-page {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 12px;
        padding: 40px;
        background:
            radial-gradient(ellipse 70% 40% at 50% 0%, rgba(60, 7, 83, 0.55) 0%, transparent 70%),
            radial-gradient(ellipse 45% 35% at 85% 85%, rgba(145, 10, 103, 0.25) 0%, transparent 60%),
            #12001e;
    }

    #ei-overlay .demo-page h1 {
        font-family: 'Poppins', sans-serif;
        font-size: clamp(22px, 5vw, 46px);
        font-weight: 800;
        color: #fff;
    }

    #ei-overlay .demo-page p {
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.38);
        max-width: 460px;
        line-height: 1.6;
    }

    #ei-overlay .demo-trigger {
        margin-top: 20px;
        padding: 12px 28px;
        background: linear-gradient(135deg, #720455, #910A67);
        border: none;
        border-radius: 8px;
        color: #fff;
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: opacity 0.2s;
    }

    #ei-overlay .demo-trigger:hover {
        opacity: 0.85;
    }

    #ei-overlay .demo-note {
        font-family: 'Poppins', sans-serif;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.2);
    }

    /* Scrollable suggestions */
    #ei-overlay #ei-suggestions {
        max-height: 220px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #910A67 rgba(255, 255, 255, 0.05);
    }

    #ei-overlay #ei-suggestions::-webkit-scrollbar {
        width: 5px;
    }

    #ei-overlay #ei-suggestions::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.04);
        border-radius: 4px;
    }

    #ei-overlay #ei-suggestions::-webkit-scrollbar-thumb {
        background: #910A67;
        border-radius: 4px;
    }

    #ei-overlay #ei-suggestions::-webkit-scrollbar-thumb:hover {
        background: #ff6c2c;
    }

    /* GPS spinner */
    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    /* ========================================================= 
       NEW: RESPONSIVE MEDIA QUERIES FOR POPUP 
       ========================================================= */
    @media (max-width: 576px) {
        #ei-overlay .ei-header {
            padding: 20px 20px 16px;
        }
        .ei-body {
            padding: 20px 20px 24px;
        }
        #ei-overlay .ei-title {
            font-size: 24px; /* Slightly smaller title */
        }
        #ei-overlay #ei-location-input {
            font-size: 13px;
            padding: 10px 14px 10px 36px;
        }
        #ei-overlay #ei-find-btn, #ei-gps-btn {
            padding: 11px 16px;
            font-size: 13px;
        }
        #ei-overlay .ei-region-chip {
            padding: 6px 10px;
            font-size: 11px;
        }
    }