/* Internationalization and RTL Support Styles */

/* Language Switcher */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-button {
    background: transparent;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color, #333);
    transition: all 0.3s ease;
}

.language-button:hover {
    background: var(--hover-bg, #f5f5f5);
    border-color: var(--primary-color, #2E8B57);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
    transition: background 0.2s ease;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: var(--hover-bg, #f5f5f5);
}

.language-option.active {
    background: var(--primary-light, #e8f5e8);
    color: var(--primary-color, #2E8B57);
}

.language-flag {
    font-size: 18px;
}

.language-name {
    font-weight: 500;
}

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

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

/* RTL Navigation */
.rtl .nav-container {
    flex-direction: row-reverse;
}

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

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

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

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

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

.rtl .checkbox-label {
    flex-direction: row-reverse;
}

.rtl .checkbox-label .checkmark {
    margin-left: 0;
    margin-right: 10px;
}

/* RTL Buttons */
.rtl .btn {
    flex-direction: row-reverse;
}

.rtl .btn i {
    margin-left: 0;
    margin-right: 8px;
}

/* RTL Modal */
.rtl .modal-header {
    flex-direction: row-reverse;
}

.rtl .modal-header .close {
    left: 20px;
    right: auto;
}

/* RTL Dashboard */
.rtl .header-content {
    flex-direction: row-reverse;
}

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

.rtl .user-info h1 i {
    margin-left: 10px;
    margin-right: 0;
}

/* RTL Cards and Grids */
.rtl .feature-card,
.rtl .user-type-card,
.rtl .action-card {
    text-align: right;
}

.rtl .feature-icon,
.rtl .user-type-icon,
.rtl .action-icon {
    margin-left: 0;
    margin-right: auto;
}

/* RTL Prayer Times */
.rtl .prayer-item {
    flex-direction: row-reverse;
}

.rtl .next-prayer {
    text-align: right;
}

.rtl .prayer-time-demo h3 i {
    margin-left: 10px;
    margin-right: 0;
}

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

.rtl .stat-icon {
    margin-left: 0;
    margin-right: 15px;
}

/* RTL Notifications */
.rtl .notification {
    right: auto;
    left: 20px;
}

.rtl .notification-content {
    flex-direction: row-reverse;
}

/* RTL Loading */
.rtl .loading-content {
    text-align: right;
}

/* RTL Hero Section */
.rtl .hero-content {
    flex-direction: row-reverse;
}

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

.rtl .hero-buttons .btn {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .hero-buttons .btn:last-child {
    margin-right: 0;
}

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

.rtl .user-types-grid {
    direction: rtl;
}

/* RTL Search */
.rtl .search-input-group {
    flex-direction: row-reverse;
}

.rtl .search-filters {
    flex-direction: row-reverse;
}

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

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

/* RTL Breadcrumbs */
.rtl .breadcrumb {
    flex-direction: row-reverse;
}

.rtl .breadcrumb-item::after {
    content: "\\";
    margin: 0 8px 0 0;
}

/* RTL Sidebar */
.rtl .sidebar {
    right: 0;
    left: auto;
}

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

.rtl .sidebar-item i {
    margin-left: 10px;
    margin-right: 0;
}

/* RTL Dropdown Menus */
.rtl .dropdown-menu {
    right: 0;
    left: auto;
}

/* RTL Pagination */
.rtl .pagination {
    flex-direction: row-reverse;
}

/* RTL Tabs */
.rtl .tab-list {
    flex-direction: row-reverse;
}

/* RTL Progress Bars */
.rtl .progress-bar {
    transform: scaleX(-1);
}

/* RTL Tooltips */
.rtl .tooltip {
    direction: ltr;
}

/* RTL Animations */
.rtl .slide-in-right {
    animation: slideInLeft 0.3s ease;
}

.rtl .slide-in-left {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Font Support for Arabic/Urdu */
.rtl {
    font-family: 'Noto Sans Arabic', 'Noto Nastaliq Urdu', 'Amiri', 'Scheherazade', 'Times New Roman', serif;
}

/* Font Support for Hindi */
html[lang="hi"] {
    font-family: 'Noto Sans Devanagari', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hindi specific styling */
html[lang="hi"] .prayer-name,
html[lang="hi"] .feature-card h3,
html[lang="hi"] .user-type-card h3 {
    font-weight: 500;
    letter-spacing: 0.5px;
}

html[lang="hi"] input,
html[lang="hi"] textarea,
html[lang="hi"] select {
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
}

/* Responsive RTL */
@media (max-width: 768px) {
    .rtl .nav-toggle {
        left: 20px;
        right: auto;
    }
    
    .rtl .mobile-menu {
        right: auto;
        left: 0;
    }
    
    .rtl .language-dropdown {
        right: auto;
        left: 0;
    }
}

/* Print RTL */
@media print {
    .rtl {
        direction: rtl;
        text-align: right;
    }
}

/* High Contrast RTL */
@media (prefers-contrast: high) {
    .rtl .language-button {
        border-width: 2px;
    }
}

/* Reduced Motion RTL */
@media (prefers-reduced-motion: reduce) {
    .rtl .language-dropdown {
        transition: none;
    }
    
    .rtl .language-option {
        transition: none;
    }
}
