/* Marco Imperial Carriage — all-language GTranslate mega selector */
#mic-language-switcher {
    --mic-gold: #d9a83e;
    --mic-gold-soft: #f4ce6a;
    --mic-black: #050505;
    --mic-navy: #071b2a;
    --mic-navy-2: #0a2435;
    --mic-border: rgba(217,168,62,.48);
    --mic-line: rgba(255,255,255,.12);
    z-index: 9999999;
    line-height: 1;
    font-family: inherit;
}
#mic-language-switcher.mic-language-loading { opacity: 0; pointer-events: none; }
#mic-language-switcher.mic-language-ready { opacity: 1; pointer-events: auto; transition: opacity .15s ease; }

#mic-language-switcher.mic-inline-header {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: auto;
    margin: 0 14px 0 0;
    flex: 0 0 auto;
}
#mic-language-switcher.mic-fixed-fallback {
    position: fixed;
    top: 18px;
    right: 22px;
}
body.admin-bar #mic-language-switcher.mic-fixed-fallback { top: 50px; }

/* GTranslate's real widget remains present only as the translation engine. */
#mic-language-switcher .mic-gt-engine {
    position: fixed !important;
    left: -10000px !important;
    top: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#mic-language-switcher .mic-language-trigger {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 86px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--mic-border);
    border-radius: 4px;
    background: rgba(6,6,6,.94);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .05em;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(0,0,0,.2);
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}
#mic-language-switcher .mic-language-trigger:hover,
#mic-language-switcher.is-open .mic-language-trigger {
    border-color: var(--mic-gold);
    color: var(--mic-gold-soft);
    background: #0d0c0a;
}
#mic-language-switcher .mic-trigger-flag,
#mic-language-switcher .mic-language-item img {
    display: block;
    width: 26px;
    height: 18px;
    object-fit: cover;
    flex: 0 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.22);
}
#mic-language-switcher .mic-trigger-code { min-width: 20px; text-align: left; }
#mic-language-switcher .mic-trigger-chevron {
    margin-left: 1px;
    color: var(--mic-gold-soft);
    font-size: 16px;
    transform: translateY(-1px);
    transition: transform .18s ease;
}
#mic-language-switcher.is-open .mic-trigger-chevron { transform: rotate(180deg) translateY(1px); }

/* Large premium panel, inspired by the Marco Global Ventures selector. */
#mic-language-switcher .mic-language-panel {
    display: none;
    position: fixed;
    width: min(500px, calc(100vw - 24px));
    max-height: min(72vh, 650px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 16px 16px;
    border: 1px solid rgba(217,168,62,.38);
    border-radius: 8px;
    background: linear-gradient(180deg, #081d2c 0%, #061724 100%);
    color: #fff;
    box-shadow: 0 24px 70px rgba(0,0,0,.52);
    z-index: 2147483000;
    scrollbar-width: thin;
    scrollbar-color: rgba(217,168,62,.55) rgba(255,255,255,.08);
}
#mic-language-switcher.is-open .mic-language-panel { display: block; }
#mic-language-switcher .mic-language-panel::-webkit-scrollbar { width: 9px; }
#mic-language-switcher .mic-language-panel::-webkit-scrollbar-track { background: rgba(255,255,255,.06); }
#mic-language-switcher .mic-language-panel::-webkit-scrollbar-thumb { background: rgba(217,168,62,.5); border-radius: 8px; }

#mic-language-switcher .mic-panel-head {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 17px 4px 14px;
    border-bottom: 1px solid var(--mic-line);
    background: linear-gradient(180deg, #081d2c 82%, rgba(8,29,44,.96) 100%);
}
#mic-language-switcher .mic-panel-head strong {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .01em;
}
#mic-language-switcher .mic-panel-head span {
    color: var(--mic-gold);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

#mic-language-switcher .mic-language-group { margin-top: 14px; }
#mic-language-switcher .mic-language-group-title {
    margin: 0 4px 9px;
    color: var(--mic-gold-soft);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
#mic-language-switcher .mic-language-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 10px;
}
#mic-language-switcher .mic-language-group-featured .mic-language-grid { gap: 8px 12px; }

#mic-language-switcher .mic-language-item {
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px 30px 8px 7px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #f7f7f7;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    text-align: left;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
#mic-language-switcher .mic-language-item:hover {
    background: rgba(255,255,255,.055);
    border-color: rgba(255,255,255,.08);
    color: var(--mic-gold-soft);
}
#mic-language-switcher .mic-language-item.is-current {
    background: rgba(217,168,62,.09);
    border-color: rgba(217,168,62,.58);
}
#mic-language-switcher .mic-language-name {
    overflow: hidden;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#mic-language-switcher .mic-language-code {
    color: rgba(255,255,255,.66);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}
#mic-language-switcher .mic-current-check {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mic-gold-soft);
    font-size: 16px;
    font-weight: 900;
}
#mic-language-switcher .mic-language-item.is-current .mic-current-check { display: block; }
#mic-language-switcher .mic-language-item.is-current .mic-language-code { visibility: hidden; }

#mic-language-switcher .mic-language-group-featured .mic-language-item {
    min-height: 46px;
    border-color: rgba(255,255,255,.07);
    background: rgba(255,255,255,.025);
}
#mic-language-switcher .mic-language-group-featured .mic-language-item.is-current {
    border-color: var(--mic-gold);
    background: rgba(217,168,62,.08);
}

@media (max-width: 1024px) {
    #mic-language-switcher.mic-inline-header { margin-right: 8px; }
    #mic-language-switcher .mic-language-panel { width: min(480px, calc(100vw - 20px)); }
}
@media (max-width: 767px) {
    #mic-language-switcher.mic-inline-header { margin: 8px 8px 8px 0; align-self: center; }
    #mic-language-switcher.mic-fixed-fallback { top: 12px; right: 12px; }
    body.admin-bar #mic-language-switcher.mic-fixed-fallback { top: 58px; }
    #mic-language-switcher .mic-language-trigger { min-width: 78px; height: 38px; padding: 0 9px; }
    #mic-language-switcher .mic-trigger-flag { width: 23px; height: 16px; }
    #mic-language-switcher .mic-language-panel {
        width: calc(100vw - 20px);
        max-height: 68vh;
        padding: 0 10px 12px;
        border-radius: 6px;
    }
    #mic-language-switcher .mic-panel-head { padding: 14px 3px 12px; }
    #mic-language-switcher .mic-panel-head span { font-size: 8px; }
    #mic-language-switcher .mic-language-grid { grid-template-columns: 1fr; gap: 4px; }
    #mic-language-switcher .mic-language-group-featured .mic-language-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
    #mic-language-switcher .mic-language-item { min-height: 40px; padding-left: 5px; }
    #mic-language-switcher .mic-language-name { font-size: 11px; }
}
@media (max-width: 430px) {
    #mic-language-switcher .mic-language-group-featured .mic-language-grid { grid-template-columns: 1fr; }
}
