/* =============================================================================
   DesignMitra AI — Language Switcher Styles
   Floating button top-right, visible on all pages
   ============================================================================= */

/* ── Floating container ────────────────────────────────────────────────────── */
#dm-lang-switcher {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Main trigger button ───────────────────────────────────────────────────── */
#dm-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(26, 26, 46, 0.92);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    padding: 7px 14px 7px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transition: all 0.2s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

#dm-lang-btn:hover {
    background: rgba(26, 26, 46, 1);
    border-color: rgba(240,165,0,0.5);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

#dm-lang-globe   { font-size: 16px; line-height: 1; }
#dm-lang-current { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
#dm-lang-arrow   { font-size: 10px; opacity: 0.6; transition: transform 0.2s; }

/* ── Dropdown ──────────────────────────────────────────────────────────────── */
#dm-lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e8e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    min-width: 168px;
    overflow: hidden;
    display: none;
    animation: dm-lang-dropdown-in 0.18s ease;
}

#dm-lang-dropdown.open { display: block; }

@keyframes dm-lang-dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Language option buttons ───────────────────────────────────────────────── */
.dm-lang-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #2d2d3a;
    text-align: left;
    transition: background 0.12s;
    border-bottom: 1px solid #f4f5fb;
}

.dm-lang-opt:last-child { border-bottom: none; }

.dm-lang-opt:hover {
    background: #f7f7fb;
    color: #1a1a2e;
}

.dm-lang-opt.active {
    background: #fffbeb;
    color: #92400e;
    font-weight: 700;
}

.dm-lang-flag   { font-size: 18px; flex-shrink: 0; }
.dm-lang-native { flex: 1; }
.dm-lang-check  { color: #f0a500; font-weight: 700; font-size: 14px; }

/* ── Toast notification ────────────────────────────────────────────────────── */
#dm-lang-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: rgba(26,26,46,0.92);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 9999999;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    white-space: nowrap;
}

#dm-lang-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Responsive: smaller on mobile ────────────────────────────────────────── */
@media (max-width: 480px) {
    #dm-lang-btn {
        padding: 6px 10px 6px 8px;
        font-size: 12px;
    }
    #dm-lang-current { display: none; }
    #dm-lang-btn { border-radius: 50%; width: 38px; height: 38px; justify-content: center; padding: 0; }
    #dm-lang-arrow   { display: none; }
    #dm-lang-globe   { font-size: 18px; }
}
