/* ==========================================================================
   Global RTL Styles
   ========================================================================== */



   html[dir="rtl"] .duolingo-sidebar {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid #ddd;
    height: 100vh;
    width: 80px;
    position: fixed;
    top: 0;
    right: 0;
    box-shadow: 0 0 10px rgba(193, 145, 52, 0.31);
    z-index: 900;
    border-radius: 30px 0 0 0;
}



/* Reset default margin, padding, and box-sizing */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}








   html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Qatar', serif;
    line-height: 1.6;
    /* margin-right: 250px; */
  padding: 30px;
}

html[dir="rtl"] h1, 
html[dir="rtl"] h2, 
html[dir="rtl"] h3 {
    font-family: 'Qatar', serif;
}


/* ==========================================================================
   Floating Label RTL Styles
   ========================================================================== */

html[dir="rtl"] .floating-label label {
    position: absolute;
    top: 15px;
    right: 12px;
    left: auto;
    transition: all 0.2s ease;
    pointer-events: none;
    color: var(--primary-color);
  font-weight: 600;
}

html[dir="rtl"] .floating-label input:focus + label,
html[dir="rtl"] .floating-label input:not(:placeholder-shown) + label {
    top: 5px;
    font-size: 0.75rem;
    color: var(--primary-color);
}

/* ==========================================================================
   Password Toggle RTL Styles
   ========================================================================== */
html[dir="rtl"] .password-toggle {
    position: absolute;
    left: 10px;
    right: auto;
    top: 30%;
    cursor: pointer;
}


/* ==========================================================================
  Remember Me Check RTL Styles
  ========================================================================== */
.remembermecheck {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* html[dir="rtl"] .remembermecheck {
   justify-content: flex-end;
   flex-direction: row-reverse;
} */

html[dir="rtl"] .remembermecheck input[type="checkbox"] {
    margin-left: 8px;
    margin-right: 0;
}



/* ==========================================================================
   Language Selector RTL Styles
   ========================================================================== */
html[dir="rtl"] .language-selector {
    position: absolute;
}


/* ==========================================================================
   Site Main RTL Styles
   ========================================================================== */
html[dir="rtl"] .site-main {
    /* display: flex; */
    /* flex-direction: column; */
    /* align-items: center; */
    /* gap: 10px; */
    /* padding: 30px 50px; */
    margin-right: 80px;
}

/* ==========================================================================
   Sidebar RTL Styles
   ========================================================================== */
html[dir="rtl"] .duolingo-sidebar {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-left: 1px solid #ddd;
    border-right: none;
    height: 100vh;
    width: 80px;
    position: fixed;
    top: 0;
    left: auto;
    right: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 900;
}

/* ==========================================================================
   Scrollable Sidebar Icons with Hidden Scrollbar
   ========================================================================== */
html[dir="rtl"] .sidebar-icons {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 0;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
html[dir="rtl"] .sidebar-icons::-webkit-scrollbar {
    display: none;
}


.sidebar-item .text {
    display: none;
}

/* ==========================================================================
   Floating Action Button RTL Styles
   ========================================================================== */
html[dir="rtl"] .floating-action-btn{
    position: fixed;
    bottom: 30px;
    right: 30px; /* Changed from left to right for RTL */
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Notification Badge RTL Styles
   ========================================================================== */

html[dir="rtl"] .notification-badge {
    display: none;
    background: #e38c8c;
    color: #fff;
    font-size: 0.8em;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 20%;
    position: absolute;
    left: 5px; /* Changed from right to left for RTL */
}

/* ==========================================================================
   Icon RTL Styles
   ========================================================================== */
html[dir="rtl"] .icon img {
    width: 28px;
    height: 28px;
    margin-left: 10px;  /* Changed from right to left for RTL */
    margin-right: 0;
}


/* ==========================================================================
    Tablet Responsive RTL Styles
   ========================================================================== */
   @media (max-width: 768px) {

    .language-selector {
        display: none;
    }
    .language-selector select {
        display: none;
    }

    html[dir="rtl"] html, body {
        margin-left: 0px;
    }

    html[dir="rtl"] .site-main {
        /* display: flex; */
        /* flex-direction: column; */
        /* align-items: center; */
        /* gap: 10px; */
        /* padding: 0px; */
        margin-right: 80px;
        width: 100%;
    }

    html[dir="rtl"] .duolingo-sidebar {
        width: 80px;
    }

    html[dir="rtl"] .site-logo {
        max-width: 60px;
    }

    html[dir="rtl"] body {
        margin-left: 80px;
    }

    html[dir="rtl"] .sidebar-item .text {
        display: none;
    }


    html[dir="rtl"] .sidebar-item.active {
        transform: translateX(0px);
    }

    html[dir="rtl"] .icon img {
        width: 28px;
        height: 28px;
    }
}

/* ==========================================================================
  Mobile Responsive RTL Styles
   ========================================================================== */
@media (max-width: 480px) {


/*  */
    html[dir="rtl"] .site-main {
        /* display: flex; */
        /* flex-direction: column; */
        /* align-items: center; */
        /* gap: 10px; */
        /* padding: 0px; */
        margin-right: 0px;
        width: 100%;
    }








    html[dir="rtl"] .duolingo-sidebar {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        height: 60px;
        width: 100%;
        bottom: 0;
        top: auto;
        border-left: none;
        border-top: 1px solid #ddd;
        border-right: none;
        position: fixed;
    }

    html[dir="rtl"] body {
        margin: 0;
        padding: 10px 0px 60px 0px;
    }

    html[dir="rtl"] .sidebar-header {
        display: none;
    }

    html[dir="rtl"] .sidebar-icons {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 10px 0;
    }

    /* Hide horizontal scrollbar for mobile */
    html[dir="rtl"] .sidebar-icons::-webkit-scrollbar {
        display: none;
    }

    html[dir="rtl"] .sidebar-item {
        flex-direction: column;
        justify-content: center;
        margin: 0;
        padding: 5px 0;
    }

    html[dir="rtl"] .icon img {
        width: 30px;
        height: 30px;
    }

    html[dir="rtl"] .text {
        display: none;
    }

    html[dir="rtl"] .sidebar-item:hover, html[dir="rtl"] .sidebar-item.active {
        transform: none;
        background: transparent;
    }

   html[dir="rtl"] .sidebar-item.active .icon img {
        filter: brightness(0) saturate(100%) invert(35%) sepia(73%) saturate(1303%) hue-rotate(176deg) brightness(101%) contrast(103%);
    }
}