/**
 * SMAB Church Volunteer System - RTL Styles
 * Right-to-Left language support (Arabic)
 */

/* RTL Base Styles */
[dir="rtl"] .smab-wrapper {
    direction: rtl;
    text-align: right;
}

/* RTL Navigation */
[dir="rtl"] .smab-nav-menu a::after {
    right: 0;
    left: auto;
}

[dir="rtl"] .smab-nav-menu a:hover::after {
    width: 100%;
}

/* RTL Language Switcher */
[dir="rtl"] .smab-lang-options {
    right: auto;
    left: 0;
}

/* RTL Hero Section */
[dir="rtl"] .smab-hero::before {
    transform: scaleX(-1);
}

/* RTL Service Cards */
[dir="rtl"] .smab-service-badge {
    right: auto;
    left: var(--smab-spacing-sm);
}

/* RTL Event Cards */
[dir="rtl"] .smab-event-date {
    right: auto;
    left: var(--smab-spacing-md);
}

[dir="rtl"] .smab-event-title {
    padding-right: 0;
    padding-left: 90px;
}

/* RTL Forms */
[dir="rtl"] .smab-input-hint {
    text-align: right;
}

/* RTL Status Badges */
[dir="rtl"] .smab-badge {
    flex-direction: row-reverse;
}

/* RTL Application Status */
[dir="rtl"] .smab-status-value {
    text-align: left;
}

/* RTL Footer */
[dir="rtl"] .smab-footer-section a:hover {
    transform: translateX(-4px);
}

/* RTL Mobile Menu */
[dir="rtl"] .smab-mobile-menu {
    animation: slideInRTL 0.3s ease;
}

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

[dir="rtl"] .smab-mobile-menu-close {
    right: auto;
    left: var(--smab-spacing-md);
}

[dir="rtl"] .smab-mobile-nav-menu a:hover {
    padding-right: var(--smab-spacing-md);
    padding-left: calc(var(--smab-spacing-md) + 8px);
}

/* RTL Typography */
[dir="rtl"] .smab-wrapper {
    font-family: 'Cairo', 'Open Sans', sans-serif;
}

[dir="rtl"] .smab-hero-title,
[dir="rtl"] .smab-section-title,
[dir="rtl"] .smab-service-title,
[dir="rtl"] .smab-event-title,
[dir="rtl"] .smab-form-title,
[dir="rtl"] .smab-status-title,
[dir="rtl"] .smab-footer-section h4 {
    font-family: 'Cairo', 'Playfair Display', serif;
}

/* RTL Spacing Adjustments */
[dir="rtl"] .smab-service-detail-item,
[dir="rtl"] .smab-event-datetime span,
[dir="rtl"] .smab-event-location,
[dir="rtl"] .smab-attendance-time {
    flex-direction: row-reverse;
}

/* RTL Buttons with Icons */
[dir="rtl"] .smab-btn {
    flex-direction: row-reverse;
}

/* RTL Notices */
[dir="rtl"] .smab-notice {
    border-left: none;
    border-right: 4px solid;
}

/* RTL Form Groups */
[dir="rtl"] .smab-form-group {
    text-align: right;
}

/* RTL Focus Styles */
[dir="rtl"] *:focus-visible {
    outline-offset: -2px;
}

/* RTL Specific Fixes */
[dir="rtl"] .smab-logo {
    flex-direction: row-reverse;
}

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

[dir="rtl"] .smab-logo-text {
    text-align: right;
}

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

/* RTL Card Details */
[dir="rtl"] .smab-service-details,
[dir="rtl"] .smab-status-row {
    text-align: right;
}

/* RTL Footer Links */
[dir="rtl"] .smab-footer-section a {
    flex-direction: row-reverse;
}

/* RTL Loading Spinner */
[dir="rtl"] .smab-loading {
    animation-direction: reverse;
}

/* RTL Accessibility */
[dir="rtl"] .smab-visually-hidden {
    transform: translateX(-100%);
}

/* RTL Responsive Adjustments */
@media (max-width: 767px) {
    [dir="rtl"] .smab-hero-actions {
        flex-direction: column;
    }

    [dir="rtl"] .smab-hero-actions .smab-btn {
        width: 100%;
    }
}

/* Legacy .rtl class support */
.rtl {
    direction: rtl;
}

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

.rtl .smab-logo {
    margin-right: 0;
    margin-left: 20px;
}

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

.rtl .smab-event-datetime {
    flex-direction: column;
}

.rtl .smab-status-row {
    flex-direction: row-reverse;
}

.rtl .smab-status-label {
    text-align: right;
}

.rtl .smab-status-value {
    text-align: left;
}

.rtl .smab-lang-flag {
    margin-right: 0;
    margin-left: 8px;
}

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

.rtl .smab-notice {
    border-left: none;
    border-right: 4px solid;
}

.rtl .smab-service-details,
.rtl .smab-event-description {
    text-align: right;
}

/* RTL Font adjustments for Arabic */
.rtl .smab-wrapper {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif;
}

/* RTL specific spacing adjustments */
@media (min-width: 768px) {
    .rtl .smab-event-datetime {
        flex-direction: row-reverse;
        justify-content: flex-start;
    }
}

/* RTL Mobile Menu */
.rtl .smab-mobile-menu-close {
    right: auto;
    left: 20px;
}

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

/* RTL Icon positioning */
.rtl .smab-icon {
    transform: scaleX(-1);
}

/* RTL Button content alignment */
.rtl .smab-btn {
    text-align: center;
}

/* RTL Form elements */
.rtl .smab-input,
.rtl .smab-select,
.rtl .smab-textarea {
    text-align: right;
}

/* RTL Table styles (if used) */
.rtl .smab-table {
    direction: rtl;
    text-align: right;
}

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

/* RTL Card layouts */
.rtl .smab-service-content,
.rtl .smab-event-content {
    text-align: right;
}

/* RTL Badge positioning */
.rtl .smab-badge {
    text-align: right;
}

/* RTL Attendance items */
.rtl .smab-attendance-item {
    flex-direction: row-reverse;
}

/* RTL Footer */
.rtl .smab-footer-bottom {
    text-align: center;
}
