/* =============================================
   Dil Seçici - Frontend Styles
   by Posenda | posenda.com
   ============================================= */

.ds-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    z-index: 9999;
}

/* Trigger Butonu */
.ds-dropdown .ds-trigger,
.ds-dropdown .ds-trigger:visited {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    background: #f1f3f5 !important;
    background-color: #f1f3f5 !important;
    background-image: none !important;
    border: 1.5px solid #dee2e6 !important;
    border-radius: 6px !important;
    padding: 7px 13px 7px 10px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #111111 !important;
    white-space: nowrap !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.15s !important;
    outline: none !important;
    min-width: 130px !important;
    justify-content: space-between !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.ds-dropdown .ds-trigger:hover,
.ds-dropdown.open .ds-trigger {
    border-color: #adb5bd !important;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06) !important;
    background: #e9ecef !important;
    background-color: #e9ecef !important;
    background-image: none !important;
    color: #111111 !important;
}

.ds-dropdown .ds-trigger span {
    flex: 1 !important;
    text-align: left !important;
    color: #111111 !important;
}

/* Bayrak */
.ds-dropdown .ds-flag {
    width: 22px !important;
    height: 15px !important;
    object-fit: cover !important;
    border-radius: 2px !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

/* Ok */
.ds-dropdown .ds-caret {
    transition: transform 0.22s cubic-bezier(.4,0,.2,1) !important;
    flex-shrink: 0 !important;
    opacity: 0.5 !important;
    color: #111111 !important;
}

.ds-dropdown.open .ds-caret {
    transform: rotate(180deg) !important;
}

/* Menü */
.ds-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    transition:
        opacity 0.18s cubic-bezier(.4,0,.2,1),
        transform 0.18s cubic-bezier(.4,0,.2,1),
        visibility 0.18s;
    z-index: 10000;
    padding: 4px 0;
}

.ds-dropdown.open .ds-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Menü Item */
.ds-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.13s, color 0.13s;
    position: relative;
}

.ds-menu-item:hover {
    background: #f0f4ff;
    color: #2563eb;
}

.ds-menu-item.ds-active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.ds-menu-item span {
    flex: 1;
}

/* Check İşareti */
.ds-check {
    opacity: 0.7;
    flex-shrink: 0;
    color: #2563eb;
}

/* Ayırıcı çizgi (isteğe bağlı) */
.ds-menu-item + .ds-menu-item {
    border-top: 1px solid #f3f4f6;
}

/* ============================================
   Sabit köşe widget (isteğe bağlı)
   ============================================ */
#dil-secici-fixed {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 99999;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
    .ds-trigger {
        font-size: 13px;
        padding: 6px 10px 6px 8px;
        min-width: 110px;
    }

    .ds-menu {
        right: 0;
        min-width: 140px;
    }
}
