/*
 * Language Switcher Styles
 * Built for UrduPress theme integration
 *
 * The switcher is injected as the last <li> in the UrduPress nav menu
 * (#desktop-menu in .main-menu-v3, and #primary-menu in .mobile-menu).
 * Desktop: nav bar is 60px tall, dark background (#222).
 * Mobile: .mobile-bar is 50px tall, white background.
 */

/* ============================================
   NAV MENU INLINE SWITCHER
   Injected as <li class="menu-item dut-menu-switcher">
   inside #desktop-menu (flex row-reverse, 60px height)
   ============================================ */

.dut-menu-switcher {
    display: flex !important;
    align-items: center !important;
    height: 60px !important;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
    flex: none !important;
}

.dut-menu-switcher .dut-switcher-wrap {
    display: flex;
    align-items: center;
    padding: 0;
}

.dut-menu-switcher .dut-switcher-inline {
    padding: 0 10px;
}

/* ============================================
   SWITCHER TOGGLE (all positions)
   ============================================ */

.dut-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1;
}

.dut-lang-btn {
    display: inline-block;
    padding: 6px 14px;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.dut-lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
    text-decoration: none !important;
}

.dut-lang-btn.dut-active {
    background: var(--accent-color, #e74c3c) !important;
    color: #fff !important;
}

.dut-lang-btn.dut-active:hover {
    background: var(--accent-color, #c0392b) !important;
    color: #fff !important;
}

/* Urdu button uses Lateef (theme's UI font) */
.dut-lang-ur {
    font-family: 'Lateef', 'Noto Nastaliq Urdu', serif !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
}

/* English button uses Roboto (already imported by theme) */
.dut-lang-en {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
}

.dut-switcher-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    line-height: 1;
    user-select: none;
    padding: 0 2px;
}

/* ============================================
   FOOTER POSITION
   ============================================ */

.dut-switcher-footer-wrap {
    display: flex;
    justify-content: center;
    padding: 12px 0;
    background: #222;
    border-top: 1px solid #333;
}

.dut-switcher-footer-wrap .dut-switcher-toggle {
    border-color: #555;
}

/* ============================================
   FLOATING POSITION
   Fixed bottom-right (or bottom-left in RTL)
   ============================================ */

.dut-switcher-floating {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    left: auto;
    padding: 0;
    z-index: 999999;
}

.dut-switcher-floating .dut-switcher-toggle {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    background: #222;
    border-color: #444;
}

.dut-switcher-floating .dut-lang-btn {
    padding: 10px 18px;
}

/* RTL floating position flip */
body.dut-rtl .dut-switcher-floating {
    right: auto;
    left: 24px;
}

body.dut-ltr .dut-switcher-floating {
    right: 24px;
    left: auto;
}

/* ============================================
   MOBILE SWITCHER
   Injected by JS into .mobile-bar (50px, white bg)
   ============================================ */

.dut-mobile-switcher-inner {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 8px;
}

.dut-mobile-switcher-inner .dut-switcher-toggle {
    background: #f0f0f0;
    border-color: #ddd;
}

.dut-mobile-switcher-inner .dut-lang-btn {
    color: #333 !important;
    padding: 4px 10px;
    font-size: 12px !important;
}

.dut-mobile-switcher-inner .dut-lang-ur {
    font-size: 14px !important;
}

.dut-mobile-switcher-inner .dut-lang-btn.dut-active {
    color: #fff !important;
}

.dut-mobile-switcher-inner .dut-switcher-divider {
    color: #999;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    /* Hide nav-injected switcher on mobile (it's inside .header-normal which is hidden) */
    .dut-menu-switcher {
        display: none !important;
    }

    .dut-switcher-floating {
        bottom: 70px; /* Above UrduPress fixed social bar on mobile */
        right: 16px;
    }

    body.dut-rtl .dut-switcher-floating {
        left: 16px;
        right: auto;
    }
}

@media (min-width: 769px) {
    /* Hide mobile switcher on desktop */
    .dut-mobile-switcher-injected {
        display: none !important;
    }
}
