/**
 * Dashboard Statistics Cards Styles
 *
 * @package Sports_Meister\Modules\Competitions
 */

/* ============================================
   Statistics Dashboard Grid
   ============================================ */

.smc-stats-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}

.smc-stats-dashboard--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.smc-stats-dashboard--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.smc-stats-dashboard--cols-1 {
    grid-template-columns: 1fr;
}

/* ============================================
   Individual Stat Card
   ============================================ */

.smc-stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    min-height: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.smc-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* ============================================
   Card Content (Left Side)
   ============================================ */

.smc-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.smc-stat-label {
    font-size: 14px;
    font-weight: 500;
    color: #2D4853;
    line-height: 1.4;
}

.smc-stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.smc-stat-subtext {
    font-size: 13px;
    color: #4a5e6a;
    margin-top: 0.25rem;
    font-weight: 500;
}

.smc-stat-subtext.positive {
    color: #10b981;
}

.smc-stat-subtext.negative {
    color: #ef4444;
}

/* ============================================
   Card Icon (Right Side)
   ============================================ */

.smc-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smc-stat-icon svg {
    width: 24px;
    height: 24px;
}

/* Icon Color Variants */
.smc-stat-icon--primary {
    background: rgba(75, 146, 175, 0.1);
    color: #4b92af;
}

.smc-stat-icon--success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.smc-stat-icon--warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.smc-stat-icon--info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.smc-stat-icon--danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ============================================
   Responsive Breakpoints
   ============================================ */

/* Laptop 1366px */
@media (max-width: 1366px) {
    .smc-stat-card {
        padding: 1rem 1rem;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .smc-stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .smc-stats-dashboard--cols-3,
    .smc-stats-dashboard--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .smc-stat-card {
        padding: 1.25rem;
    }

    .smc-stat-value {
        font-size: 1.5rem;
    }
}

/* Mobile - Horizontal scroll */
@media (max-width: 768px) {
    .smc-stats-dashboard,
    .smc-stats-dashboard--cols-2,
    .smc-stats-dashboard--cols-3,
    .smc-stats-dashboard--cols-4 {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 0.5rem;
    }

    .smc-stats-dashboard .smc-stat-card {
        flex: 0 0 85%;
        min-width: 280px;
        scroll-snap-align: start;
    }

    /* Elementor integration - horizontal scroll for .top_section */
    .top_section {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 1rem !important;
        padding-bottom: 0.5rem;
    }

    .top_section > .e-con {
        flex: 0 0 85% !important;
        min-width: 280px !important;
        scroll-snap-align: start;
    }

    .top_section .smc-stat-card {
        width: 100%;
    }

    .smc-stat-card {
        padding: 1.25rem 1.5rem;
    }

    .smc-stat-value {
        font-size: 1.5rem;
    }

    .smc-stat-icon {
        width: 44px;
        height: 44px;
    }

    .smc-stat-icon svg {
        width: 22px;
        height: 22px;
    }

    /* Hide scrollbar completely but keep scroll functionality */
    .top_section,
    .smc-stats-dashboard {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    .top_section::-webkit-scrollbar,
    .smc-stats-dashboard::-webkit-scrollbar {
        display: none;  /* Chrome, Safari, Opera */
    }
}

/* ============================================
   Dark Mode Support (if enabled)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .smc-stat-card {
        background: #1f2937;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .smc-stat-value {
        color: #f9fafb;
    }

    .smc-stat-label {
        color: #9ca3af;
    }

    .smc-stat-subtext {
        color: #6b7280;
    }
}
