/* ============================================================
   WP Universal Translator v8.0
   Complete stylesheet — Floating Widget + Menu Switcher + Inline Shortcodes
   ============================================================ */

/* ── Reset for all WUT elements ─────────────────────────── */
#wut-widget, #wut-widget *,
#wut-widget *::before, #wut-widget *::after,
#wut-toast-wrap, #wut-toast-wrap *,
.wut-menu-switcher, .wut-menu-switcher *,
.wut-menu-switcher *::before, .wut-menu-switcher *::after,
.wut-switcher-block, .wut-switcher-block *,
.wut-switcher-block *::before, .wut-switcher-block *::after,
.wut-inline-btn, .wut-inline-btn *  {
    box-sizing: border-box;
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════
   FLOATING WIDGET ROOT
   ═══════════════════════════════════════════════════════════ */
#wut-widget {
    position: fixed;
    z-index:  999999;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#wut-widget.pos-bottom-right { bottom: 24px; right: 24px; }
#wut-widget.pos-bottom-left  { bottom: 24px; left:  24px; }
#wut-widget.pos-top-right    { top:    24px; right: 24px; }
#wut-widget.pos-top-left     { top:    24px; left:  24px; }

/* ═══════════════════════════════════════════════════════════
   FLOATING TRIGGER BUTTON
   ═══════════════════════════════════════════════════════════ */
#wut-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
    cursor:          pointer;
    border:          none;
    outline:         none;
    font-weight:     700;
    font-size:       14px;
    white-space:     nowrap;
    overflow:        hidden;
    position:        relative;
    transition:      transform 0.22s cubic-bezier(.34,1.56,.64,1),
                     box-shadow 0.2s ease,
                     filter 0.2s ease;
    box-shadow:      0 4px 20px rgba(0,0,0,0.22), 0 1px 6px rgba(0,0,0,0.1);
}
#wut-btn::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 55%);
    pointer-events: none;
}

#wut-widget.size-small  #wut-btn { height: 38px; padding: 0 14px; font-size: 12px; gap: 6px; }
#wut-widget.size-medium #wut-btn { height: 46px; padding: 0 20px; font-size: 14px; }
#wut-widget.size-large  #wut-btn { height: 56px; padding: 0 26px; font-size: 16px; }

#wut-widget.shape-round  #wut-btn { border-radius: 999px; }
#wut-widget.shape-pill   #wut-btn { border-radius: 30px; }
#wut-widget.shape-square #wut-btn { border-radius: 12px; }

#wut-btn:hover  { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 30px rgba(0,0,0,0.25); filter: brightness(1.08); }
#wut-btn:active { transform: translateY(-1px) scale(0.98); }

#wut-btn-icon {
    font-size: 1.2em;
    line-height: 1;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
#wut-widget.is-open #wut-btn-icon { transform: rotate(20deg) scale(1.1); }

/* ═══════════════════════════════════════════════════════════
   FLOATING DROPDOWN PANEL
   ═══════════════════════════════════════════════════════════ */
#wut-panel {
    position:      absolute;
    width:         250px;
    background:    #ffffff;
    border-radius: 18px;
    box-shadow:    0 24px 60px rgba(0,0,0,0.18),
                   0  6px 18px rgba(0,0,0,0.09),
                   0  0   0 1px rgba(0,0,0,0.05);
    overflow:      hidden;
    display:       none;
    will-change:   transform, opacity;
}

.pos-bottom-right #wut-panel,
.pos-bottom-left  #wut-panel { bottom: calc(100% + 12px); }
.pos-top-right    #wut-panel,
.pos-top-left     #wut-panel { top:    calc(100% + 12px); }
.pos-bottom-right #wut-panel,
.pos-top-right    #wut-panel { right: 0; }
.pos-bottom-left  #wut-panel,
.pos-top-left     #wut-panel { left:  0; }

/* Animations */
#wut-widget.anim-fade  #wut-panel {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(.34,1.56,.64,1);
}
#wut-widget.anim-slide #wut-panel {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    transition: opacity 0.2s ease, transform 0.28s cubic-bezier(.34,1.56,.64,1);
}
#wut-widget.anim-none #wut-panel { transition: none; }

