/* ==========================================================
   Sprint Retrospective - Internationalization (i18n) & RTL Styles
   ========================================================== */

/* --- Login Page Language Selector Bar --- */
.login-locale-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 14px;
    margin-bottom: 20px;
    gap: 10px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.login-locale-bar:hover {
    border-color: #cbd5e1;
}

.login-locale-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin: 0;
    white-space: nowrap;
}

.login-locale-select {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 190px;
}

.login-locale-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* --- Header Language Switcher --- */
.header-lang-wrapper {
    position: relative;
    display: inline-block;
}

.header-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1e293b;
    user-select: none;
}

.header-lang-btn:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.header-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    padding: 6px;
    min-width: 210px;
    z-index: 10001;
    display: none;
    flex-direction: column;
    gap: 2px;
    animation: langMenuFadeIn 0.15s ease-out;
}

.header-lang-menu.open {
    display: flex !important;
}

@keyframes langMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 13px;
    color: #334155;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
}

.header-lang-option:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.header-lang-option.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 700;
}

.header-lang-option-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Profile Dropdown & Settings Language Selectors --- */
.dropdown-lang-section {
    padding: 10px 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dropdown-lang-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    margin: 0;
    white-space: nowrap;
}

.locale-select-control {
    padding: 5px 10px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #1e293b;
    outline: none;
    cursor: pointer;
}

.locale-select-control:focus {
    border-color: #4f46e5;
}

/* ==========================================================
   RTL (Right-to-Left) Styles for Standard Arabic (ar)
   ========================================================== */

[dir="rtl"],
.rtl-layout {
    direction: rtl;
    text-align: right;
}

/* Header layout mirroring in RTL */
[dir="rtl"] .top-header .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-left {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-right {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-lang-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .header-lang-option {
    text-align: right;
}

[dir="rtl"] .user-profile-dropdown {
    right: auto;
    left: 0;
    text-align: right;
}

/* Login card elements in RTL */
[dir="rtl"] .login-section-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .login-section-title {
    flex-direction: row-reverse;
}

[dir="rtl"] .login-guest-section {
    text-align: right;
}

[dir="rtl"] .login-guest-section div {
    flex-direction: row-reverse;
}

[dir="rtl"] .google-oauth-primary-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .login-locale-bar {
    flex-direction: row-reverse;
}

/* Dashboard banner in RTL */
[dir="rtl"] .section-header {
    flex-direction: row-reverse;
}

[dir="rtl"] #joinByCodeBanner {
    flex-direction: row-reverse;
}

[dir="rtl"] #creatorAuthBanner {
    flex-direction: row-reverse;
}

[dir="rtl"] .dashboard-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .dashboard-title {
    text-align: right;
}

[dir="rtl"] .dashboard-actions {
    flex-direction: row-reverse;
}

/* Columns container in RTL */
[dir="rtl"] .columns-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .column-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-footer-left {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-header {
    justify-content: flex-start;
}

/* Modals & Dialogs in RTL */
[dir="rtl"] .modal-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .modal-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .custom-dialog-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .custom-dialog-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .custom-dialog-body {
    text-align: right;
}

[dir="rtl"] .setting-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .setting-info {
    text-align: right;
}

[dir="rtl"] .storage-stats {
    flex-direction: row-reverse;
}

[dir="rtl"] .board-card-title-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .board-card-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .board-card-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .image-source-tabs {
    flex-direction: row-reverse;
}

[dir="rtl"] .gif-categories {
    flex-direction: row-reverse;
}
