/**
 * Stats Grid Component - Unified Statistics Display
 * 統計グリッドコンポーネント - 統一された統計表示
 *
 * 使用ページ:
 * - CharacterCounter (文字数カウンター)
 * - Circumference (円周計算機)
 * - その他の統計表示ツール
 *
 * Features:
 * - Responsive grid layout (auto-fit)
 * - Card-based statistics display
 * - Mobile-first responsive design
 * - Accessibility support
 * - Print styles
 *
 * Version: 1.1 - Reduced font sizes for better display
 */

/* ========================================
   1. Stats Grid Layout
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

/* ========================================
   2. Stat Card
   ======================================== */
.stat-card {
    background: #f0f9ff;
    border: 2px solid #e0f2fe;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.12);
    transform: translateY(-2px);
    border-color: #bae6fd;
}

/* ========================================
   3. Stat Value (Main Number)
   ======================================== */
.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1988FF;
    margin: 12px 0;
    line-height: 1.2;
}

/* ========================================
   4. Stat Label (Metric Name)
   ======================================== */
.stat-label {
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ========================================
   5. Responsive - Tablet (768px)
   ======================================== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 20px 0;
    }

    .stat-card {
        padding: 16px;
    }

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

    .stat-label {
        font-size: 12px;
    }
}

/* ========================================
   6. Responsive - Mobile (640px)
   ======================================== */
@media (max-width: 640px) {
    .stats-grid {
        gap: 10px;
        margin: 16px 0;
    }

    .stat-card {
        padding: 14px;
    }

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

/* ========================================
   7. Accessibility
   ======================================== */

/* High contrast mode */
@media (prefers-contrast: high) {
    .stat-card {
        border-width: 3px;
    }
}

/* Focus styles for interactive cards */
.stat-card:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* ========================================
   8. Print Styles
   ======================================== */
@media print {
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-card {
        box-shadow: none;
        border: 2px solid #000;
        page-break-inside: avoid;
    }

    .stat-value {
        color: #000 !important;
    }
}
