/* ===== SUMMARY CARD - PREMIUM RADZEN STYLES ===== */

.summary-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 20px !important;
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.1),
        0 4px 16px rgba(255,255,255,0.1) inset !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
    min-height: 220px;
    cursor: pointer;
}

.summary-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.15),
        0 8px 32px rgba(255,255,255,0.15) inset !important;
    border-color: rgba(var(--rz-primary-rgb), 0.4) !important;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--rz-primary), var(--rz-secondary), var(--rz-success));
    border-radius: 20px 20px 0 0;
    animation: gradientShift 3s ease-in-out infinite;
    z-index: 1;
}

.summary-card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* ===== RADZEN OVERRIDES ===== */

.summary-card > .rz-stack {
    position: relative;
    z-index: 2;
}

.summary-card .summary-card-header {
    margin-bottom: 2rem;
}

.summary-card .summary-card-icon {
    background: linear-gradient(135deg, var(--rz-primary-lighter), var(--rz-primary)) !important;
    border-radius: 16px !important;
    padding: 1rem !important;
    min-width: 70px;
    height: 70px;
    box-shadow: 
        0 8px 24px rgba(var(--rz-primary-rgb), 0.3),
        0 2px 8px rgba(255,255,255,0.2) inset !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.summary-card:hover .summary-card-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 
        0 12px 32px rgba(var(--rz-primary-rgb), 0.4),
        0 4px 12px rgba(255,255,255,0.3) inset !important;
}

.summary-card .summary-card-main-metric {
    background: linear-gradient(135deg, rgba(var(--rz-primary-rgb), 0.08), rgba(var(--rz-secondary-rgb), 0.05)) !important;
    border: 1px solid rgba(var(--rz-primary-rgb), 0.15) !important;
    border-radius: 16px !important;
    position: relative;
    overflow: hidden;
}

.summary-card .summary-card-main-metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: slideRight 2s ease-in-out infinite;
    z-index: 0;
}

.summary-card .summary-card-main-metric > .rz-stack {
    position: relative;
    z-index: 1;
}

/* ===== AVERAGES SECTION (NEW) ===== */

.summary-card .summary-card-averages {
    background: linear-gradient(135deg, rgba(var(--rz-info-rgb), 0.08), rgba(var(--rz-info-rgb), 0.03)) !important;
    border: 1px solid rgba(var(--rz-info-rgb), 0.2) !important;
    border-radius: 16px !important;
    position: relative;
    overflow: hidden;
}

.summary-card .summary-card-averages::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--rz-info-rgb), 0.1), transparent);
    animation: slideRightAverage 3s ease-in-out infinite;
    z-index: 0;
}

.summary-card .summary-card-averages > .rz-stack {
    position: relative;
    z-index: 1;
}

.summary-card .average-statistics {
    background: rgba(255,255,255,0.5);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(var(--rz-info-rgb), 0.1);
    backdrop-filter: blur(5px);
}

.summary-card .average-stat-column {
    padding: 0.5rem;
}

.summary-card .average-stat-column .rz-stack {
    transition: all 0.2s ease;
    cursor: default;
}

.summary-card .average-stat-column:hover .rz-stack {
    transform: translateY(-2px);
}

/* ===== ENHANCED CARD WITH AVERAGES ===== */

.summary-card--with-averages {
    min-height: 280px;
}

.summary-card--with-averages .summary-card-content {
    gap: 2rem;
}

/* ===== METRICS GRID ===== */

.summary-card .summary-card-metrics {
    gap: 1.25rem;
}

.summary-card .metric-column {
    padding: 0.5rem;
}

.summary-card .metric-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.6)) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 14px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.summary-card .metric-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rz-primary), var(--rz-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.summary-card .metric-item:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.8)) !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    border-color: rgba(var(--rz-primary-rgb), 0.2) !important;
}

.summary-card .metric-item:hover::before {
    transform: scaleX(1);
}

