/**
 * Circle Calculator Styles - Mode-switching calculator
 * 円計算機スタイル（モード切り替え式）
 *
 * Blue-themed color scheme matching realtime-calculator.css
 */

/* ========================================
   1. Mode Selector Container
   ======================================== */
.calc-mode-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

/* ========================================
   2. Mode Buttons - Blue Theme
   ======================================== */
.calc-mode-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    border: 3px solid #0066cc;
    background: white;
    color: #0066cc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.calc-mode-btn:hover {
    background: #e6f2ff;
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.15);
    transform: translateY(-1px);
}

.calc-mode-btn.active {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border-color: #0066cc;
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.35);
}

.calc-mode-btn:active {
    transform: translateY(0);
}

/* Mobile optimization */
@media (max-width: 480px) {
    .calc-mode-btn {
        min-width: 120px;
        font-size: 0.95em;
        padding: 10px 12px;
    }
}

/* ========================================
   3. Input Mode Sections - Compact Mobile
   ======================================== */
.input-mode {
    display: none;
    margin-bottom: 16px;
}

.input-mode label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.05em;
    color: #2d3748;
}

/* realtime-calc-input クラスが適用されるため、ここでは追加調整のみ */
.input-mode .realtime-calc-input {
    /* realtime-calculator.cssから継承 */
}

/* モバイル: 入力フィールドをコンパクトに */
@media (max-width: 640px) {
    .input-mode {
        margin-bottom: 12px;
    }

    .input-mode label {
        font-size: 1em;
        margin-bottom: 6px;
    }
}

/* ========================================
   4. Formula Hint
   ======================================== */
.formula-hint {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* ========================================
   5. Circle Measurement Color Coding
   ======================================== */
/* Note: Base stats-grid styles are in /public/css/components/stats-grid.css */

/* Color-coded stat values for different measurements */
.stat-card.circumference .stat-value {
    color: #0066cc;
}

.stat-card.radius .stat-value {
    color: #10b981;
}

.stat-card.diameter .stat-value {
    color: #f59e0b;
}

.stat-card.area .stat-value {
    color: #0088ff;
}



/* ========================================
   9. Responsive Design
   ======================================== */

/* Small Mobile (360px以下) */
@media (max-width: 360px) {
    .circle-results {
        padding: 20px 16px;
    }

    .circle-results h3 {
        font-size: 1.1em;
    }

    .result-item {
        padding: 14px;
    }

    .result-value {
        font-size: 1.2em;
    }
}

/* Tablet (768px以上) */
@media (min-width: 768px) {
    .circle-results {
        padding: 28px 32px;
    }

    .circle-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (1024px以上) */
@media (min-width: 1024px) {
    .circle-results-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   10. Accessibility Enhancements
   ======================================== */

/* キーボードフォーカス時の視覚的フィードバック強化 */
.calc-mode-btn:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

.input-mode input[type="number"]:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    .calc-mode-btn {
        border-width: 4px;
    }

    .input-mode input[type="number"] {
        border-width: 3px;
    }
}

/* ========================================
   11. Print Styles
   ======================================== */
@media print {
    .calc-mode-selector {
        display: none;
    }

    .input-mode {
        display: block !important;
    }

    .circle-results {
        box-shadow: none;
        border: 2px solid #000;
    }

    .circle-results h3 {
        color: #000;
    }

    .result-item {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }

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