/* --- Ogólny kontener kalkulatora --- */
.kalkulator-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 25px 30px;
    border-radius: 8px;
    max-width: 700px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.kalkulator-box h2 {
    text-align: center;
    color: #343a40;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 26px;
}

.kalkulator-opis {
    text-align: center;
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 16px;
}

/* --- Formularz --- */
.kalkulator-form fieldset.kalkulator-fieldset {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.kalkulator-form legend {
    padding: 0 10px;
    font-weight: bold;
    color: #495057;
    width: auto;
    font-size: 1em;
    border-bottom: none;
    margin-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.kalkulator-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
    color: #495057;
}

.kalkulator-form input[type="date"],
.kalkulator-form input[type="time"],
.kalkulator-form input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kalkulator-form input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.kalkulator-form small {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.kalkulator-form button {
    width: 100%;
    padding: 12px 20px;
    background-color: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.kalkulator-form button:hover {
    background-color: #0b5ed7;
}

/* --- Wyniki, Błędy i Informacje --- */
.kalkulator-wynik {
    margin-top: 30px;
    padding: 20px;
    background-color: #e9f5ff;
    border: 1px solid #b3d7ff;
    border-radius: 8px;
}

.kalkulator-wynik h3 {
    margin-top: 0;
    color: #034c8a;
}

#hcg-wynik-tekst {
    font-size: 18px;
    font-weight: bold;
    color: #034c8a;
}

#hcg-wynik-podsumowanie {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.kalkulator-error {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
    border-radius: 5px;
    text-align: center;
}

.kalkulator-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.kalkulator-info h3 {
    color: #343a40;
    margin-bottom: 10px;
}

.kalkulator-info p, .kalkulator-info dd {
    color: #495057;
    line-height: 1.6;
}

.kalkulator-info dt {
    font-weight: bold;
    color: #343a40;
    margin-top: 15px;
}

.chart-container {
    margin-top: 20px;
    position: relative;
    height: 350px;
    width: 100%;
}

p.wykres-info {
    font-size: 13px;
    color: #6c757d;
    text-align: center;
    margin-top: 15px;
}

/* Responsywność */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .kalkulator-box {
        padding: 20px;
    }
}