/* Kalkulator wynagrodzeń UoP 2026 — prefiks .uop- */

/* === Karta kalkulatora === */
.uop-card {
    background: var(--bg-card, #fff);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.uop-input-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.uop-range {
    flex: 1 1 200px;
    accent-color: var(--accent-primary, #FFA901);
    height: 6px;
    cursor: pointer;
}
.uop-range::-webkit-slider-thumb {
    width: 20px; height: 20px;
    background: var(--accent-primary, #FFA901);
    border-radius: 50%;
    cursor: pointer;
}
.uop-range::-moz-range-thumb {
    width: 20px; height: 20px;
    background: var(--accent-primary, #FFA901);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.uop-brutto-field {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
}
.uop-brutto-input {
    width: 90px;
    padding: .3rem .5rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    font-size: 1rem;
    text-align: right;
}

/* === Kontrolki (ukryte bez JS) === */
.uop-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: .9rem;
}
.uop-controls label {
    display: flex;
    align-items: center;
    gap: .3rem;
    cursor: pointer;
}
.uop-control-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
}
.uop-control-group span {
    font-weight: 500;
}
.uop-control-group select {
    padding: .2rem .4rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    font-size: .9rem;
    background: var(--bg-card, #fff);
    cursor: pointer;
}
.uop-control-line { flex-basis: 100%; }

/* Opcje zaawansowane (rzadkie przypadki) */
.uop-advanced {
    flex-basis: 100%;
    margin-top: .25rem;
}
.uop-advanced > summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted, #555);
    padding: .25rem 0;
    list-style-position: inside;
}
.uop-advanced[open] > summary { margin-bottom: .5rem; }
.uop-advanced .uop-control-group { margin-bottom: .5rem; }

/* === Metryki === */
.uop-metrics {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.uop-metric {
    flex: 1 1 140px;
    text-align: center;
    padding: .75rem .5rem;
    border-radius: 6px;
    background: var(--bg-subtle, #f8f8f8);
}
.uop-metric__label {
    font-size: .8rem;
    color: var(--text-muted, #666);
    margin-bottom: .25rem;
}
.uop-metric__value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-primary, #FFA901);
}
.uop-metric--netto .uop-metric__value {
    font-size: 1.6rem;
}

/* === Pasek segmentowy === */
.uop-bar {
    display: flex;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.uop-bar__netto    { background: var(--accent-primary, #FFA901); }
.uop-bar__zus      { background: #e07b00; }
.uop-bar__nfz      { background: #c0520a; }
.uop-bar__zaliczka { background: #8b3000; }

/* === Legenda paska === */
.uop-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    font-size: .82rem;
    color: var(--text-muted, #555);
}
.uop-legend__item {
    display: flex;
    align-items: center;
    gap: .35rem;
}
.uop-legend__item::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 2px;
    flex-shrink: 0;
}
.uop-legend--netto::before    { background: var(--accent-primary, #FFA901); }
.uop-legend--zus::before      { background: #e07b00; }
.uop-legend--nfz::before      { background: #c0520a; }
.uop-legend--zaliczka::before { background: #8b3000; }
.uop-legend__item span { font-weight: 600; }

/* === Tabela potrąceń === */
.uop-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    margin-bottom: .75rem;
}
.uop-table th, .uop-table td {
    padding: .4rem .5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle, #eee);
}
.uop-table th {
    font-weight: 600;
    color: var(--text-muted, #555);
    font-size: .8rem;
    text-transform: uppercase;
}
.uop-table td:last-child, .uop-table th:last-child { text-align: right; }
.uop-table .uop-row-netto td {
    font-weight: 700;
    border-top: 2px solid var(--border-color, #ddd);
    font-size: 1rem;
}

/* === Sekcja roczna === */
.uop-year {
    background: var(--bg-card, #fff);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.uop-year h2 { margin-top: 0; font-size: 1.15rem; }
.uop-year-static { color: var(--text-muted, #666); }

.uop-year-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.uop-year-table th, .uop-year-table td {
    padding: .35rem .5rem;
    text-align: right;
    border-bottom: 1px solid var(--border-subtle, #eee);
}
.uop-year-table th:first-child, .uop-year-table td:first-child { text-align: left; }
.uop-year-table .uop-row-zdarzenie td { font-weight: 600; }
.uop-year-table tfoot td { font-weight: 700; border-top: 2px solid var(--border-color, #ddd); }

/* === Koszt pracodawcy === */
.uop-employer {
    background: var(--bg-subtle, #f8f8f8);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.uop-employer h2 { margin-top: 0; font-size: 1.1rem; }
.uop-employer-framing {
    font-size: .92rem;
    color: var(--text-default, #333);
    margin: 0 0 .75rem;
    line-height: 1.45;
}
.uop-employer-total {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: .5rem;
}
.uop-employer-breakdown {
    font-size: .88rem;
    color: var(--text-muted, #666);
    list-style: none;
    padding: 0; margin: 0;
}
.uop-employer-breakdown li { padding: .15rem 0; }

/* === Tabela kwot popularnych === */
.uop-kwoty-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    margin-bottom: 1rem;
}
.uop-kwoty-table th, .uop-kwoty-table td {
    padding: .4rem .6rem;
    text-align: right;
    border-bottom: 1px solid var(--border-subtle, #eee);
}
.uop-kwoty-table th { font-weight: 600; font-size: .82rem; text-transform: uppercase; }
.uop-kwoty-table td:first-child, .uop-kwoty-table th:first-child { text-align: left; }
.uop-kwoty-table .uop-asterisk { color: var(--text-muted, #888); font-size: .8rem; }

/* === Responsywność === */
@media (max-width: 480px) {
    .uop-metrics { gap: .5rem; }
    .uop-metric  { flex: 1 1 calc(50% - .25rem); }
    .uop-metric--netto { flex: 1 1 100%; }
    .uop-controls { flex-direction: column; }
    .uop-table th { display: none; }
    .uop-brutto-input { width: 80px; }
}

.uop-lead {
    font-size: .95rem;
    color: var(--text-muted, #555);
    margin: 0 0 1rem;
    line-height: 1.5;
}
