/* ============================================================================
 * Carerio Language Quest — trigger button only (HD-2D large globe)
 * Overlay/grid is left untouched (theme original).
 * ========================================================================== */

:root {
    --lq-cyan: #5dd4f0;
    --lq-teal: #2db8c8;
    --lq-deep: #0a3a4a;
    --lq-amber: #ffc060;
    --lq-amber-deep: #d97706;
    --lq-stroke: #0a1428;
    --lq-glow-cyan: rgba(93, 212, 240, 0.55);
    --lq-glow-amber: rgba(255, 192, 96, 0.55);
    --lq-radius-pill: 999px;
    --lq-out: cubic-bezier(.16, 1, .3, 1);
}

.lq-active .lang-btn {
    background: linear-gradient(180deg, #1a3c5e 0%, #0c2244 100%) !important;
    border: 0 !important;
    border-radius: var(--lq-radius-pill) !important;
    color: #fff !important;
    height: 50px !important;
    padding: 0 22px 0 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    box-shadow:
        0 0 0 2.5px var(--lq-stroke),
        0 5px 0 var(--lq-stroke),
        0 0 22px var(--lq-glow-cyan),
        0 10px 18px -2px rgba(10, 20, 40, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    animation: none !important;
    position: relative;
    overflow: hidden;
    transition: transform 160ms var(--lq-out), filter 160ms ease !important;
}
.lq-active .lang-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
    color: #fff !important;
    background: linear-gradient(180deg, #214c78 0%, #102d54 100%) !important;
    box-shadow:
        0 0 0 2.5px var(--lq-stroke),
        0 7px 0 var(--lq-stroke),
        0 0 30px var(--lq-glow-cyan),
        0 14px 24px -2px rgba(10, 20, 40, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.26) !important;
}
.lq-active .lang-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
    transform: translateX(-100%);
    pointer-events: none;
}
.lq-active .lang-btn:hover::after { animation: lq-shimmer 760ms ease-out; }
@keyframes lq-shimmer { to { transform: translateX(100%); } }

/* hide raw 🌐 emoji, replaced by SVG via JS */
.lq-active .lang-btn .lb-globe { display: none !important; }

/* Globe wrapper holds the SVG + orbiting satellite (positioned absolute around globe) */
.lq-active .lang-btn .lq-globe-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    overflow: visible;
}
.lq-active .lang-btn .lq-globe-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    /* gentle wobble + cloud drift instead of full Y-spin (avoids "becomes flat line" at 90°) */
    animation: lq-globe-wobble 6s ease-in-out infinite;
    filter:
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45))
        drop-shadow(0 0 8px var(--lq-glow-cyan));
    transform-origin: 50% 50%;
}
@keyframes lq-globe-wobble {
    0%, 100% { transform: rotate(-6deg) translateY(0); }
    50%      { transform: rotate(6deg)  translateY(-1px); }
}
/* satellite orbit dot */
.lq-active .lang-btn .lq-orbit {
    position: absolute;
    inset: -4px;
    pointer-events: none;
    animation: lq-orbit 3.4s linear infinite;
}
.lq-active .lang-btn .lq-orbit::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--lq-amber);
    box-shadow:
        0 0 6px var(--lq-glow-amber),
        inset -1px -1px 0 rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
}
@keyframes lq-orbit {
    from { transform: rotate(0); }
    to   { transform: rotate(360deg); }
}
/* internal cloud band drifts slowly across the globe */
.lq-active .lang-btn .lq-globe-svg .lq-cloud {
    animation: lq-cloud 8s linear infinite;
    transform-origin: 32px 32px;
}
@keyframes lq-cloud {
    from { transform: rotate(0); }
    to   { transform: rotate(360deg); }
}

.lq-active .lang-btn .lb-text {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4) !important;
    color: #fff !important;
}
.lq-active .lang-btn .lq-iso-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    padding: 3px 9px;
    background: linear-gradient(180deg, #ffe5a3 0%, var(--lq-amber) 60%, var(--lq-amber-deep) 100%);
    color: var(--lq-stroke);
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow:
        0 0 0 1.5px var(--lq-stroke),
        0 2px 0 var(--lq-amber-deep),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* mobile: ensure 44x44 minimum tap target (Apple HIG / Material) */
@media (max-width: 768px) {
    .lq-active .lang-btn {
        width: 50px !important;
        min-width: 50px !important;
        height: 50px !important;
        padding: 0 !important;
        justify-content: center !important;
        gap: 0 !important;
    }
    .lq-active .lang-btn .lq-globe-wrap { width: 38px; height: 38px; }
    .lq-active .lang-btn .lb-text { display: none !important; }
    .lq-active .lang-btn .lq-iso-badge {
        position: absolute;
        bottom: -4px;
        right: -4px;
        margin-left: 0;
        padding: 1px 5px;
        font-size: 9px;
        border-radius: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lq-active .lang-btn .lq-globe-svg,
    .lq-active .lang-btn .lq-orbit,
    .lq-active .lang-btn .lq-globe-svg .lq-cloud {
        animation: none !important;
    }
}
