/**
 * Campaign Stats Cards & Charts Styling
 * Modern, clean, minimal design consistent with MeshMerchant
 */

/* Stats Cards Container */
.campaign-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
    padding: 0;
}

@media (max-width: 768px) {
    .campaign-stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 16px 0;
    }
}

@media (max-width: 480px) {
    .campaign-stats-cards {
        grid-template-columns: 1fr;
    }
}

/* Individual Stat Card - Modern Settings Card Style */
.campaign-stat-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 20px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.campaign-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

.campaign-stat-card:active {
    transform: translateY(0);
}

/* Stat Icon */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* Stat Content */
.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change i {
    font-size: 10px;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

@media (max-width: 900px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

/* Individual Chart Container - Clean Modern Style */
.stat-chart-container {
    background: #f8fafc;
    border-radius: 14px;
    padding: 24px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chart Header */
.stat-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-title i {
    font-size: 18px;
}

/* Chart Close Button */
.chart-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    padding: 0;
}

.chart-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Chart Canvas */
.stat-chart-container canvas {
    width: 100% !important;
    height: 280px !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .campaign-stat-card {
        padding: 16px;
        gap: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-change {
        font-size: 11px;
    }

    .stat-chart-container {
        padding: 16px;
    }

    .stat-chart-container canvas {
        height: 220px !important;
    }
}

/* Dark Mode disabled to maintain consistent app theme
@media (prefers-color-scheme: dark) {
    .campaign-stat-card {
        background: #1e293b;
        border-color: #334155;
    }

    .stat-label {
        color: #94a3b8;
    }

    .stat-value {
        color: #f1f5f9;
    }

    .stat-chart-container {
        background: #1e293b;
        border-color: #334155;
    }

    .chart-title {
        color: #f1f5f9;
    }

    .chart-close-btn {
        background: transparent;
        color: #94a3b8;
    }

    .chart-close-btn:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }
}
*/

/* Loading State */
.campaign-stats-cards.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty State */
.campaign-stats-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* Smooth Transitions */
.campaign-stats-cards,
.charts-container,
.campaign-stat-card,
.stat-chart-container {
    transition: all 0.3s ease;
}
