/* Language Switcher Styles */
.language-switcher {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-left: auto;
    z-index: 1000;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 2px solid #074F57;
    background: transparent;
    color: #074F57;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    justify-content: center;
}

.lang-btn:hover {
    background: #074F57;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(7, 79, 87, 0.3);
}

.lang-btn.active {
    background: #074F57;
    color: white;
    box-shadow: 0 2px 4px rgba(7, 79, 87, 0.3);
}

.lang-btn i {
    font-size: 16px;
}

/* RTL Support */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .language-switcher {
    margin-left: 0;
    margin-right: auto;
}

.rtl .lang-btn {
    flex-direction: row-reverse;
}

/* RTL Layout Adjustments */
.rtl .container {
    text-align: right;
    /* Keep original container properties */
}

.rtl .hero-content {
    text-align: right;
}

.rtl .contact-info {
    text-align: right;
}

.rtl .contact-form {
    text-align: right;
}

.rtl .contact-form .form-group {
    text-align: right;
}

.rtl .contact-form label {
    text-align: right;
}

.rtl .contact-form input,
.rtl .contact-form textarea {
    text-align: right;
}

.rtl .location-card {
    text-align: right;
}

.rtl .footer-section {
    text-align: right;
}

.rtl .menu-items-grid {
    direction: rtl;
}

.rtl .menu-item {
    text-align: right;
}

.rtl .item-content {
    text-align: right;
}

.rtl .item-description {
    text-align: right;
}

.rtl .item-tags {
    text-align: right;
}

.rtl .item-allergens {
    text-align: right;
}

.rtl .item-spice-level {
    text-align: right;
}

.rtl .item-preparation-time {
    text-align: right;
}

/* RTL Navigation */
.rtl .nav-menu {
    text-align: right;
}

.rtl .nav-menu li {
    text-align: right;
}

/* RTL Forms */
.rtl .form-group {
    text-align: right;
}

.rtl .form-group label {
    text-align: right;
}

.rtl .form-control {
    text-align: right;
}

.rtl .btn {
    text-align: center;
}

/* RTL Tables */
.rtl table {
    direction: rtl;
}

.rtl th,
.rtl td {
    text-align: right;
}

/* RTL Cards */
.rtl .card {
    text-align: right;
}

.rtl .card-header {
    text-align: right;
}

.rtl .card-body {
    text-align: right;
}

/* RTL Alerts */
.rtl .alert {
    text-align: right;
}

/* RTL Modals */
.rtl .modal-header {
    text-align: right;
}

.rtl .modal-body {
    text-align: right;
}

.rtl .modal-footer {
    text-align: left;
    flex-direction: row-reverse;
}

/* RTL Dropdowns */
.rtl .dropdown-menu {
    text-align: right;
}

.rtl .dropdown-item {
    text-align: right;
}

/* RTL Search */
.rtl .search-container {
    text-align: right;
}

.rtl .search-input {
    text-align: right;
}

/* RTL Stats */
.rtl .stats-grid {
    direction: rtl;
}

.rtl .stat-item {
    text-align: right;
}

/* RTL Features */
.rtl .features-grid {
    direction: rtl;
}

.rtl .feature-item {
    text-align: right;
}

/* RTL Footer */
.rtl .footer-content {
    text-align: right;
}

.rtl .footer-section {
    text-align: right;
}

/* RTL Admin Dashboard */
.rtl .dashboard-header {
    text-align: right;
}

.rtl .dashboard-stats {
    direction: rtl;
}

.rtl .stat-card {
    text-align: right;
}

.rtl .customers-table {
    direction: rtl;
}

.rtl .customers-table th,
.rtl .customers-table td {
    text-align: right;
}

/* RTL Admin Dashboard Specific Fixes */
.rtl .dashboard-container {
    direction: rtl;
}

.rtl .sidebar-header {
    text-align: right;
}

.rtl .nav-item {
    text-align: right;
}

.rtl .nav-item i {
    margin-right: 0;
    margin-left: 0.75rem;
}

.rtl .header {
    text-align: right;
}

.rtl .header-actions {
    flex-direction: row-reverse;
}

.rtl .stats-grid {
    direction: rtl;
}

.rtl .stat-header {
    flex-direction: row-reverse;
}

