/* ==========================================
   NeoNutraCalc – bilans.css
   Stylizacja modułu Bilansu Płynów.
   (poprzednia nazwa: style_MODUL_bilans_plynow.css)
   data utworzenia: 19.09.2025
   data modyfikacji: 18.05.2026
   autor: Marcin Kalisiak
   Wszelkie prawa zastrzeżone
   ========================================== */

/* ===== Kontener modułu ===== */
.panel-kontener-modulu {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: min(800px, 94vw);
    margin: 20px auto;
    padding: 8px 20px 32px 20px;
    gap: 24px;
    flex-wrap: wrap;
    background: rgba(240, 244, 248, 0.65);
    border-left: 5px solid #007bff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

/* ===== Karta modułu ===== */
.modul-box {
    background: rgba(255, 255, 255, .78);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    border: 1px solid rgba(255, 255, 255, .65);
    width: 100%;
}

.modul-box h2 {
    text-align: center;
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #007bff;
    color: #0056b3;
}

/* ===== Sekcja bilansu — formularz ===== */
.bilans-box form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ===== Wiersze formularza ===== */
.form-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row label {
    width: 58%;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.form-row input[type="number"] {
    width: 42%;
    padding: 6px 8px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.form-row input[type="number"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,.25);
    outline: none;
}

/* Pole opcjonalne — subtelnie wyróżnione */
.field-optional label {
    color: #555;
    font-style: italic;
}

.field-optional input[type="number"] {
    background: #f8f9ff;
    border-style: dashed;
}

/* ===== Blok wyboru masy (dynamiczny) ===== */
#wybor-masy-box {
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wybor-pytanie {
    margin: 0;
    font-weight: 600;
    color: #795500;
    font-size: 0.95em;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    width: auto;
}

.radio-group input[type="radio"] {
    accent-color: #007bff;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== Przyciski akcji ===== */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.bilans-box button[type="submit"] {
    padding: 10px 28px;
    border-radius: 7px;
    background: #007bff;
    color: #fff;
    border: none;
    font-size: 1.05em;
    cursor: pointer;
    transition: background-color .2s, transform .1s;
}

.bilans-box button[type="submit"]:hover { background: #0056b3; transform: translateY(-1px); }
.bilans-box button[type="submit"]:disabled { background: #aaa; transform: none; cursor: not-allowed; }

#btn-clear {
    padding: 10px 20px;
    border-radius: 7px;
    background: #6c757d;
    color: #fff;
    border: none;
    font-size: 1.05em;
    cursor: pointer;
    transition: background-color .2s;
}

#btn-clear:hover { background: #545b62; }

/* ===== Kontener wyników ===== */
.wynik-box {
    margin-top: 18px;
    padding: 16px 20px;
    background: #f0f4f8;
    border: 1px solid #c8d4e0;
    border-radius: 10px;
    font-size: 1em;
    color: #222;
    min-height: 80px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,.06);
    line-height: 1.7;
    white-space: pre-wrap;
}

.wynik-box.wynik-ok {
    border-color: #28a745;
    background: #f0fff4;
}

.wynik-box.wynik-blad {
    border-color: #dc3545;
    background: #fff5f5;
    color: #8b0000;
}

/* ===== Spinner ładowania ===== */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(0,123,255,.25);
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