#wut-widget.pos-top-right #wut-panel,
#wut-widget.pos-top-left  #wut-panel { transform: translateY(-14px) scale(0.97); }

#wut-widget.is-open.anim-fade  #wut-panel,
#wut-widget.is-open.anim-slide #wut-panel {
    opacity:   1;
    transform: scale(1) translateY(0) !important;
}

/* Panel Header */
#wut-panel-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         14px 14px 12px;
    background:      linear-gradient(135deg, #f5f7ff 0%, #eef1fe 100%);
    border-bottom:   1px solid #e8eaf6;
}
#wut-panel-title {
    font-size:      10px;
    font-weight:    800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color:          #8b90b8;
}
#wut-close-btn {
    width:  26px; height: 26px;
    border: none; border-radius: 50%;
    background:  rgba(0,0,0,0.07);
    color:       #777;
    font-size:   12px;
    cursor:      pointer;
    display:     flex;
    align-items: center;
    justify-content: center;
    transition:  background 0.15s, color 0.15s, transform 0.22s;
    line-height: 1;
    flex-shrink: 0;
}
#wut-close-btn:hover { background: rgba(0,0,0,0.14); color: #111; transform: rotate(90deg); }

/* ═══════════════════════════════════════════════════════════
   FLOATING LANGUAGE LIST
   ═══════════════════════════════════════════════════════════ */
#wut-lang-list {
    list-style:      none;
    padding:         8px;
    margin:          0;
    max-height:      360px;
    overflow-y:      auto;
    display:         flex;
    flex-direction:  column;
    gap:             3px;
    scrollbar-width: thin;
    scrollbar-color: #dde1f0 transparent;
}
#wut-lang-list::-webkit-scrollbar       { width: 3px; }
#wut-lang-list::-webkit-scrollbar-thumb { background: #dde1f0; border-radius: 3px; }
#wut-lang-list li { display: block; width: 100%; }

.wut-lang-btn {
    display:      flex;
    align-items:  center;
    gap:          10px;
    width:        100%;
    height:       42px;
    padding:      0 12px;
    background:   #f5f6fc;
    border:       1.5px solid transparent;
    border-radius: 10px;
    cursor:       pointer;
    font-size:    13px;
    font-weight:  500;
    font-family:  inherit;
    color:        #2d3047;
    transition:   background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
    overflow:     hidden;
    white-space:  nowrap;
    flex-shrink:  0;
}
.wut-lang-btn:hover {
    background:   #eaecfb;
    border-color: rgba(99,102,241,0.3);
    color:        #3730a3;
    transform:    translateX(3px);
    box-shadow:   0 2px 10px rgba(99,102,241,0.12);
}
.wut-lang-btn:active { transform: translateX(1px); }
.wut-lang-btn.active {
    background:  linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: #4338ca;
    color:        #ffffff;
    font-weight:  700;
    box-shadow:   0 3px 16px rgba(99,102,241,0.38);
    transform:    translateX(3px);
}
.wut-lang-btn.active:hover { filter: brightness(1.1); }

.wut-lang-flag { font-size: 17px; line-height: 1; flex-shrink: 0; width: 22px; text-align: center; }
.wut-lang-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.wut-lang-tick {
    font-size: 11px; font-weight: 900;
    opacity: 0; transform: scale(0);
    transition: all 0.18s ease;
    flex-shrink: 0;
    margin-left: auto;
    color: rgba(255,255,255,0.9);
}
.wut-lang-btn.active .wut-lang-tick { opacity: 1; transform: scale(1); }