.rtl .stat-icon {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .menu-section {
    text-align: right;
}

.rtl .section-header {
    text-align: right;
}

.rtl .customer-info {
    flex-direction: row-reverse;
}

.rtl .customer-details {
    text-align: right;
}

.rtl .action-buttons {
    flex-direction: row-reverse;
}

.rtl .search-box {
    text-align: right;
}

.rtl .search-input-container {
    direction: rtl;
}

.rtl .search-icon {
    right: 1rem;
    left: auto;
}

.rtl .search-input {
    padding-right: 3rem;
    padding-left: 1rem;
}

.rtl .clear-search-btn {
    left: 0.75rem;
    right: auto;
}

.rtl .search-filters {
    direction: rtl;
}

.rtl .filter-select {
    text-align: right;
}

/* RTL Sidebar Fixes - Consolidated */

.rtl .main-content {
    margin-left: 0;
    transition: margin-right 0.3s ease;
}

.rtl .main-content.expanded {
    margin-right: 0;
}

.rtl .main-content.sidebar-collapsed {
    margin-right: 0;
}

/* RTL Admin Dashboard Header */
.rtl .header {
    margin-left: 0;
    transition: margin-right 0.3s ease;
}

.rtl .header.sidebar-collapsed {
    margin-right: 0;
}

.rtl .header-actions {
    flex-direction: row-reverse;
}

/* RTL Sidebar Positioning */
.rtl .sidebar {
    right: 0;
    left: auto;
    position: fixed;
    top: 0;
    height: 100vh;
    width: 280px;
    z-index: 1000;
    transform: translateX(0) !important;
}

.rtl .sidebar.collapsed {
    transform: translateX(100%) !important;
}

/* RTL Form Layout Fixes */
.rtl .form-row {
    direction: rtl;
}

.rtl .form-group {
    text-align: right;
}

/* RTL Tables */
.rtl .table {
    direction: rtl;
}

.rtl .table th,
.rtl .table td {
    text-align: right;
}

.rtl .table th:first-child,
.rtl .table td:first-child {
    text-align: right;
}

.rtl .table th:last-child,
.rtl .table td:last-child {
    text-align: left;
}

/* RTL Admin Dashboard Responsive */
@media (max-width: 768px) {
    .rtl .sidebar {
        transform: translateX(100%) !important;
        width: 280px;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        height: 100vh !important;
        z-index: 1000 !important;
    }
    
    .rtl .sidebar.open {
        transform: translateX(0) !important;
    }
    
    .rtl .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    
    .rtl .header {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    
    .rtl .form-row {
        flex-direction: column;
    }
    
    .rtl .form-group {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .rtl .table {
        font-size: 0.8rem;
    }
    
    .rtl .table th,
    .rtl .table td {
        padding: 0.5rem;
    }
    
    .rtl .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

.rtl .form-label {
    text-align: right;
}

.rtl .form-input,
.rtl .form-textarea,
.rtl .form-select {
    text-align: right;
}

/* RTL Modal Fixes */
.rtl .modal-content {
    text-align: right;
}

.rtl .modal-header {
    text-align: right;
}

.rtl .modal-body {
    text-align: right;
}

.rtl .modal-footer {
    text-align: left;
    flex-direction: row-reverse;
}

/* RTL Button Fixes */
.rtl .btn {
    text-align: center;
}

.rtl .btn-group {
    flex-direction: row-reverse;
}

/* RTL Table Fixes */
.rtl .table-container {
    direction: rtl;
}

.rtl .table {
    direction: rtl;
}

.rtl .table th,
.rtl .table td {
    text-align: right;
}

/* RTL Card Fixes */
.rtl .card {
    text-align: right;
}

.rtl .card-header {
    text-align: right;
}

.rtl .card-body {
    text-align: right;
}

/* RTL Responsive Fixes */
@media (max-width: 768px) {
    .rtl .main-content {
        margin-right: 0;
        margin-left: 0;
    }
    
    .rtl .sidebar {
        transform: translateX(100%);
    }
    
    .rtl .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .rtl .form-row {
        flex-direction: column;
    }
    
    .rtl .form-group {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rtl .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .rtl .customers-table {
        font-size: 12px;
    }
    
    .rtl .form-input,
    .rtl .form-textarea {
        font-size: 14px;
    }
}

/* RTL Menu Categories */
.rtl .category-nav {
    direction: rtl;
}

.rtl .category-btn {
    text-align: right;
}

/* RTL Menu Items */
.rtl .menu-section {
    text-align: right;
}

.rtl .menu-section h2 {
    text-align: right;
}

/* RTL Responsive */
@media (max-width: 768px) {
    .language-switcher {
        margin: 10px 0;
        justify-content: center;
    }
    
    .rtl .language-switcher {
        margin: 10px 0;
        justify-content: center;
    }
    
    .lang-btn {
        min-width: 70px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .lang-btn {
        min-width: 60px;
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .lang-btn span {
        display: none;
    }
    
    .lang-btn i {
        font-size: 18px;
    }
}

.rtl .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* RTL Mobile Responsive for Contact */
@media (max-width: 768px) {
    .rtl .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.rtl .locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.rtl .social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.rtl .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Ensure form inputs work properly in RTL */
.rtl .contact-form input,
.rtl .contact-form textarea {
    direction: rtl;
    text-align: right;
}

.rtl .contact-form input::placeholder,
.rtl .contact-form textarea::placeholder {
    text-align: right;
}

/* Auth Pages Language Switcher Fixes */
.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem 0 1rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.auth-header .language-switcher-nav {
    position: static;
    z-index: 10;
}

.auth-header .lang-btn-nav {
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.auth-header .lang-btn-nav:hover {
    background: white;
    color: #074F57;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
}

.auth-header .lang-btn-nav.active {
    background: white;
    color: #074F57;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Override existing back-link positioning for auth-header */
.auth-header .back-link {
    position: static;
    top: auto;
    left: auto;
    margin: 0;
}

/* Add top padding to auth content to account for absolute header */
.auth-left-content {
    padding-top: 6rem;
}

.form-header {
    position: relative;
    text-align: center;
}

.language-switcher-nav {
    display: flex;
    gap: 5px;
    align-items: center;
}

.lang-btn-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 2px solid #074F57;
    background: transparent;
    color: #074F57;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 60px;
    justify-content: center;
}

.lang-btn-nav:hover {
    background: #074F57;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(7, 79, 87, 0.3);
}

.lang-btn-nav.active {
    background: #074F57;
    color: white;
    box-shadow: 0 2px 4px rgba(7, 79, 87, 0.3);
}

.rtl .auth-header {
    flex-direction: row-reverse;
}

.rtl .language-switcher-nav {
    flex-direction: row-reverse;
}

/* Ensure form title has proper spacing */
.form-title {
    margin-top: 2rem;
}