.summary-card .metric-item--highlighted {
    background: linear-gradient(135deg, rgba(var(--rz-success-rgb), 0.1), rgba(var(--rz-success-rgb), 0.05)) !important;
    border-color: rgba(var(--rz-success-rgb), 0.3) !important;
    box-shadow: 0 4px 16px rgba(var(--rz-success-rgb), 0.2) !important;
}

.summary-card .metric-item--highlighted::before {
    background: linear-gradient(90deg, var(--rz-success), var(--rz-success-light));
}

/* ===== ACTIONS SECTION ===== */

.summary-card .summary-card-actions {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 1rem;
}

.summary-card .summary-action-btn {
    border-radius: 12px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    min-width: 140px;
}

.summary-card .summary-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

/* ===== LOADING STATE ===== */

.summary-card .summary-card-loading {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(8px);
    z-index: 10;
    border: none !important;
}

/* ===== VALUE ANIMATIONS ===== */

.summary-card .rz-text[data-style*="H2"],
.summary-card .rz-text[data-style*="H3"] {
    animation: valueGlow 2s ease-in-out infinite;
}

.summary-card .summary-card-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== ANIMATIONS ===== */

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(90deg, var(--rz-primary), var(--rz-secondary), var(--rz-success)); }
    50% { background: linear-gradient(90deg, var(--rz-success), var(--rz-primary), var(--rz-secondary)); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes slideRight {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes slideRightAverage {
    0% { left: -100%; }
    33% { left: 100%; }
    100% { left: 100%; }
}

@keyframes valueGlow {
    0%, 100% { text-shadow: 0 2px 8px rgba(0,0,0,0.1); }
    50% { text-shadow: 0 4px 16px rgba(var(--rz-primary-rgb), 0.3); }
}

/* ===== DARK THEME ===== */

.rz-dark .summary-card {
    background: linear-gradient(135deg, rgba(30,30,30,0.95) 0%, rgba(20,20,20,0.9) 100%);
    border-color: rgba(255,255,255,0.15) !important;
}

.rz-dark .summary-card .metric-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05)) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

.rz-dark .summary-card .metric-item:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.1)) !important;
}

.rz-dark .summary-card .summary-card-main-metric {
    background: linear-gradient(135deg, rgba(var(--rz-primary-rgb), 0.15), rgba(var(--rz-secondary-rgb), 0.1)) !important;
    border-color: rgba(var(--rz-primary-rgb), 0.25) !important;
}

.rz-dark .summary-card .summary-card-averages {
    background: linear-gradient(135deg, rgba(var(--rz-info-rgb), 0.15), rgba(var(--rz-info-rgb), 0.08)) !important;
    border-color: rgba(var(--rz-info-rgb), 0.3) !important;
}

.rz-dark .summary-card .average-statistics {
    background: rgba(255,255,255,0.08);
    border-color: rgba(var(--rz-info-rgb), 0.2);
}

.rz-dark .summary-card .summary-card-loading {
    background: rgba(30,30,30,0.95) !important;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .summary-card {
        min-height: 180px;
    }
    
    .summary-card--with-averages {
        min-height: 240px;
    }
    
    .summary-card .summary-card-icon {
        min-width: 60px !important;
        height: 60px !important;
        padding: 0.75rem !important;
    }
    
    .summary-card .metric-item {
        min-height: 80px;
    }
    
    .summary-card .average-statistics {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .summary-card {
        min-height: 160px;
    }
    
    .summary-card--with-averages {
        min-height: 220px;
    }
    
    .summary-card .summary-card-icon {
        min-width: 50px !important;
        height: 50px !important;
        padding: 0.5rem !important;
    }
    
    .summary-card .metric-item {
        min-height: 70px;
    }
    
    .summary-card .summary-action-btn {
        min-width: 120px;
    }
    
    .summary-card .average-statistics {
        padding: 0.5rem;
    }
} 