.bmi-calculator-container {
    max-width: 680px;
    margin: 32px auto;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1e293b;
}

.bmi-calculator-container * {
    box-sizing: border-box;
}

.bmi-calculator-container h2 {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.bmi-calculator-container p {
    line-height: 1.6;
}

.bmi-field {
    margin-bottom: 20px;
}

.bmi-field > label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
}

.bmi-field input[type="number"],
.bmi-field select {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 16px;
}

.bmi-field input:focus,
.bmi-field select:focus {
    outline: 3px solid rgba(37, 99, 235, 0.18);
    border-color: #2563eb;
}

.bmi-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    accent-color: #2563eb;
}

.bmi-calculator-container button[type="submit"] {
    width: 100%;
    min-height: 50px;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.bmi-calculator-container button[type="submit"]:hover:not(:disabled) {
    background: #1d4ed8;
}

.bmi-calculator-container button[type="submit"]:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.bmi-notice {
    margin-top: 24px;
    padding: 14px 16px;
    background: #f1f5f9;
    border-left: 4px solid #64748b;
    border-radius: 6px;
    color: #475569;
    font-size: 13px;
}

@media (max-width: 600px) {
    .bmi-calculator-container {
        margin: 16px auto;
        padding: 20px;
        border-radius: 12px;
    }

    .bmi-calculator-container h2 {
        font-size: 23px;
    }

    .bmi-field {
        margin-bottom: 16px;
    }
}

/* Language is determined automatically by the page locale. */
.bmi-calculator-container label[for="bmi-language"],
.bmi-calculator-container #bmi-language {
    display: none !important;
}

/* ============================================================
   BMI PRODUCTION REPORT — VERSION 1.0
   ============================================================ */

.bmi-calculator-container [hidden] {
    display: none !important;
}

.bmi-results {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
}

.bmi-results-content {
    animation: bmi-report-appear 0.3s ease-out;
}

.bmi-results-heading {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.bmi-results-value {
    margin: 0;
    font-size: clamp(48px, 9vw, 68px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.04em;
    color: #2563eb;
}

.bmi-results-category {
    display: inline-block;
    margin: 12px 0 24px;
    padding: 8px 16px;
    background: #eff6ff;
    border-radius: 999px;
    color: #1d4ed8;
    font-size: 15px;
    font-weight: 600;
}

.bmi-report-details {
    display: grid;
    gap: 16px;
    margin-top: 8px;
}

.bmi-report-section {
    padding: 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.bmi-report-section h4 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
}

.bmi-report-section p {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: #475569;
}

.bmi-report-understanding {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.bmi-report-waist {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.bmi-report-waist-value {
    font-size: 32px !important;
    font-weight: 800;
    color: #166534 !important;
}

.bmi-report-waist-category {
    margin-top: 8px !important;
}

.bmi-report-limitations {
    background: #fffbeb;
    border-color: #fde68a;
}

.bmi-report-references-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bmi-report-references-list a {
    color: #2563eb;
    font-size: 14px;
    line-height: 1.6;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.bmi-report-references-list a:hover {
    color: #1d4ed8;
}

.bmi-results-ai:not(:empty) {
    margin-top: 20px;
    padding: 18px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    line-height: 1.75;
    white-space: pre-wrap;
}

.bmi-results-review:not(:empty) {
    margin-top: 20px;
    padding: 14px 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.6;
}

.bmi-results-error:not(:empty) {
    margin-top: 16px;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
}

.bmi-calculator-container[dir="rtl"] .bmi-report-section {
    text-align: right;
}

.bmi-calculator-container[dir="rtl"] .bmi-notice {
    border-left: none;
    border-right: 4px solid #64748b;
}

@keyframes bmi-report-appear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .bmi-results {
        margin-top: 24px;
        padding-top: 24px;
    }

    .bmi-report-section {
        padding: 18px;
    }

    .bmi-report-section h4 {
        font-size: 16px;
    }

    .bmi-report-section p {
        font-size: 14px;
    }

    .bmi-results-category {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bmi-results-content {
        animation: none;
    }
}
