/*
 * RTL Support for Urdu (اردو) - Earn From Pakistan
 * Right-to-Left language support stylesheet
 */

/* Import Noto Nastaliq Urdu font for proper Urdu rendering */
@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;500;600;700&display=swap');

/* RTL language attribute styles */
[lang="ur"],
[dir="rtl"],
html[lang="ur"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Mehr Nastaliq', serif;
}

/* Reset font for elements that should use system fonts */
[lang="ur"] code,
[lang="ur"] pre,
[lang="ur"] .font-mono {
    font-family: 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
    direction: ltr;
}

/* Navigation RTL */
[lang="ur"] .main-nav {
    flex-direction: row-reverse;
}

[lang="ur"] .nav-menu {
    text-align: right;
}

[lang="ur"] .dropdown-menu {
    left: auto;
    right: 0;
    text-align: right;
}

/* Breadcrumbs RTL */
[lang="ur"] .breadcrumbs-list {
    flex-direction: row-reverse;
}

[lang="ur"] .breadcrumbs-item:not(:last-child)::after {
    content: '\\';
}

/* Lists RTL */
[lang="ur"] .article-content ul,
[lang="ur"] .article-content ol {
    padding-left: 0;
    padding-right: 2rem;
}

[lang="ur"] ul {
    list-style-position: inside;
}

/* Cards RTL */
[lang="ur"] .card {
    text-align: right;
}

[lang="ur"] .card-meta {
    flex-direction: row-reverse;
}

/* Warning box RTL */
[lang="ur"] .warning-box {
    border-left: none;
    border-right: 4px solid #f59e0b;
    border-radius: 8px 0 0 8px;
}

/* Solution steps RTL */
[lang="ur"] .solution-step {
    border-left: none;
    border-right: 4px solid #2563EB;
}

/* Answer capsule RTL */
[lang="ur"] .answer-capsule {
    border-left: none;
    border-right: 4px solid #2563EB;
    border-radius: 8px 0 0 8px;
}

/* Callout boxes RTL */
[lang="ur"] .callout {
    border-left: none;
    border-right: 4px solid;
}

[lang="ur"] .callout-tip {
    border-right-color: #10B981;
}

[lang="ur"] .callout-warning {
    border-right-color: #F59E0B;
}

[lang="ur"] .callout-error {
    border-right-color: #ef4444;
}

/* FAQ RTL */
[lang="ur"] .faq-question {
    flex-direction: row-reverse;
    text-align: right;
}

/* Author RTL */
[lang="ur"] .author-mini {
    flex-direction: row-reverse;
    text-align: right;
}

[lang="ur"] .author-hero-content {
    flex-direction: row-reverse;
}

/* Footer RTL */
[lang="ur"] .footer-grid {
    direction: rtl;
}

[lang="ur"] .footer-col {
    text-align: right;
}

/* Sidebar RTL */
[lang="ur"] .with-sidebar {
    direction: rtl;
}

/* Problem list RTL */
[lang="ur"] .problem-item {
    flex-direction: row-reverse;
    text-align: right;
}

/* Alternative cards RTL */
[lang="ur"] .alternative-header {
    flex-direction: row-reverse;
}

/* Forms RTL */
[lang="ur"] .hero-search form {
    flex-direction: row-reverse;
}

[lang="ur"] .nav-search form {
    flex-direction: row-reverse;
}

/* Buttons RTL */
[lang="ur"] .btn {
    flex-direction: row-reverse;
}

/* Promo box RTL */
[lang="ur"] .promo-box-header {
    flex-direction: row-reverse;
}

/* Timeline RTL */
[lang="ur"] .timeline {
    padding-left: 0;
    padding-right: 3rem;
}

[lang="ur"] .timeline::before {
    left: auto;
    right: 0;
}

[lang="ur"] .timeline-year {
    left: auto;
    right: calc(-3rem - 40px);
    text-align: left;
}

/* Social links RTL */
[lang="ur"] .social-links {
    flex-direction: row-reverse;
}

/* Trust badges RTL */
[lang="ur"] .trust-badges {
    flex-direction: row-reverse;
}

/* Stats grid RTL */
[lang="ur"] .stats-grid {
    direction: rtl;
}

/* Related articles RTL */
[lang="ur"] .related-grid {
    direction: rtl;
}

/* Error page RTL */
[lang="ur"] .error-actions {
    flex-direction: row-reverse;
}

[lang="ur"] .error-suggestions {
    text-align: right;
}

[lang="ur"] .error-suggestions ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

/* Comparison table RTL */
[lang="ur"] .comparison-table th,
[lang="ur"] .comparison-table td {
    text-align: right;
}

/* Skip link RTL */
[lang="ur"] .skip-link {
    left: auto;
    right: 0;
}

/* Specific Urdu typography adjustments */
[lang="ur"] h1,
[lang="ur"] h2,
[lang="ur"] h3,
[lang="ur"] h4,
[lang="ur"] h5,
[lang="ur"] h6 {
    line-height: 1.5;
}

[lang="ur"] p {
    line-height: 2;
}

/* ============================================================
   Language Switcher
   ============================================================ */
.language-switcher {
    display: flex;
    gap: 0.25rem;
}

.language-switcher a {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
}

.language-switcher a.active {
    background: #2563EB;
    color: white;
}

.language-switcher a:not(.active) {
    background: #f3f4f6;
    color: #6B7280;
}

.language-switcher a:hover:not(.active) {
    background: #e5e7eb;
}

/* ============================================================
   Pakistan-specific Components
   ============================================================ */

/* Pakistan flag colors */
.pk-green {
    color: #01411C;
}

.pk-white {
    color: #FFFFFF;
}

/* PayPal not available warning box */
.paypal-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.paypal-warning h3 {
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.paypal-warning p {
    margin-bottom: 1rem;
}

[lang="ur"] .paypal-warning {
    text-align: right;
}

/* Payoneer promotion box */
.payoneer-promo {
    background: linear-gradient(135deg, #FF4F00 0%, #FF6B00 100%);
    border-radius: 12px;
    padding: 2rem;
    color: white;
    text-align: center;
    margin: 2rem 0;
}

.payoneer-promo h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.payoneer-promo .btn {
    background: white;
    color: #FF4F00;
}

.payoneer-promo .btn:hover {
    background: #f9fafb;
}

[lang="ur"] .payoneer-promo {
    text-align: right;
}

/* JazzCash/Easypaisa promotion boxes */
.mobile-wallet-promo {
    background: linear-gradient(135deg, #E31837 0%, #FF4444 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    margin: 1.5rem 0;
}

.mobile-wallet-promo.easypaisa {
    background: linear-gradient(135deg, #8CC63F 0%, #6BAA3C 100%);
}

.mobile-wallet-promo h4 {
    color: white;
    margin-bottom: 0.5rem;
}

/* Bank transfer highlight */
.bank-highlight {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.bank-highlight .bank-name {
    font-weight: 600;
    color: #0369a1;
}

/* PSEB/FBR registration callout */
.registration-callout {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #10b981;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.registration-callout h4 {
    color: #059669;
    margin-bottom: 0.5rem;
}

.registration-callout ul {
    margin: 0;
    padding-left: 1.5rem;
}

[lang="ur"] .registration-callout ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

/* Load shedding/power solution box */
.power-solution-box {
    background: #fef9c3;
    border: 1px solid #eab308;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.power-solution-box h4 {
    color: #854d0e;
    margin-bottom: 0.5rem;
}

/* Dollar rate display */
.dollar-rate {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
}

.dollar-rate .rate-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.dollar-rate .rate-value {
    font-size: 1.125rem;
}
