/* ======================== */
/* BMI Calculator - Horizontal Layout */
/* ======================== */

.bmi-calculator-container {
    max-width: 800px; /* Wider container */
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two-column layout */
    gap: 40px;
}

/* ======================== */
/* Left Column (Input Section) */
/* ======================== */

.bmi-title {
    text-align: left;
    color: #2c3e50;
    margin: 0 0 25px 0;
    font-size: 24px;
    grid-column: 1 / -1;
}

/* Unit Toggle */
.bmi-unit-toggle {
    display: flex;
    background: #f5f5f5;
    padding: 8px;
    border-radius: 30px;
    margin-bottom: 25px;
    width: 100%;
}

.bmi-unit-toggle input[type="radio"] {
    display: none;
}

.bmi-unit-toggle label {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.bmi-unit-toggle input:checked + label {
    background: #3498db;
    color: white;
}

/* Input Groups */
.bmi-input-group {
    margin-bottom: 25px;
    width: 100%;
}

.bmi-input-group label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: 500;
    font-size: 15px;
}

.bmi-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
}

.bmi-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Height Input Wrapper */
.height-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.height-wrapper input {
    flex: 1;
    min-width: 0;
}

.height-wrapper span {
    font-size: 14px;
    color: #777;
    white-space: nowrap;
}

/* Button */
.bmi-button {
    width: 100%;
    padding: 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.bmi-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* ======================== */
/* Right Column (Results Section) */
/* ======================== */

.bmi-results {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    height: fit-content;
    animation: fadeIn 0.5s ease-out;
}

.bmi-results h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
}

.bmi-value, .bmi-category {
    margin-bottom: 20px;
    font-size: 18px;
}

.bmi-value span, .bmi-category span {
    font-weight: 600;
}

/* Dynamic Category Backgrounds */
#bmi-category {
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    display: inline-block;
}

.category-default { background: #95a5a6; }
.category-underweight { background: #3498db; }
.category-normal-weight { background: #2ecc71; }
.category-overweight { background: #f39c12; }
.category-obese { background: #e74c3c; }

/* BMI Scale */
.bmi-scale {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.scale-item {
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    color: white;
    font-weight: 500;
}

.underweight { background: #3498db; }
.normal { background: #2ecc71; }
.overweight { background: #f39c12; }
.obese { background: #e74c3c; }

/* ======================== */
/* Animations & Responsive */
/* ======================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .bmi-calculator-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px 20px;
    }
    
    .bmi-title {
        font-size: 22px;
    }
    
    .height-wrapper {
        flex-wrap: wrap;
    }
    
    .height-wrapper input {
        width: calc(50% - 5px);
    }
}

/* ======================== */
/* Micro-Interactions */
/* ======================== */

.bmi-unit-toggle label:hover {
    background: #e0e0e0;
}

.scale-item {
    transition: transform 0.2s;
}

.scale-item:hover {
    transform: scale(1.02);
}