/* Persian Gold Charts - Styles */
.persian-gold-chart {
    direction: rtl;
    text-align: right;
}

.pgc-chart-header {
    margin-bottom: 15px;
}

.pgc-chart-title {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.pgc-chart-container {
    position: relative;
    width: 100%;
    min-height: 100px;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
}

.pgc-chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10;
}

.pgc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0066CC;
    border-radius: 50%;
    animation: pgc-spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes pgc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pgc-loading-text {
    color: #666;
    font-size: 14px;
}

.pgc-chart-canvas {
    width: 100%;
    height: 100%;
    background: transparent;
}

/* استایل‌های مخصوص نمودار ساده */
.pgc-simple-chart {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pgc-simple-chart svg {
    background: transparent !important;
    border: none !important;
    display: block;
}

/* اطلاعات نمودار */
.pgc-chart-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.pgc-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #edf2f7;
}

.pgc-info-label {
    color: #4a5568;
    font-size: 12px;
    font-weight: 500;
}

.pgc-info-value {
    color: #2d3748;
    font-size: 13px;
    font-weight: 600;
}

/* پنل فشرده‌سازی */
.pgc-compression-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

.pgc-compression-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pgc-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.pgc-stat-label {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 3px;
}

.pgc-stat-value {
    font-size: 12px;
    font-weight: 600;
}

.pgc-stat-ratio {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

/* حالت خطا */
.pgc-error-state {
    text-align: center;
    padding: 40px 20px;
}

.pgc-error-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.pgc-error-message {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.pgc-retry-btn {
    background: #0066CC;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.pgc-retry-btn:hover {
    background: #0052a3;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .persian-gold-chart {
        margin: 15px 0;
    }
    
    .pgc-chart-title {
        font-size: 16px;
    }
    
    .pgc-chart-info {
        grid-template-columns: 1fr;
        padding: 12px;
    }
    
    .pgc-compression-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pgc-chart-title {
        font-size: 15px;
    }
    
    .pgc-compression-stats {
        grid-template-columns: 1fr;
    }
}

/* حالت تاریک */
@media (prefers-color-scheme: dark) {
    .pgc-chart-title {
        color: #e2e8f0;
    }
    
    .pgc-chart-loading {
        background: rgba(45, 45, 45, 0.95);
    }
    
    .pgc-loading-text {
        color: #b0b0b0;
    }
    
    .pgc-spinner {
        border-color: #404040;
        border-top-color: #4da6ff;
    }
    
    .pgc-chart-info {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .pgc-info-item {
        background: #4a5568;
        border-color: #718096;
    }
    
    .pgc-info-label {
        color: #cbd5e0;
    }
    
    .pgc-info-value {
        color: #f7fafc;
    }
    
    .pgc-compression-panel {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .pgc-stat-item {
        background: #4a5568;
        border-color: #718096;
    }
    
    .pgc-stat-label {
        color: #a0aec0;
    }
    
    .pgc-stat-value {
        color: #f7fafc;
    }
    
    .pgc-stat-ratio {
        background: rgba(72, 187, 120, 0.2);
        color: #9ae6b4;
    }
}

.pgc-compact-info {
    direction: rtl;
    width: 100%;
}

.pgc-info-row {
    display: flex;
	gap: 5px;
    justify-content: space-between;
}

.pgc-info-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.pgc-info-cell {
    flex: 1;
    display: flex;
    justify-content: space-between;
}

.pgc-info-label {
    color: #333;
    font-size: 13px;
}

.pgc-label {
    color: #666;
    font-weight: normal;
}

.pgc-value {
    color: #333;
    font-weight: bold;
    margin-right: 5px;
}