/* BMI Calculator - Light Theme */

/* Calculator Panel */

/* Dark mode overrides */
[data-theme="dark"] {
    --tool-bg: #0f172a;
    --tool-border: #334155;
    --tool-border-hover: #475569;
    --tool-text: #f8fafc;
    --tool-text-secondary: #94a3b8;
    --tool-input-bg: #1e293b;
    --tool-input-border: #334155;
    --tool-button-bg: #1e293b;
    --tool-button-hover: #334155;
    --tool-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --tool-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --background-color: #0f172a;
    --text-color: #f8fafc;
    --status-info: rgba(96, 165, 250, 0.2);
    --status-success: rgba(34, 197, 94, 0.2);
    --status-error: rgba(248, 113, 113, 0.2);
    --bg-color: #0f172a;
}

/* Dark mode element overrides */
[data-theme="dark"] .tool-card {
    background: var(--bg-card, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] .tool-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--input-bg, #1e293b);
    color: var(--text-primary, #f8fafc);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .tab-btn.active {
    color: white;
}

[data-theme="dark"] label {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] p {
    color: var(--text-secondary, #cbd5e1);
}
.calculator-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.unit-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 2rem;
    gap: 4px;
}

.unit-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.unit-btn.active {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.unit-btn:hover:not(.active) {
    background: var(--hover-bg);
    color: var(--text-color);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group.hidden {
    display: none;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-row label {
    font-weight: 600;
    color: var(--text-color);
}

.input-with-unit {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.input-with-unit:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-alpha);
}

.input-with-unit input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
}

.input-with-unit input:focus {
    outline: none;
}

.input-with-unit .unit {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-weight: 500;
    border-left: 1px solid var(--border-color);
}

.height-imperial {
    display: flex;
    gap: 0.5rem;
}

.height-imperial .input-with-unit {
    flex: 1;
}

.calculate-btn {
    background: var(--primary-color);
    color: var(--bg-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.calculate-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

/* Results Panel */
.results-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.results-panel.hidden {
    display: none;
}

.bmi-display {
    text-align: center;
    margin: 2rem 0;
}

.bmi-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.bmi-unit {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
}

.bmi-category {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
}

.bmi-category.underweight {
    background: var(--color-blue-soft);
    color: var(--primary-color);
}

.bmi-category.normal {
    background: var(--color-green-soft);
    color: var(--text-success);
}

.bmi-category.overweight {
    background: var(--bg-primary)3e0;
    color: #f57c00;
}

.bmi-category.obese {
    background: var(--color-red-soft);
    color: #c62828;
}

/* BMI Chart */
.bmi-chart {
    position: relative;
    margin: 2rem 0;
}

.chart-bar {
    display: flex;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.chart-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 0.875rem;
    position: relative;
}

.chart-section.underweight {
    background: linear-gradient(135deg, #29b6f6, #0277bd);
}

.chart-section.normal {
    background: linear-gradient(135deg, #66bb6a, #2e7d32);
}

.chart-section.overweight {
    background: linear-gradient(135deg, #ffa726, #f57c00);
}

.chart-section.obese {
    background: linear-gradient(135deg, #ef5350, #c62828);
}

.chart-label {
    font-size: 0.8rem;
    text-align: center;
}

.bmi-indicator {
    position: absolute;
    top: -10px;
    width: 20px;
    height: 20px;
    background: var(--text-color);
    border: 3px solid var(--card-bg);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Health Insights */
.health-insights {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.health-insights h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.insight-icon {
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

.insight-content h5 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.insight-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Actions */
.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.primary-btn, .secondary-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.primary-btn {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.secondary-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background: var(--hover-bg);
}

/* Information Panel */
.info-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.info-content h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.info-content h4:first-child {
    margin-top: 0;
}

.bmi-categories {
    margin: 2rem 0;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.category-item.underweight {
    background: var(--color-blue-soft);
    color: var(--primary-color);
}

.category-item.normal {
    background: var(--color-green-soft);
    color: var(--text-success);
}

.category-item.overweight {
    background: var(--bg-primary)3e0;
    color: #f57c00;
}

.category-item.obese {
    background: var(--color-red-soft);
    color: #c62828;
}

.category-range {
    font-weight: 600;
}

.disclaimer {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.disclaimer h4 {
    color: var(--warning-color);
    margin-bottom: 0.5rem;
}

.disclaimer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-panel,
    .results-panel,
    .info-panel {
        padding: 1.5rem;
    }
    
    .bmi-value {
        font-size: 2.5rem;
    }
    
    .height-imperial {
        flex-direction: column;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .chart-section {
        font-size: 0.75rem;
    }
    
    .category-item {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
}


