/* تنسيقات الواجهة الأمامية لإضافة LiveCoin */

/* الأيقونات */
.crypto-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
}

.crypto-icon-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}

.crypto-icon-tiny {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-left: 3px;
    vertical-align: middle;
}

/* تنسيق inline مع دعم RTL */
.crypto-price-inline {
    display: inline !important;
    font-size: inherit;
    line-height: inherit;
    white-space: nowrap;
    vertical-align: baseline;
    margin: 0;
    padding: 0;
    direction: rtl;
    unicode-bidi: embed;
}

.crypto-price-inline * {
    display: inline !important;
    vertical-align: baseline;
    margin: 0 !important;
    padding: 0 !important;
}

.crypto-price-inline .crypto-icon-small {
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 4px !important;
}

.crypto-price-inline .crypto-price-value {
    font-weight: bold;
    color: #2196F3;
    display: inline !important;
}

.crypto-price-inline .crypto-change {
    font-size: 0.9em;
    margin: 0 4px !important;
    display: inline !important;
}

/* تنسيق البطاقة */
.crypto-price-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 300px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
    text-align: right;
}

.crypto-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-direction: row-reverse;
}

.crypto-card-title {
    flex: 1;
}

.crypto-card-title .crypto-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.crypto-card-title .crypto-symbol {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.crypto-card-content {
    margin-bottom: 12px;
}

.crypto-price-main {
    font-size: 24px;
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 8px;
}

.crypto-change-24h {
    display: flex;
    align-items: center;
    font-size: 14px;
    flex-direction: row-reverse;
}

.crypto-change-24h .change-icon {
    margin-left: 4px;
    font-size: 16px;
}

.crypto-change-24h .change-value {
    font-weight: 600;
}

.crypto-change-24h .change-label {
    color: #666;
    font-weight: normal;
}

.crypto-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
}

/* تنسيق compact */
.crypto-price-compact {
    display: inline;
    font-size: inherit;
    white-space: nowrap;
}

.crypto-price-compact .crypto-price-value {
    font-weight: bold;
    margin: 0 3px;
}

.crypto-change-compact {
    font-size: 1.1em;
    margin-right: 3px;
}

/* تنسيق الجدول */
.crypto-price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
}

.crypto-price-table th,
.crypto-price-table td {
    padding: 12px 8px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.crypto-price-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.crypto-price-table td {
    font-size: 14px;
}

.crypto-coin-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row-reverse;
    gap: 8px;
    text-align: center;
}

.crypto-coin-cell .crypto-icon-small {
    flex-shrink: 0;
    margin: 0 !important;
}

.crypto-coin-cell .crypto-name {
    font-weight: 600;
    color: #333;
}

.crypto-coin-cell .crypto-symbol {
    color: #666;
    font-size: 13px;
}

.crypto-price-cell {
    font-weight: bold;
    font-size: 16px;
}

.crypto-change-cell {
    font-weight: 600;
}

.crypto-change-cell .change-icon {
    margin-left: 4px;
}

.crypto-table-source {
    display: block;
    text-align: center;
    color: #888;
    font-size: 11px;
    margin-top: 8px;
}

/* ألوان التغيير */
.positive {
    color: #4CAF50 !important;
}

.negative {
    color: #F44336 !important;
}

/* رسائل الخطأ */
.crypto-error {
    color: #F44336;
    font-style: italic;
    padding: 8px 12px;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    display: inline-block;
    font-size: 14px;
}

/* تأثيرات التفاعل */
.crypto-price-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.crypto-price-table tr:hover {
    background-color: #f9f9f9;
}

/* تنسيقات متجاوبة */
@media (max-width: 768px) {
    .crypto-price-card {
        max-width: 100%;
        margin: 12px 0;
        padding: 12px;
    }
    
    .crypto-price-main {
        font-size: 20px;
    }
    
    .crypto-card-title .crypto-name {
        font-size: 16px;
    }
    
    .crypto-price-table {
        font-size: 13px;
    }
    
    .crypto-price-table th,
    .crypto-price-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .crypto-price-card {
        padding: 10px;
    }
    
    .crypto-card-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: right;
    }
    
    .crypto-icon {
        width: 24px;
        height: 24px;
        margin-bottom: 8px;
    }
    
    .crypto-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* تنسيقات خاصة للغة العربية */
