/* ─── WP Gemini Translate — Frontend Styles ──────────────────
   Dil seçici widget: Resimde göründüğü gibi
   sol/sağ/alt/üst konumlandırılabilir popup
 ─────────────────────────────────────────────────────────── */

:root {
    --wgt-fe-bg:         #ffffff;
    --wgt-fe-text:       #1a1a2e;
    --wgt-fe-border:     rgba(0,0,0,.12);
    --wgt-fe-hover:      #f0f4ff;
    --wgt-fe-active:     #4f46e5;
    --wgt-fe-active-bg:  #ede9fe;
    --wgt-fe-shadow:     0 8px 32px rgba(0,0,0,.18);
    --wgt-fe-radius:     10px;
    --wgt-fe-z:          99999;
}

/* ── Floating Switcher Container ─────────────────────────── */
.wgt-floating-switcher {
    position: fixed;
    z-index: var(--wgt-fe-z);
}
.wgt-pos-bottom-left  { bottom: 24px; left: 24px; }
.wgt-pos-bottom-right { bottom: 24px; right: 24px; }
.wgt-pos-top-left     { top: 80px;    left: 24px; }
.wgt-pos-top-right    { top: 80px;    right: 24px; }

/* ── Mevcut Dil Butonu ───────────────────────────────────── */
.wgt-current-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--wgt-fe-bg);
    border: 1.5px solid var(--wgt-fe-border);
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--wgt-fe-text);
    transition: all .2s;
    white-space: nowrap;
    user-select: none;
}
.wgt-current-lang:hover {
    background: var(--wgt-fe-hover);
    border-color: var(--wgt-fe-active);
    box-shadow: 0 4px 16px rgba(79,70,229,.2);
}
.wgt-flag { font-size: 20px; line-height: 1; }
.wgt-lang-name { font-size: 13px; }
.wgt-arrow {
    font-size: 9px;
    color: #9ca3af;
    margin-left: 2px;
    transition: transform .2s;
    display: inline-block;
}
.wgt-floating-switcher.wgt-open .wgt-arrow { transform: rotate(180deg); }

/* ── Dil Listesi ─────────────────────────────────────────── */
.wgt-lang-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    background: var(--wgt-fe-bg);
    border: 1.5px solid var(--wgt-fe-border);
    border-radius: var(--wgt-fe-radius);
    box-shadow: var(--wgt-fe-shadow);
    min-width: 180px;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    opacity: 0;
    transform: translateY(8px) scale(.97);
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    backdrop-filter: blur(8px);
}

/* Sağ alt için sağa hizala */
.wgt-pos-bottom-right .wgt-lang-list,
.wgt-pos-top-right .wgt-lang-list {
    left: auto;
    right: 0;
}
/* Üst konumlar için aşağı aç */
.wgt-pos-top-left .wgt-lang-list,
.wgt-pos-top-right .wgt-lang-list {
    top: calc(100% + 8px);
    bottom: auto;
    transform: translateY(-8px) scale(.97);
}

.wgt-floating-switcher.wgt-open .wgt-lang-list {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.wgt-lang-list li { margin: 0; padding: 0; }

.wgt-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--wgt-fe-text);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s;
    cursor: pointer;
}
.wgt-lang-option:hover { background: var(--wgt-fe-hover); }
.wgt-lang-option.wgt-active {
    background: var(--wgt-fe-active-bg);
    color: var(--wgt-fe-active);
    font-weight: 700;
}

.wgt-check { margin-left: auto; color: var(--wgt-fe-active); font-size: 16px; }

/* ── Shortcode Switchers ─────────────────────────────────── */
.wgt-switcher { margin: 8px 0; }

/* Bar stili */
.wgt-style-bar .wgt-switcher-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.wgt-style-bar .wgt-switcher-item a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--wgt-fe-border);
    text-decoration: none;
    color: var(--wgt-fe-text);
    font-size: 13px;
    font-weight: 500;
    background: var(--wgt-fe-bg);
    transition: all .15s;
}
.wgt-style-bar .wgt-switcher-item a:hover { background: var(--wgt-fe-hover); border-color: var(--wgt-fe-active); }
.wgt-style-bar .wgt-switcher-item.wgt-current a {
    background: var(--wgt-fe-active);
    color: #fff;
    border-color: var(--wgt-fe-active);
}

/* Dropdown stili */
.wgt-style-dropdown .wgt-switcher-list {
    list-style: none; margin: 0; padding: 0;
}
.wgt-style-dropdown { position: relative; display: inline-block; }

/* Flags stili */
.wgt-style-flags .wgt-switcher-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.wgt-style-flags .wgt-switcher-item a {
    font-size: 28px;
    text-decoration: none;
    opacity: .5;
    transition: opacity .15s, transform .15s;
}
.wgt-style-flags .wgt-switcher-item a:hover { opacity: 1; transform: scale(1.15); }
.wgt-style-flags .wgt-switcher-item.wgt-current a { opacity: 1; }

/* RTL destek */
[dir="rtl"] .wgt-pos-bottom-left { left: auto; right: 24px; }
[dir="rtl"] .wgt-pos-bottom-right { right: auto; left: 24px; }
[dir="rtl"] .wgt-lang-list { left: auto; right: 0; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .wgt-pos-bottom-left,
    .wgt-pos-bottom-right { bottom: 16px; left: 16px; right: auto; }
    .wgt-lang-list { min-width: 160px; }
}
