/* ══════════════════════════════════════
   RAD Lang — Frontend Styles
   ══════════════════════════════════════ */

.rad-lang-switcher {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
}

.rad-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    opacity: 0.6;
}

.rad-lang-flag:hover {
    opacity: 1;
    background: #f1f5f9;
    transform: scale(1.1);
}

.rad-lang-flag.rad-lang-active {
    opacity: 1;
    background: #eff6ff;
    box-shadow: 0 0 0 2px #3b82f6;
}

.rad-lang-emoji {
    font-size: 20px;
    line-height: 1;
}

/* Fixed position widget */
.rad-lang-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
}

/* Horizontal variant */
.rad-lang-switcher.rad-lang-horizontal {
    flex-direction: row;
}

/* Vertical variant */
.rad-lang-switcher.rad-lang-vertical {
    flex-direction: column;
}

/* ══════════════════════════════════════
   Floating Language Widget
   ══════════════════════════════════════ */

.rad-lang-floating-widget {
    position: fixed;
    z-index: 99999;
}

.rad-lang-floating-bottom-right { bottom: 24px; right: 24px; }
.rad-lang-floating-bottom-left  { bottom: 24px; left: 24px; }
.rad-lang-floating-top-right    { top: 24px; right: 24px; }
.rad-lang-floating-top-left     { top: 24px; left: 24px; }

.rad-lang-floating-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    font-size: 26px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rad-lang-floating-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.rad-lang-floating-dropdown {
    display: none;
    position: absolute;
    bottom: 60px;
    right: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    padding: 8px 0;
}

/* Adjust dropdown position for top placements */
.rad-lang-floating-top-right .rad-lang-floating-dropdown,
.rad-lang-floating-top-left .rad-lang-floating-dropdown {
    bottom: auto;
    top: 60px;
}

/* Adjust dropdown alignment for left placements */
.rad-lang-floating-bottom-left .rad-lang-floating-dropdown,
.rad-lang-floating-top-left .rad-lang-floating-dropdown {
    right: auto;
    left: 0;
}

.rad-lang-floating-dropdown.rad-lang-floating-open {
    display: block;
    animation: radLangFadeIn 0.2s ease-out;
}

@keyframes radLangFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rad-lang-floating-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    transition: background 0.15s;
}

.rad-lang-floating-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.rad-lang-floating-item.rad-lang-active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}