.crypto-price-card,
.crypto-price-table {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* تحسينات الطباعة */
@media print {
    .crypto-price-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .crypto-change-24h .change-icon {
        display: none;
    }
}

/* تنسيقات إضافية للتخصيص */
.crypto-price-wrapper {
    margin: 1em 0;
}

.crypto-loading {
    color: #666;
    font-style: italic;
}

.crypto-source {
    font-size: 11px;
    color: #999;
    text-decoration: none;
}

.crypto-source:hover {
    color: #666;
}

/* تنسيقات الجدول المتعدد العملات */
.crypto-multi-table-wrapper {
    margin: 20px 0;
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #fff;
}

.crypto-multi-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
    min-width: 600px;
}

.crypto-multi-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    padding: 15px 12px;
    text-align: right;
    font-size: 14px;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.crypto-multi-table th:first-child {
    border-radius: 8px 0 0 0;
}

.crypto-multi-table th:last-child {
    border-radius: 0 8px 0 0;
}

.crypto-multi-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    vertical-align: middle;
}

.crypto-table-row:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.crypto-table-row:last-child td {
    border-bottom: none;
}

/* أعمدة الجدول */
.crypto-rank-col {
    width: 50px;
    text-align: center !important;
}

.crypto-coin-col {
    width: 200px;
    text-align: center !important;
}

.crypto-price-col {
    width: 120px;
}

.crypto-change-col {
    width: 120px;
}

.crypto-updated-col {
    width: 120px;
}

/* محتوى الخلايا */
.crypto-rank {
    text-align: center;
    font-weight: bold;
    color: #666;
    font-size: 16px;
}

.crypto-coin-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.crypto-coin-info .crypto-icon-small {
    flex-shrink: 0;
    margin: 0 auto 4px auto !important;
    display: block;
}

.crypto-coin-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.crypto-coin-details .crypto-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    line-height: 1.2;
}

.crypto-coin-details .crypto-symbol {
    color: #666;
    font-size: 12px;
    margin-top: 2px;
}

.crypto-price-value {
    font-weight: bold;
    font-size: 16px;
    color: #2196F3;
}

.crypto-change {
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.crypto-change .change-icon {
    font-size: 16px;
}

.crypto-last-updated {
    color: #666;
    font-size: 12px;
}

/* تذييل الجدول */
.crypto-table-footer {
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
    border-radius: 0 0 8px 8px;
}

.crypto-table-footer .crypto-source {
    color: #6c757d;
    font-size: 11px;
}

/* تنسيقات متجاوبة للجدول المتعدد */
@media (max-width: 768px) {
    .crypto-multi-table-wrapper {
        margin: 15px -15px;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #e9ecef;
        border-bottom: 1px solid #e9ecef;
    }
    
    .crypto-multi-table {
        min-width: 500px;
        font-size: 13px;
    }
    
    .crypto-multi-table th,
    .crypto-multi-table td {
        padding: 10px 8px;
    }
    
    .crypto-coin-col {
        width: 150px;
    }
    
    .crypto-price-col,
    .crypto-change-col,
    .crypto-updated-col {
        width: 100px;
    }
    
    .crypto-coin-details .crypto-name {
        font-size: 13px;
    }
    
    .crypto-coin-details .crypto-symbol {
        font-size: 11px;
    }
    
    .crypto-price-value {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .crypto-multi-table {
        min-width: 450px;
        font-size: 12px;
    }
    
    .crypto-multi-table th,
    .crypto-multi-table td {
        padding: 8px 6px;
    }
    
    .crypto-rank-col {
        width: 40px;
    }
    
    .crypto-coin-col {
        width: 130px;
    }
    
    .crypto-price-col,
    .crypto-change-col,
    .crypto-updated-col {
        width: 90px;
    }
    
    .crypto-updated-col {
        display: none; /* إخفاء عمود آخر تحديث في الشاشات الصغيرة */
    }
}

/* تنسيق SEO محسّن مع دعم RTL */
.crypto-display {
    display: inline !important;
    font-size: inherit;
    line-height: inherit;
    white-space: nowrap;
    vertical-align: baseline;
    margin: 0;
    padding: 0;
    font-family: inherit;
    color: inherit;
    direction: rtl;
    unicode-bidi: embed;
}

.crypto-display img {
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 4px !important;
    padding: 0 !important;
    border: none;
    background: none;
    box-shadow: none;
}

.crypto-display strong {
    font-weight: bold;
    color: #2196F3;
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
}

.crypto-display .price-change {
    font-size: inherit;
    font-weight: normal;
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
}

.crypto-display .price-change.positive {
    color: #4CAF50 !important;
}

.crypto-display .price-change.negative {
    color: #F44336 !important;
}

/* تأكيد أن العنصر يظهر بشكل طبيعي في النص مع دعم RTL */
.crypto-display,
.crypto-display * {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    outline: none !important;
}

/* تحسينات خاصة للنصوص المختلطة (عربي + إنجليزي) */
.crypto-display {
    text-align: inherit;
}

/* ضمان عدم كسر النص في المتصفحات المختلفة */
.crypto-display {
    word-break: keep-all;
    overflow-wrap: normal;
}

/* تنسيقات البطاقة العريضة الجديدة */
.crypto-price-wide-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
    text-align: right;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 800px;
}

.crypto-price-wide-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* المحتوى الرئيسي - تخطيط أفقي */
.crypto-wide-card-content {
    display: flex;
    align-items: center;
    padding: 24px;
    gap: 24px;
    min-height: 120px;
}

/* الجانب الأيمن - الأيقونة ومعلومات العملة */
.crypto-wide-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    min-width: 200px;
}

