/* Multi-Language & RTL Support Styles */

/* Language Switcher */
.language-switcher {
    display: inline-block;
    padding: 10px;
}

.language-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.language-select:hover {
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.2);
}

.language-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

/* RTL Support for common elements */
html[dir="rtl"] {
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] body {
    text-align: right;
    direction: rtl;
}

/* Adjust margins and padding for RTL */
html[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
}

html[dir="rtl"] .main-content {
    margin-right: 250px;
    margin-left: 0;
}

html[dir="rtl"] .top-bar-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .modal-content {
    text-align: right;
}

html[dir="rtl"] .form-group label {
    text-align: right;
}

html[dir="rtl"] .alert {
    text-align: right;
}

html[dir="rtl"] .card {
    text-align: right;
}

html[dir="rtl"] .login-container {
    text-align: center;
}

html[dir="rtl"] input[type="text"],
html[dir="rtl"] input[type="password"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] .table th,
html[dir="rtl"] .table td {
    text-align: right;
}

html[dir="rtl"] .table thead {
    text-align: right;
}

html[dir="rtl"] .badge {
    margin-left: 5px;
    margin-right: 0;
}

html[dir="rtl"] .btn {
    margin-left: 5px;
    margin-right: 0;
}

html[dir="rtl"] .stat-icon {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .nav-item {
    padding-right: 20px;
    padding-left: 0;
}

html[dir="rtl"] .nav-item span {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .sidebar-header {
    text-align: center;
}

html[dir="rtl"] .top-bar {
    flex-direction: row-reverse;
}

html[dir="rtl"] .display-header {
    text-align: center;
}

html[dir="rtl"] .queue-list {
    text-align: right;
}

html[dir="rtl"] .queue-item {
    text-align: right;
}

html[dir="rtl"] .counter-display {
    text-align: center;
}

html[dir="rtl"] .display-footer {
    text-align: center;
}

html[dir="rtl"] .stat-item {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

html[dir="rtl"] .stat-item .stat-icon {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .staff-header {
    text-align: center;
}

html[dir="rtl"] .staff-container {
    text-align: right;
}

html[dir="rtl"] .panel {
    text-align: right;
}

/* Flexbox adjustments for RTL */
html[dir="rtl"] .flex-between {
    flex-direction: row-reverse;
}

html[dir="rtl"] .flex-start {
    flex-direction: row-reverse;
}

html[dir="rtl"] .flex-end {
    flex-direction: row-reverse;
}

/* Tab style for RTL */
html[dir="rtl"] .tabs {
    flex-direction: row-reverse;
}

html[dir="rtl"] .tab {
    margin-left: 0;
    margin-right: 5px;
}

/* Icon alignment for RTL */
html[dir="rtl"] .icon-text {
    flex-direction: row-reverse;
}

/* Modal adjustments */
html[dir="rtl"] .modal-header {
    flex-direction: row-reverse;
    justify-content: space-between;
}

html[dir="rtl"] .close {
    right: auto;
    left: 10px;
}

/* Service tabs */
html[dir="rtl"] .service-tabs {
    flex-direction: row-reverse;
}

html[dir="rtl"] .service-tab {
    margin-left: 0;
    margin-right: 10px;
}

/* Forms */
html[dir="rtl"] .checkbox-label {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] input[type="checkbox"] {
    margin-left: 5px;
    margin-right: 0;
}

/* Lists */
html[dir="rtl"] ul,
html[dir="rtl"] ol {
    padding-left: 0;
    padding-right: 20px;
}

html[dir="rtl"] li {
    text-align: right;
}

/* Animations (keep same for both directions) */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

html[dir="ltr"] .slide-in {
    animation: slideInFromLeft 0.3s ease-in-out;
}

html[dir="rtl"] .slide-in {
    animation: slideInFromRight 0.3s ease-in-out;
}

/* Border radius adjustments */
html[dir="rtl"] .rounded-left {
    border-radius: 0 5px 5px 0;
}

html[dir="rtl"] .rounded-right {
    border-radius: 5px 0 0 5px;
}

html[dir="ltr"] .rounded-left {
    border-radius: 5px 0 0 5px;
}

html[dir="ltr"] .rounded-right {
    border-radius: 0 5px 5px 0;
}

/* Print styles for RTL */
@media print {
    html[dir="rtl"] * {
        direction: rtl;
        text-align: right;
    }
}

/* Responsive adjustments for RTL on mobile */
@media (max-width: 768px) {
    html[dir="rtl"] .sidebar {
        position: fixed;
        right: 0;
        left: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    html[dir="rtl"] .sidebar.active {
        transform: translateX(0);
    }

    html[dir="rtl"] .main-content {
        margin-right: 0;
        margin-left: 0;
    }
}
