/**
 * MPS Price Table - Simple Design
 * تصميم جدول الأسعار البسيط
 * 
 * @version 6.0.0
 * @author Mobile Phone Specs Plugin
 */

/* ===== CONTAINER ===== */
.mps-price-table-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

.mps-price-table-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 16px;
    text-align: center;
    position: relative;
}

.mps-price-table-title::before {
    content: "💰";
    margin-left: 8px;
}

/* ===== TABLE CONTAINER ===== */
.mps-price-table-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* ===== TABLE STYLES ===== */
.mps-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
    background: #ffffff;
}

/* ===== HEADER ===== */
.mps-price-table thead {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: #ffffff;
}

.mps-price-table th {
    padding: 16px 12px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #1e3a8a;
    position: relative;
}

.mps-country-col {
    width: 200px;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.1);
}

.mps-country-header {
    font-size: 16px;
    font-weight: 700;
}

.mps-variant-col {
    min-width: 140px;
}

.mps-variant-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mps-storage {
    font-size: 15px;
    font-weight: 700;
}

.mps-separator {
    font-size: 12px;
    opacity: 0.8;
}

.mps-ram {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
}

/* ===== BODY ROWS ===== */
.mps-price-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.mps-price-table tbody tr:hover {
    background-color: #f8fafc;
}

.mps-price-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.mps-price-table tbody tr:nth-child(even):hover {
    background-color: #f1f5f9;
}

/* ===== CELLS ===== */
.mps-price-table td,
.mps-price-table th {
    border-left: 1px solid #e5e7eb;
}

.mps-price-table td:first-child,
.mps-price-table th:first-child {
    border-left: none;
}

/* ===== COUNTRY CELL ===== */
.mps-country-cell {
    padding: 14px 16px;
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    border-left: 4px solid #1e40af;
}

.mps-country-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mps-flag {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.mps-country-text {
    font-size: 14px;
    font-weight: 600;
}

/* ===== PRICE CELLS ===== */
.mps-price-cell {
    padding: 14px 12px;
    text-align: center;
    vertical-align: middle;
}

.mps-price-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.mps-price-amount {
    font-size: 16px;
    font-weight: 700;
    color: #1e40af;
    line-height: 1.2;
}

.mps-price-currency {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    opacity: 1;
}

.mps-price-unavailable {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    font-style: italic;
}

/* ===== USD ROW ===== */
.mps-official-usd-row {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
}

.mps-official-usd-row .mps-country-cell {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-left-color: #10b981;
}

.mps-official-usd-row .mps-country-text {
    color: #ffffff;
}

.mps-usd-price-cell {
    background: rgba(255, 255, 255, 0.05);
}

.mps-official-usd-value .mps-price-amount {
    color: #ffffff;
    font-size: 17px;
}

.mps-official-usd-value .mps-price-currency {
    color: rgba(255, 255, 255, 0.9);
}

.mps-official-usd-row .mps-price-unavailable {
    color: rgba(255, 255, 255, 0.6);
}

/* ===== ERROR STATES ===== */
.mps-price-error,
.mps-price-empty {
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.mps-price-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.mps-price-empty {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

/* ===== TABLE CAPTION - REMOVED ===== */
/* تم حذف عنوان الجدول حسب طلب المستخدم */

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* تحسين التباين للنصوص */
.mps-price-table {
    color: #1f2937;
}

.mps-country-text {
    color: #374151;
    font-weight: 600;
}

/* ===== RESPONSIVE DESIGN ===== */
/* تحسين التوافقية مع جميع الشاشات */

/* شاشات التابلت والأجهزة المتوسطة */
@media (max-width: 1024px) {
    .mps-price-table-wrapper {
        margin: 15px 0;
    }
    
    .mps-price-table-title {
        font-size: 22px;
    }
}

/* شاشات الموبايل الكبيرة */
@media (max-width: 768px) {
    .mps-price-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
    
    .mps-price-table {
        min-width: 600px;
        font-size: 13px;
    }
    
    .mps-price-table-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .mps-country-col {
        width: 160px;
        min-width: 140px;
    }
    
    .mps-variant-col {
        min-width: 120px;
    }
    
    .mps-price-table th {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .mps-price-cell {
        padding: 12px 8px;
    }
    
    .mps-country-cell {
        padding: 12px 10px;
    }
    
    .mps-price-amount {
        font-size: 15px;
    }
    
    .mps-country-text {
        font-size: 13px;
    }
    
    .mps-flag {
        font-size: 16px;
        width: 20px;
    }
    
    .mps-storage {
        font-size: 13px;
    }
    
    .mps-ram {
        font-size: 12px;
    }
}

/* شاشات الموبايل الصغيرة */
@media (max-width: 480px) {
    .mps-price-table-wrapper {
        margin: 10px 0;
    }
    
    .mps-price-table {
        min-width: 480px;
        font-size: 12px;
    }
    
    .mps-price-table-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .mps-country-col {
        width: 130px;
        min-width: 110px;
    }
    
    .mps-variant-col {
        min-width: 90px;
    }
    
    .mps-price-table th {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .mps-price-cell {
        padding: 8px 4px;
    }
    
    .mps-country-cell {
        padding: 8px 6px;
    }
    
    .mps-price-amount {
        font-size: 13px;
    }
    
    .mps-price-currency {
        font-size: 11px;
    }
    
    .mps-country-text {
        font-size: 11px;
    }
    
    .mps-flag {
        font-size: 14px;
        width: 18px;
    }
    
    .mps-variant-header {
        gap: 1px;
    }
    
    .mps-storage {
        font-size: 12px;
    }
    
    .mps-ram {
        font-size: 11px;
    }
    
    .mps-separator {
        font-size: 10px;
    }
}

/* شاشات الموبايل الصغيرة جداً */
@media (max-width: 360px) {
    .mps-price-table {
        min-width: 450px;
        font-size: 11px;
    }
    
    .mps-price-table-title {
        font-size: 16px;
    }
    
    .mps-country-col {
        width: 120px;
        min-width: 100px;
    }
    
    .mps-variant-col {
        min-width: 80px;
    }
    
    .mps-price-table th {
        padding: 6px 3px;
    }
    
    .mps-price-cell {
        padding: 6px 3px;
    }
    
    .mps-country-cell {
        padding: 6px 4px;
    }
    
    .mps-price-amount {
        font-size: 12px;
    }
    
    .mps-price-currency {
        font-size: 10px;
    }
    
    .mps-country-text {
        font-size: 10px;
    }
    
    .mps-storage {
        font-size: 11px;
    }
    
    .mps-ram {
        font-size: 10px;
    }
}

/* ===== LIGHT MODE ONLY - NO DARK MODE ===== */
/* تم إزالة الوضع المظلم حسب طلب المستخدم */

/* ===== PRINT STYLES ===== */
@media print {
    .mps-price-table-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .mps-price-table thead {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .mps-price-table tbody tr:hover {
        background: transparent !important;
    }
    
    .mps-official-usd-row {
        background: #e0e0e0 !important;
        color: #000 !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .mps-price-table-container {
        border: 2px solid #000;
    }
    
    .mps-price-table th {
        border: 1px solid #000;
    }
    
    .mps-price-table td {
        border: 1px solid #000;
    }
    
    .mps-price-amount {
        color: #000;
        font-weight: 900;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .mps-price-table tbody tr {
        transition: none;
    }
}
