/**
 * Eddie's Ink — Ultra Luxury Language Switcher & Signature Lexicon Hover Tooltips
 * Responsive Dock Layout · Zero Overlapping Guarantee · Dark Luxury Aesthetics
 */

/* ══════════════════════════════════════════════════════════
   1. ULTRA LUXURY LANGUAGE SWITCHER (LEFT DOCK CAPSULE)
   ══════════════════════════════════════════════════════════ */
.eddies-lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    z-index: 100010;
    flex-shrink: 0;
}

.lang-current-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(14, 14, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    padding: 6px 14px;
    color: #f4f4f5;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    user-select: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    -webkit-tap-highlight-color: transparent;
}

.lang-current-btn:hover,
.lang-current-btn.is-active {
    background: rgba(22, 22, 28, 0.98);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(255, 255, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.lang-globe-icon {
    font-size: 12px;
    line-height: 1;
    opacity: 0.9;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.lang-code {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
}

.lang-arrow {
    font-size: 8px;
    opacity: 0.5;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-current-btn.is-active .lang-arrow {
    transform: rotate(180deg);
    opacity: 0.9;
    color: #ffffff;
}

/* Luxury Dropdown Menu Card */
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: auto;
    width: 185px;
    background: rgba(10, 10, 14, 0.97);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 8px 6px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 24px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    pointer-events: none;
    z-index: 100020;
}

.lang-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.lang-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    color: #a1a1aa;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-bottom: 2px;
}

.lang-option:last-child {
    margin-bottom: 0;
}

.lang-opt-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-dot {
    font-size: 9px;
    opacity: 0;
    color: #ffffff;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: scale(0.5);
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.lang-option:hover .lang-dot {
    opacity: 0.6;
    transform: scale(0.85);
}

.lang-option.is-selected {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-option.is-selected .lang-dot {
    opacity: 1;
    transform: scale(1);
}

.lang-option small {
    font-size: 10px;
    opacity: 0.55;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 700;
}

.lang-option.is-selected small {
    opacity: 0.9;
    color: #ffffff;
}

/* ══════════════════════════════════════════════════════════
   2. RESPONSIVE DOCK & MOBILE TUNING (NO OVERLAPPING)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .lang-current-btn {
        padding: 5px 10px;
        font-size: 10.5px;
        gap: 5px;
    }
    .lang-globe-icon {
        font-size: 11px;
    }
    .lang-dropdown-menu {
        width: 165px;
        top: calc(100% + 6px);
        padding: 6px 4px;
    }
    .lang-option {
        padding: 8px 10px;
        font-size: 11.5px;
    }
}

/* ══════════════════════════════════════════════════════════
   3. SIGNATURE LEXICON: PROTECTED TERMS & LUXURY TOOLTIPS
   ══════════════════════════════════════════════════════════ */
.eddies-glossary-term {
    position: relative;
    display: inline;
    cursor: help !important;
    border-bottom: 1.5px dotted rgba(255, 255, 255, 0.85);
    transition: border-color 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
    font-style: inherit;
    font-weight: inherit;
}

.eddies-glossary-term:hover,
.eddies-glossary-term.active-touch {
    color: #ffffff !important;
    border-bottom-color: #ffffff !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.eddies-keyword {
    display: inline;
    font-style: inherit;
    font-weight: inherit;
    color: inherit;
}

.eddies-protected-only {
    display: inline;
    cursor: inherit;
    border-bottom: none !important;
    text-decoration: none !important;
}

.eddies-glossary-tooltip {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════
   FLOATING CURSOR DICTIONARY TOOLTIP (GLASS.DARK)
   Follows cursor, clamped within viewport margins, zero overflow
   ══════════════════════════════════════════════════════════ */
#eddies-floating-glossary-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147483647;
    width: 320px;
    max-width: calc(100vw - 32px);
    pointer-events: none !important;
    user-select: none;
    padding: 16px 20px;
    border-radius: 12px;
    color: #e4e4e7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12.5px;
    line-height: 1.55;
    text-align: left;
    box-sizing: border-box;

    /* Glass.Dark Exact Navigation Properties */
    background: rgba(0, 0, 0, 0.65);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
    backdrop-filter: blur(25px) saturate(140%);
    -webkit-backdrop-filter: blur(25px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);

    opacity: 0;
    visibility: hidden;
    transform: scale(0.96);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s ease;
}

#eddies-floating-glossary-tooltip.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

#eddies-floating-glossary-tooltip .tooltip-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 3px 8px;
    margin-bottom: 8px;
}

#eddies-floating-glossary-tooltip .tooltip-title {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-family: inherit;
}

#eddies-floating-glossary-tooltip .tooltip-desc {
    color: #d4d4d8;
    font-size: 12.5px;
    line-height: 1.5;
    display: block;
}

.eddies-glossary-term.align-right:hover .eddies-glossary-tooltip,
.eddies-glossary-term.align-right.active-touch .eddies-glossary-tooltip {
    transform: translateX(0) translateY(0);
}

.tooltip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.tooltip-title {
    display: block;
    font-family: 'Cinzel', serif, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.tooltip-desc {
    display: block;
    font-size: 11.5px;
    color: #d4d4d8;
    line-height: 1.55;
}