.crypto-wide-card-icon {
    flex-shrink: 0;
}

.crypto-icon-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.crypto-wide-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crypto-wide-name {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.crypto-wide-symbol {
    font-size: 16px;
    color: #666;
    font-weight: 500;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* الجانب الأوسط - السعر والتغيير */
.crypto-wide-card-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 0 20px;
}

.crypto-wide-price-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crypto-wide-price-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crypto-wide-price-main {
    font-size: 36px;
    font-weight: 800;
    color: #2196F3;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.crypto-wide-change-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crypto-wide-change-label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.crypto-wide-change-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(0,0,0,0.05);
}

.crypto-wide-change-icon {
    font-size: 20px;
}

.crypto-wide-change-text {
    font-weight: 700;
}

/* الجانب الأيسر - إحصائيات إضافية */
.crypto-wide-card-right {
    flex-shrink: 0;
    min-width: 150px;
}

.crypto-wide-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.crypto-wide-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-right: 3px solid #2196F3;
}

.crypto-wide-stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crypto-wide-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* تذييل البطاقة العريضة */
.crypto-wide-card-footer {
    background: #f8f9fa;
    padding: 12px 24px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.crypto-wide-source {
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
}

/* ألوان التغيير للبطاقة العريضة */
.crypto-wide-change-value.positive {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.crypto-wide-change-value.negative {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* تنسيقات متجاوبة للبطاقة العريضة */
@media (max-width: 768px) {
    .crypto-wide-card-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .crypto-wide-card-left {
        justify-content: center;
        min-width: auto;
        width: 100%;
    }
    
    .crypto-wide-card-center {
        padding: 0;
        width: 100%;
    }
    
    .crypto-wide-card-right {
        min-width: auto;
        width: 100%;
    }
    
    .crypto-wide-stats {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .crypto-wide-stat-item {
        flex: 1;
        margin: 0 5px;
    }
    
    .crypto-wide-name {
        font-size: 20px;
    }
    
    .crypto-wide-price-main {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .crypto-wide-card-content {
        padding: 16px;
        gap: 16px;
    }
    
    .crypto-icon-large {
        width: 48px;
        height: 48px;
    }
    
    .crypto-wide-name {
        font-size: 18px;
    }
    
    .crypto-wide-price-main {
        font-size: 24px;
    }
    
    .crypto-wide-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .crypto-wide-stat-item {
        margin: 0;
    }
} 