/* Language Switcher - Dark Theme */
.rp-lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
}

.rp-lang-selected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1;
    user-select: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.rp-lang-selected:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.rp-lang-selected[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.18);
    border-color: #c8a97e;
    box-shadow: 0 0 0 1px rgba(200, 169, 126, 0.3);
}

.rp-lang-globe {
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.rp-lang-globe svg {
    width: 15px;
    height: 15px;
}

.rp-lang-current-text {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
}

.rp-lang-arrow {
    display: flex;
    align-items: center;
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.rp-lang-selected[aria-expanded="true"] .rp-lang-arrow {
    transform: rotate(180deg);
}

/* Dropdown - Dark Theme */
.rp-lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.25);
    padding: 6px;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.rp-lang-switcher[dir="rtl"] .rp-lang-dropdown {
    right: auto;
    left: 0;
}

.rp-lang-dropdown.rp-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.rp-lang-option {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-lang-option a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 7px;
    transition: all 0.15s ease;
    font-size: 14px;
    line-height: 1;
}

.rp-lang-option a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.rp-lang-active a {
    background: rgba(200, 169, 126, 0.12);
    color: #c8a97e;
    font-weight: 600;
}

.rp-lang-active a:hover {
    background: rgba(200, 169, 126, 0.18);
    color: #c8a97e;
}

.rp-lang-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.rp-lang-active .rp-lang-code {
    background: rgba(200, 169, 126, 0.2);
    color: #c8a97e;
}

.rp-lang-name {
    flex: 1;
}

.rp-lang-check {
    display: flex;
    align-items: center;
    color: #c8a97e;
    margin-left: auto;
}

/* RTL Support for entire site */
body.rp-rtl {
    direction: rtl;
    text-align: right;
}

body.rp-rtl .rp-lang-check {
    margin-left: 0;
    margin-right: auto;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .rp-lang-selected {
        padding: 5px 8px;
        gap: 4px;
    }
    .rp-lang-globe svg {
        width: 13px;
        height: 13px;
    }
    .rp-lang-current-text {
        font-size: 11px;
    }
    .rp-lang-dropdown {
        min-width: 160px;
    }
}

/* RTL global adjustments */
body.rp-rtl .elementor-widget-container,
body.rp-rtl .elementor-heading-title,
body.rp-rtl .elementor-text-editor {
    direction: rtl;
    text-align: right;
}

body.rp-rtl .elementor-nav-menu--main .elementor-nav-menu {
    direction: rtl;
}