/* Show Original */
#wut-original-btn {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             7px;
    width:           calc(100% - 16px);
    height:          38px;
    margin:          2px 8px 8px;
    padding:         0 12px;
    background:      transparent;
    border:          1.5px dashed #dde1f0;
    border-radius:   10px;
    cursor:          pointer;
    font-size:       12px;
    font-weight:     600;
    font-family:     inherit;
    color:           #9095b0;
    transition:      all 0.15s;
    letter-spacing:  0.02em;
    white-space:     nowrap;
}
#wut-original-btn:hover { background: #fff5f5; border-color: #fca5a5; color: #ef4444; }
#wut-original-btn.is-active { background: #fff5f5; border-color: #f87171; color: #dc2626; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════════════════ */
#wut-toast-wrap {
    position:       fixed;
    z-index:        9999999;
    bottom:         90px;
    left:           50%;
    transform:      translateX(-50%);
    pointer-events: none;
    width:          max-content;
    max-width:      calc(100vw - 32px);
}
#wut-toast {
    display:       none;
    align-items:   center;
    gap:           9px;
    padding:       11px 22px;
    border-radius: 50px;
    font-size:     13px;
    font-weight:   600;
    font-family:   inherit;
    box-shadow:    0 8px 30px rgba(0,0,0,0.2);
    animation:     wut-toast-in 0.22s ease;
    white-space:   nowrap;
}
#wut-toast.show            { display: flex; background: rgba(26,36,110,0.95); color: #fff; }
#wut-toast.show.is-error   { background: rgba(185,28,28,0.95); }
#wut-toast.show.is-warning { background: rgba(120,80,10,0.95); }

.wut-spinner {
    width: 15px; height: 15px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wut-spin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes wut-spin     { to { transform: rotate(360deg); } }
@keyframes wut-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════
   SHORTCODE 1 — [wut_translator] INLINE BUTTON
   ═══════════════════════════════════════════════════════════ */
.wut-inline-btn {
    display:       inline-flex;
    align-items:   center;
    gap:           8px;
    padding:       11px 22px;
    background:    linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    color:         #ffffff;
    border:        none;
    border-radius: 50px;
    font-size:     14px;
    font-weight:   700;
    font-family:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    cursor:        pointer;
    box-shadow:    0 4px 16px rgba(99,102,241,0.38), 0 1px 4px rgba(0,0,0,0.08);
    transition:    transform 0.22s cubic-bezier(.34,1.56,.64,1),
                   box-shadow 0.2s ease,
                   filter 0.2s ease;
    text-decoration: none;
    position:      relative;
    overflow:      hidden;
    white-space:   nowrap;
    user-select:   none;
    -webkit-tap-highlight-color: transparent;
}
.wut-inline-btn::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 55%);
    pointer-events: none;
}
.wut-inline-btn:hover {
    transform:  translateY(-3px) scale(1.03);
    box-shadow: 0 8px 24px rgba(99,102,241,0.48);
    filter:     brightness(1.08);
    color:      #ffffff;
    text-decoration: none;
}
.wut-inline-btn:active { transform: translateY(-1px) scale(0.98); }

/* ═══════════════════════════════════════════════════════════
   SHORTCODE 2 — [wut_switcher] INLINE LANGUAGE PANEL
   ═══════════════════════════════════════════════════════════ */
