/*!
==========================================================
 ToolXone Body Fat Calculator

 ---------------------------------------------------------
 Dedicated styling for the Body Fat Calculator page.

 Version: 1.0.0
==========================================================
*/


/* ========================================================
   BODY FAT PAGE
======================================================== */

.body-fat-page {

    width: 100%;
    max-width: 1100px;
    margin: 0 auto;

}


/* ========================================================
   BODY FAT CALCULATOR CARD
======================================================== */

.body-fat-card {

    width: 100%;
    max-width: 760px;
    margin: 32px auto;
    padding: 32px;

    border-radius: 20px;

    background: var(--card-bg, #ffffff);

    border: 1px solid var(--border-color, #e5e7eb);

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);

}


.body-fat-card h1 {

    margin: 0 0 10px;

    font-size: 2rem;
    line-height: 1.2;

    font-weight: 800;

    color:
        var(--heading-color, #0f172a);

}


.body-fat-card h2 {

    margin: 28px 0 18px;

    font-size: 1.35rem;
    line-height: 1.3;

    font-weight: 750;

    color:
        var(--heading-color, #0f172a);

}


.tool-subtitle {

    margin: 0;

    color:
        var(--text-secondary, #64748b);

    font-size: 1rem;
    line-height: 1.7;

}


/* ========================================================
   INPUT GROUPS
======================================================== */

.body-fat-card .input-group {

    margin-bottom: 18px;

}


.body-fat-card .input-group label {

    display: block;

    margin-bottom: 8px;

    font-size: 0.95rem;

    font-weight: 650;

    color:
        var(--heading-color, #0f172a);

}


.body-fat-card .input-group input,
.body-fat-card .input-group select {

    width: 100%;

    min-height: 48px;

    padding: 12px 14px;

    border:
        1px solid var(--border-color, #cbd5e1);

    border-radius: 10px;

    background:
        var(--input-bg, #ffffff);

    color:
        var(--text-color, #0f172a);

    font: inherit;

    box-sizing: border-box;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

}


.body-fat-card .input-group input::placeholder {

    color: #94a3b8;

}


.body-fat-card .input-group input:focus,
.body-fat-card .input-group select:focus {

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);

}


/* ========================================================
   UNIT SWITCH
======================================================== */

.unit-switch {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin: 24px 0;

    padding: 5px;

    border-radius: 12px;

    background: #f1f5f9;

}


.unit-btn {

    min-height: 44px;

    padding: 10px 16px;

    border: 0;

    border-radius: 9px;

    background: transparent;

    color: #475569;

    font: inherit;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;

}


.unit-btn:hover {

    color: #0f172a;

}


.unit-btn.active {

    background: #ffffff;

    color: #2563eb;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.08);

}


/* ========================================================
   INPUT MODE CONTAINERS
======================================================== */

.metric-inputs,
.imperial-inputs {

    width: 100%;

}


.imperial-inputs {

    display: none;

}


/* ========================================================
   FEMALE-ONLY INPUT
======================================================== */

.female-only {

    width: 100%;

}


.female-only[hidden] {

    display: none;

}


/* ========================================================
   MEASUREMENT HELPER TEXT
======================================================== */

.input-help {

    display: block;

    margin-top: 6px;

    color: #64748b;

    font-size: 0.84rem;

    line-height: 1.5;

}


/* ========================================================
   CALCULATOR ACTIONS
======================================================== */

.calculator-actions {

    display: flex;

    gap: 12px;

    margin-top: 26px;

}


.calculator-actions button {

    min-height: 48px;

    padding: 12px 22px;

    border-radius: 10px;

    font: inherit;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

}


.calculator-actions button:hover {

    transform: translateY(-1px);

}


.primary-btn {

    flex: 1;

    border:
        1px solid #2563eb;

    background: #2563eb;

    color: #ffffff;

    box-shadow:
        0 5px 14px rgba(37, 99, 235, 0.18);

}


.primary-btn:hover {

    background: #1d4ed8;

}


.secondary-btn {

    min-width: 120px;

    border:
        1px solid #cbd5e1;

    background: #ffffff;

    color: #334155;

}


.secondary-btn:hover {

    background: #f8fafc;

}


/* ========================================================
   RESULT CARD
======================================================== */

.result-card {

    margin-top: 30px;

    padding: 28px;

    text-align: center;

    border-radius: 18px;

    border:
        1px solid #bfdbfe;

    background:
        linear-gradient(
            145deg,
            #eff6ff,
            #ffffff
        );

}


.result-card h2 {

    margin: 0 0 12px;

    color: #0f172a;

}


/* ========================================================
   RESULT VALUE
======================================================== */

.result-value {

    margin-top: 8px;

    font-size:
        clamp(2.5rem, 7vw, 4rem);

    line-height: 1;

    font-weight: 850;

    color: #2563eb;

    letter-spacing: -0.04em;

}


/* ========================================================
   RESULT UNIT
======================================================== */

.result-unit {

    margin: 10px 0 0;

    color: #64748b;

    font-size: 0.95rem;

    font-weight: 600;

}


/* ========================================================
   BODY FAT CATEGORY
======================================================== */

.result-category {

    display: inline-block;

    margin-top: 16px;

    padding: 8px 16px;

    border-radius: 999px;

    background: #dbeafe;

    color: #1d4ed8;

    font-size: 0.9rem;

    font-weight: 750;

}


/* ========================================================
   RESULT DETAILS
======================================================== */

.result-details {

    margin: 14px auto 0;

    color: #334155;

    font-size: 0.98rem;

    font-weight: 600;

    line-height: 1.6;

}


/* ========================================================
   RESULT EXPLANATION
======================================================== */

.result-explanation {

    max-width: 600px;

    margin: 18px auto 0;

    color: #475569;

    font-size: 0.98rem;

    line-height: 1.65;

}


/* ========================================================
   VALIDATION / ERROR STATE
======================================================== */

.body-fat-card .input-error {

    border-color: #dc2626 !important;

    box-shadow:
        0 0 0 3px rgba(220, 38, 38, 0.1);

}


.body-fat-error {

    margin-top: 8px;

    color: #dc2626;

    font-size: 0.88rem;

    line-height: 1.5;

}


/* ========================================================
   HEALTH INFORMATION SECTION
======================================================== */

#healthInfo {

    width: 100%;

    margin-top: 36px;

}


/* ========================================================
   RELATED / FAQ / REVIEWS / FEEDBACK
======================================================== */

#related-tools,
#tool-faq,
#tool-reviews,
#bodyFatFeedback {

    width: 100%;

    margin-top: 36px;

}


/* ========================================================
   DARK MODE
======================================================== */

[data-theme="dark"] .body-fat-card,
.dark-mode .body-fat-card {

    background: #111827;

    border-color: #334155;

}


[data-theme="dark"] .body-fat-card h1,
[data-theme="dark"] .body-fat-card h2,
.dark-mode .body-fat-card h1,
.dark-mode .body-fat-card h2 {

    color: #f8fafc;

}


[data-theme="dark"] .tool-subtitle,
.dark-mode .tool-subtitle {

    color: #94a3b8;

}


[data-theme="dark"] .body-fat-card .input-group label,
.dark-mode .body-fat-card .input-group label {

    color: #e2e8f0;

}


[data-theme="dark"] .body-fat-card .input-group input,
[data-theme="dark"] .body-fat-card .input-group select,
.dark-mode .body-fat-card .input-group input,
.dark-mode .body-fat-card .input-group select {

    background: #0f172a;

    border-color: #475569;

    color: #f8fafc;

}


[data-theme="dark"] .input-help,
.dark-mode .input-help {

    color: #94a3b8;

}


[data-theme="dark"] .unit-switch,
.dark-mode .unit-switch {

    background: #1e293b;

}


[data-theme="dark"] .unit-btn,
.dark-mode .unit-btn {

    color: #cbd5e1;

}


[data-theme="dark"] .unit-btn.active,
.dark-mode .unit-btn.active {

    background: #334155;

    color: #60a5fa;

}


[data-theme="dark"] .secondary-btn,
.dark-mode .secondary-btn {

    background: #1e293b;

    border-color: #475569;

    color: #e2e8f0;

}


[data-theme="dark"] .secondary-btn:hover,
.dark-mode .secondary-btn:hover {

    background: #334155;

}


[data-theme="dark"] .result-card,
.dark-mode .result-card {

    border-color: #1e40af;

    background:
        linear-gradient(
            145deg,
            #172554,
            #111827
        );

}


[data-theme="dark"] .result-card h2,
.dark-mode .result-card h2 {

    color: #f8fafc;

}


[data-theme="dark"] .result-value,
.dark-mode .result-value {

    color: #60a5fa;

}


[data-theme="dark"] .result-unit,
[data-theme="dark"] .result-details,
[data-theme="dark"] .result-explanation,
.dark-mode .result-unit,
.dark-mode .result-details,
.dark-mode .result-explanation {

    color: #cbd5e1;

}


[data-theme="dark"] .result-category,
.dark-mode .result-category {

    background: #1e3a8a;

    color: #bfdbfe;

}


/* ========================================================
   RESPONSIVE
======================================================== */

@media (max-width: 768px) {

    .body-fat-card {

        margin: 24px auto;

        padding: 24px 20px;

        border-radius: 16px;

    }


    .body-fat-card h1 {

        font-size: 1.7rem;

    }


    .body-fat-card h2 {

        font-size: 1.2rem;

    }


    .calculator-actions {

        flex-direction: column;

    }


    .primary-btn,
    .secondary-btn {

        width: 100%;

    }


    .secondary-btn {

        min-width: 0;

    }


    .result-card {

        padding: 24px 18px;

    }

}


/* ========================================================
   SMALL MOBILE
======================================================== */

@media (max-width: 480px) {

    .body-fat-card {

        padding: 20px 16px;

    }


    .unit-switch {

        grid-template-columns: 1fr;

    }


    .unit-btn {

        min-height: 46px;

    }


    .result-value {

        font-size: 2.7rem;

    }


    .result-category {

        font-size: 0.85rem;

        padding: 7px 13px;

    }

}