/*--------------------------------------------------------------
  Mobile Phone Specs - Detailed Specifications Styles
  تحسينات SEO وتصميم الجداول
--------------------------------------------------------------*/

.specs-table-caption {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    text-align: right;
    color: #333;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px 4px 0 0;
}

.specs-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.specs-feature-header, 
.specs-value-header {
    padding: 12px 15px;
    font-weight: 600;
    text-align: right;
    border: none;
    font-size: 0.95em;
}

.specs-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.specs-table tbody tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.2s ease;
}

.specs-value {
    font-weight: 500;
    color: #2c3e50;
}
/* تحسينات إضافية للأداء والتصميم */
.spec-section {
    margin-bottom: 2rem;
}

.section-icon {
    font-size: 1.4em;
    color: #3498db;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #e3f2fd;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.specs-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.specs-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
    text-align: right;
    vertical-align: top;
    line-height: 1.5;
}

.specs-table td:first-child {
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    width: 15% !important;
    max-width: 150px;
    border-left: 3px solid #ccc;
    position: relative;
}

.specs-table td:last-child {
    width: 85% !important;
}

/* قواعد إضافية لضمان تطبيق العرض الصحيح */
.specs-table tr td:nth-child(1) {
    width: 15% !important;
    max-width: 150px !important;
}

.specs-table tr td:nth-child(2) {
    width: 85% !important;
}

.specs-table td:first-child::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #ccc;
    box-shadow: 1px 0 2px rgba(204, 204, 204, 0.3);
}

.specs-list {
    margin: 0 !important;
    padding-right: 18px !important;
    padding-left: 0 !important;
    list-style-type: none !important;
    font-size: 0.95em !important;
}

/* Specific override for specs table context */
.specs-table .specs-value .specs-list {
    margin: 0 !important;
    padding-right: 18px !important;
    padding-left: 0 !important;
    list-style-type: none !important;
    font-size: 0.95em !important;
}

.specs-list li {
    margin-bottom: 3px !important;
    line-height: 1.4 !important;
    padding-right: 2px !important;
    padding-left: 0 !important;
    position: relative !important;
}

/* Specific override for specs table context */
.specs-table .specs-value .specs-list li {
    margin-bottom: 3px !important;
    line-height: 1.4 !important;
    padding-right: 2px !important;
    padding-left: 0 !important;
    position: relative !important;
    text-align: right !important;
}

/* Override conflicting styles from other CSS files */
.specs-table .specs-value .specs-list li:before {
    content: "•" !important;
    color: #000000 !important;
    font-weight: bold !important;
    position: absolute !important;
    right: -15px !important;
    top: auto !important;
}

/* Fallback for direct .specs-list usage */
.specs-list li:before {
    content: "•" !important;
    color: #000000 !important;
    font-weight: bold !important;
    position: absolute !important;
    right: -15px !important;
}

/* تحسينات إضافية لفصل المواصفات التفصيلية عن البسيطة */
.phone-specs-detailed {
    width: 100%;
    max-width: none;
}