.wut-switcher-block {
    display:       block;
    background:    #ffffff;
    border:        1.5px solid #e8eaf5;
    border-radius: 16px;
    padding:       18px 20px 16px;
    margin:        20px 0;
    box-shadow:    0 4px 24px rgba(99,102,241,0.08),
                   0 1px 6px rgba(0,0,0,0.04);
    font-family:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.wut-switcher-header {
    display:      flex;
    align-items:  center;
    gap:          10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2fd;
}
.wut-switcher-globe {
    font-size:   20px;
    line-height: 1;
    flex-shrink: 0;
}
.wut-switcher-title {
    font-size:   13px;
    font-weight: 700;
    color:       #4338ca;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.wut-switcher-current {
    margin-left: auto;
    font-size:   12px;
    font-weight: 600;
    color:       #9ca3af;
    background:  #f3f4f6;
    padding:     4px 12px;
    border-radius: 20px;
    transition:  all 0.2s;
    white-space: nowrap;
}
.wut-switcher-current.wut-has-lang {
    color:      #ffffff;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.wut-switcher-langs {
    display:   flex;
    flex-wrap: wrap;
    gap:       7px;
    margin-bottom: 12px;
}

.wut-sw-lang-btn {
    display:      inline-flex;
    align-items:  center;
    gap:          6px;
    padding:      7px 14px;
    background:   #f5f6fc;
    border:       1.5px solid #e8eaf5;
    border-radius: 50px;
    cursor:       pointer;
    font-size:    13px;
    font-weight:  500;
    font-family:  inherit;
    color:        #374151;
    transition:   all 0.18s ease;
    user-select:  none;
    -webkit-tap-highlight-color: transparent;
    white-space:  nowrap;
}
.wut-sw-lang-btn:hover {
    background:   #eaecfb;
    border-color: rgba(99,102,241,0.35);
    color:        #3730a3;
    transform:    translateY(-2px);
    box-shadow:   0 3px 12px rgba(99,102,241,0.15);
}
.wut-sw-lang-btn:active { transform: translateY(0); }
.wut-sw-lang-btn.active {
    background:   linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: #4338ca;
    color:        #ffffff;
    font-weight:  700;
    box-shadow:   0 3px 14px rgba(99,102,241,0.35);
    transform:    translateY(-2px);
}
.wut-sw-lang-btn.wut-sw-default {
    background:  #f0fdf4;
    border-color: #86efac;
    color:        #166534;
}
.wut-sw-lang-btn.wut-sw-default.active,
.wut-sw-lang-btn.wut-sw-default:hover {
    background:   #22c55e;
    border-color: #16a34a;
    color:        #fff;
}

.wut-sw-flag { font-size: 16px; line-height: 1; }
.wut-sw-name { font-size: 13px; }
.wut-sw-tick { font-size: 11px; font-weight: 900; opacity: 0; transform: scale(0); transition: all 0.18s; }
.wut-sw-lang-btn.active .wut-sw-tick { opacity: 1; transform: scale(1); }

.wut-sw-restore-btn {
    display:     inline-flex;
    align-items: center;
    gap:         6px;
    padding:     6px 14px;
    background:  transparent;
    border:      1.5px dashed #e5e7eb;
    border-radius: 50px;
    cursor:      pointer;
    font-size:   12px;
    font-weight: 600;
    font-family: inherit;
    color:       #9ca3af;
    transition:  all 0.15s;
    white-space: nowrap;
}
.wut-sw-restore-btn:hover { background: #fff5f5; border-color: #fca5a5; color: #ef4444; }

/* ═══════════════════════════════════════════════════════════
   HEADER MENU LANGUAGE SWITCHER
   ═══════════════════════════════════════════════════════════ */
li.wut-menu-item {
    list-style:  none !important;
    display:     flex !important;
    align-items: center !important;
    position:    relative;
}

.wut-menu-switcher {
    position:    relative;
    display:     inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Menu trigger button */
.wut-menu-btn {
    display:      inline-flex;
    align-items:  center;
    gap:          6px;
    padding:      7px 14px;
    background:   transparent;
    border:       1.5px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    cursor:       pointer;
    font-size:    13px;
    font-weight:  600;
    font-family:  inherit;
    color:        inherit;
    transition:   all 0.18s ease;
    white-space:  nowrap;
    user-select:  none;
    -webkit-tap-highlight-color: transparent;
    line-height:  1.4;
}
.wut-menu-btn:hover {
    background:   rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.4);
    color:        #4338ca;
}
.wut-menu-btn[aria-expanded="true"] {
    background:   rgba(99,102,241,0.12);
    border-color: #6366f1;
    color:        #4338ca;
}
/* If the menu has a dark background, let the button be light */
.dark-nav .wut-menu-btn,
nav[style*="background:#"] .wut-menu-btn { color: inherit; }

.wut-menu-icon    { font-size: 16px; line-height: 1; }
.wut-menu-label   { font-size: 13px; font-weight: 600; }
.wut-menu-chevron {
    font-size:  10px;
    transition: transform 0.25s ease;
    display:    inline-block;
    opacity:    0.6;
    margin-left: 2px;
}
.wut-menu-btn[aria-expanded="true"] .wut-menu-chevron { transform: rotate(180deg); opacity: 1; }

/* Dropdown panel */
.wut-menu-dropdown {
    position:      absolute;
    top:           calc(100% + 8px);
    right:         0;
    min-width:     200px;
    max-width:     240px;
    background:    #ffffff;
    border-radius: 14px;
    box-shadow:    0 16px 48px rgba(0,0,0,0.15),
                   0  4px 14px rgba(0,0,0,0.08),
                   0  0  0 1px rgba(0,0,0,0.05);
    overflow:      hidden;
    z-index:       999998;
    /* Hidden state */
    opacity:       0;
    transform:     translateY(-8px) scale(0.96);
    pointer-events: none;
    transition:    opacity 0.2s ease,
                   transform 0.22s cubic-bezier(.34,1.56,.64,1);
}
.wut-menu-dropdown.is-open {
    opacity:        1;
    transform:      translateY(0) scale(1);
    pointer-events: auto;
}

.wut-menu-dd-header {
    padding:     10px 14px 8px;
    font-size:   10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color:       #8b90b8;
    background:  linear-gradient(135deg, #f5f7ff 0%, #eef1fe 100%);
    border-bottom: 1px solid #e8eaf6;
}

.wut-menu-lang-list {
    padding:    6px;
    max-height: 320px;
    overflow-y: auto;
    display:    flex;
    flex-direction: column;
    gap:        2px;
    scrollbar-width: thin;
    scrollbar-color: #dde1f0 transparent;
}
.wut-menu-lang-list::-webkit-scrollbar       { width: 3px; }
.wut-menu-lang-list::-webkit-scrollbar-thumb { background: #dde1f0; border-radius: 3px; }

.wut-menu-lang-btn {
    display:      flex;
    align-items:  center;
    gap:          9px;
    width:        100%;
    height:       40px;
    padding:      0 10px;
    background:   transparent;
    border:       1.5px solid transparent;
    border-radius: 9px;
    cursor:       pointer;
    font-size:    13px;
    font-weight:  500;
    font-family:  inherit;
    color:        #2d3047;
    transition:   all 0.15s ease;
    white-space:  nowrap;
    overflow:     hidden;
    text-align:   left;
}
.wut-menu-lang-btn:hover {
    background:   #eaecfb;
    border-color: rgba(99,102,241,0.25);
    color:        #3730a3;
    transform:    translateX(3px);
}
.wut-menu-lang-btn.active {
    background:   linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: #4338ca;
    color:        #ffffff;
    font-weight:  700;
    transform:    translateX(3px);
}

.wut-menu-flag { font-size: 16px; line-height: 1; flex-shrink: 0; width: 20px; text-align: center; }
.wut-menu-name { flex: 1; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.wut-menu-tick {
    font-size: 11px; font-weight: 900;
    opacity: 0; transform: scale(0);
    transition: all 0.18s;
    margin-left: auto; flex-shrink: 0;
    color: rgba(255,255,255,0.9);
}
.wut-menu-lang-btn.active .wut-menu-tick { opacity: 1; transform: scale(1); }

.wut-menu-restore {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             7px;
    width:           calc(100% - 12px);
    height:          36px;
    margin:          2px 6px 6px;
    padding:         0 10px;
    background:      transparent;
    border:          1.5px dashed #dde1f0;
    border-radius:   9px;
    cursor:          pointer;
    font-size:       12px;
    font-weight:     600;
    font-family:     inherit;
    color:           #9095b0;
    transition:      all 0.15s;
    white-space:     nowrap;
    text-align:      center;
}
.wut-menu-restore:hover { background: #fff5f5; border-color: #fca5a5; color: #ef4444; }

/* ═══════════════════════════════════════════════════════════
   RTL SUPPORT
   ═══════════════════════════════════════════════════════════ */
[dir="rtl"] #wut-widget.pos-bottom-right { right: auto; left:  24px; }
[dir="rtl"] #wut-widget.pos-bottom-left  { left:  auto; right: 24px; }
[dir="rtl"] #wut-widget.pos-top-right    { right: auto; left:  24px; }
[dir="rtl"] #wut-widget.pos-top-left     { left:  auto; right: 24px; }
[dir="rtl"] .wut-lang-btn:hover,
[dir="rtl"] .wut-lang-btn.active,
[dir="rtl"] .wut-menu-lang-btn:hover,
[dir="rtl"] .wut-menu-lang-btn.active    { transform: translateX(-3px); }
[dir="rtl"] .wut-menu-dropdown           { right: auto; left: 0; }

/* ═══════════════════════════════════════════════════════════
   MOBILE — Bottom sheet
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 520px) {

    #wut-widget.pos-bottom-right { bottom: 16px; right: 16px; }
    #wut-widget.pos-bottom-left  { bottom: 16px; left:  16px; }
    #wut-widget.pos-top-right    { top:    16px; right: 16px; }
    #wut-widget.pos-top-left     { top:    16px; left:  16px; }

    /* Bottom sheet for floating panel */
    #wut-panel {
        position:      fixed !important;
        bottom:        0 !important;
        left:          0 !important;
        right:         0 !important;
        top:           auto !important;
        width:         100% !important;
        border-radius: 22px 22px 0 0 !important;
        box-shadow:    0 -8px 50px rgba(0,0,0,0.18) !important;
        transform:     translateY(100%) !important;
        transition:    transform 0.3s cubic-bezier(0.32,0.72,0,1) !important;
        opacity:       1 !important;
    }
    #wut-widget.is-open.anim-fade  #wut-panel,
    #wut-widget.is-open.anim-slide #wut-panel,
    #wut-widget.is-open.anim-none  #wut-panel {
        transform: translateY(0) !important;
        opacity:   1 !important;
    }

    /* Pull indicator */
    #wut-panel-header { position: relative; padding-top: 22px; }
    #wut-panel-header::before {
        content:       '';
        position:      absolute;
        top:           10px; left: 50%;
        transform:     translateX(-50%);
        width:         36px; height: 4px;
        background:    rgba(0,0,0,0.13);
        border-radius: 2px;
    }

    /* Larger touch targets */
    #wut-lang-list { max-height: 58vh; }
    .wut-lang-btn  { height: 46px; }

    /* Backdrop */
    #wut-widget.is-open::before {
        content:    '';
        position:   fixed; inset: 0;
        background: rgba(0,0,0,0.4);
        z-index:    -1;
        animation:  wut-bd-in 0.2s ease forwards;
    }
    @keyframes wut-bd-in { from { opacity: 0; } to { opacity: 1; } }

    #wut-toast-wrap { bottom: auto; top: 18px; }

    /* Inline switcher on mobile */
    .wut-switcher-langs    { gap: 5px; }
    .wut-sw-lang-btn       { padding: 6px 11px; font-size: 12px; }

    /* Menu dropdown - full width on mobile */
    .wut-menu-dropdown {
        right: auto; left: 0;
        min-width: 90vw;
        max-width: 92vw;
    }
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    #wut-panel,
    .wut-menu-dropdown,
    .wut-switcher-block {
        background: #1e2130;
        border-color: #2d3148;
        color: #e2e8f0;
    }
    #wut-panel-header,
    .wut-menu-dd-header { background: linear-gradient(135deg, #252840 0%, #1e2130 100%); border-bottom-color: #2d3148; }
    #wut-panel-title,
    .wut-menu-dd-header { color: #6b7aad; }
    .wut-lang-btn,
    .wut-menu-lang-btn  { background: #252840; color: #c8d0ec; border-color: transparent; }
    .wut-lang-btn:hover,
    .wut-menu-lang-btn:hover { background: #2d3462; border-color: rgba(99,102,241,0.4); color: #a5b4fc; }
    .wut-switcher-header { border-bottom-color: #2d3148; }
    .wut-sw-lang-btn     { background: #252840; border-color: #2d3148; color: #c8d0ec; }
    .wut-sw-lang-btn:hover { background: #2d3462; color: #a5b4fc; }
    .wut-switcher-current { background: #252840; color: #6b7aad; }
    #wut-original-btn,
    .wut-sw-restore-btn,
    .wut-menu-restore    { border-color: #2d3148; color: #6b7aad; }
}