/* تحسين المسافات بين الأقسام */
.spec-section {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* تحسين عناوين الأقسام */
.section-title {
    margin-bottom: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 700;
    border-bottom: 3px solid #3498db;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* تحسين حاوية الجدول */
.specs-table-wrapper {
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #e9ecef;
    border-top: none;
}

.phone-specs-detailed .phone-specs-container {
    max-width: none;
    width: 100%;
}

/* تحسينات للأجهزة المحمولة - عرض كامل للشاشة */
@media (max-width: 768px) {
    /* إزالة الحاويات والفراغات الجانبية للمواصفات التفصيلية */
    .phone-specs-detailed {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .phone-specs-container {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* القسم النشط للمواصفات التفصيلية */
    #specs-section.content-section {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* أقسام المواصفات */
    .spec-section {
        margin: 0 !important;
        margin-bottom: 1rem !important;
        padding: 0 !important;
    }
    
    /* عنوان القسم */
    .section-title {
        font-size: 1em;
        margin: 0 !important;
        padding: 12px 15px !important;
        background: #f8f9fa;
        color: #2c3e50;
        border-radius: 0;
        border-bottom: 2px solid #3498db;
    }
    
    .section-icon {
        font-size: 1.2em;
        width: 32px;
        height: 32px;
        padding: 6px;
    }
    
    /* حاوية الجدول */
    .specs-table-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        overflow-x: auto;
        box-shadow: none !important;
    }
    
    /* الجدول نفسه */
    .specs-table {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    /* خلايا الجدول */
    .specs-table td {
        padding: 8px 12px;
        font-size: 0.9em;
        border-left: none;
        border-right: none;
    }
    
    .specs-table td:first-child {
        width: 18% !important;
        min-width: 80px;
        max-width: 100px;
        border-left: 2px solid #ccc;
        padding: 6px 8px;
    }
    
    .specs-table td:first-child::after {
        width: 1px;
        background: #ccc;
        box-shadow: 1px 0 1px rgba(204, 204, 204, 0.2);
    }
    
    .specs-table td:last-child {
        width: 82% !important;
    }
    
    /* رؤوس الجدول */
    .specs-feature-header, 
    .specs-value-header {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    
    /* القوائم داخل الخلايا */
    .specs-list {
        margin: 0;
        padding-right: 14px;
        font-size: 0.85em;
    }
    
    .specs-list li {
        margin-bottom: 3px;
        line-height: 1.3;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .specs-table td {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    .specs-table td:first-child {
        width: 22% !important;
        min-width: 70px;
        max-width: 85px;
        border-left: 2px solid #ccc;
        font-size: 0.75em;
        padding: 4px 6px;
    }
    
    .specs-table td:first-child::after {
        display: none;
    }
    
    .specs-table td:last-child {
        width: 78% !important;
    }
    
    .section-title {
        padding: 10px 12px !important;
        font-size: 0.95em;
        border-bottom: 2px solid #3498db;
    }
    
    .specs-feature-header, 
    .specs-value-header {
        padding: 8px 10px;
        font-size: 0.85em;
    }
    
    .specs-list {
        padding-right: 12px;
        font-size: 0.8em;
    }
    
    /* تحسين المسافات للشاشات الصغيرة */
    .spec-section {
        margin-bottom: 1rem;
    }
    
    .section-title {
        padding: 10px 12px;
        font-size: 0.9em;
        border-bottom: 2px solid #3498db;
    }
    
    .section-icon {
        width: 28px;
        height: 28px;
        font-size: 1.1em;
        padding: 5px;
    }
}

/* تحسينات للتابلت */
@media (min-width: 769px) and (max-width: 1024px) {
    .phone-specs-detailed {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .specs-table td {
        padding: 10px 15px;
    }
    
    .section-title {
        padding: 15px 20px;
    }
}

/* تأثيرات إضافية للتحسين البصري */
.specs-table tbody tr:hover {
    background-color: #f0f8ff;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.specs-table tbody tr:hover td:first-child {
    border-left-color: #999;
    background-color: #f5f5f5;
}

.specs-table tbody tr:hover td:first-child::after {
    background: #999;
    box-shadow: 1px 0 3px rgba(153, 153, 153, 0.4);
}

/* تحسين النصوص والقوائم */
.specs-table td {
    font-size: 0.95em;
    color: #374151;
}

.specs-table td:first-child {
    font-size: 0.9em;
    letter-spacing: 0.3px;
}

.specs-list li {
    color: #4b5563;
    transition: color 0.2s ease;
}

.specs-table tbody tr:hover .specs-list li {
    color: #1f2937;
}

/* إزالة مؤشر الحركة وتأثيرات التحريك */
.specs-table,
.specs-table tbody,
.specs-table tbody tr,
.specs-table tbody tr td {
    transform: none !important;
    will-change: auto !important;
}

.specs-table tbody tr:hover {
    transform: none !important;
}

/* تحسينات الطباعة */
@media print {
    .specs-table thead {
        background: #333 !important;
        color: white !important;
    }
    
    .specs-table tbody tr:hover {
        background-color: transparent !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .specs-table td:first-child::after {
        display: none !important;
    }
}

/* أنماط زر المقارنة للمواصفات التفصيلية */
.mps-btn-comparison {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    text-decoration: none;
}

.mps-btn-comparison:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: white;
}

.mps-btn-comparison:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.mps-btn-comparison .material-icons {
    font-size: 18px;
}

.mps-btn-comparison.added {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.mps-btn-comparison.added:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.mps-comparison-button-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* التصميم المتجاوب لزر المقارنة */
@media (max-width: 768px) {
    .mps-btn-comparison {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .mps-comparison-button-container {
        margin: 20px 0;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .mps-btn-comparison {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .mps-comparison-button-container {
        margin: 15px 0;
        padding: 12px;
    }
}
