/* wynagrodzenia.css: styles for the salary calculator only
   (the shared theme lives in ../wspolne/style.css) */

/* "wkrótce" label on a contract type that is not ready yet */
.soon {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--input);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
}

/* === Where the employer's money goes: one stacked bar + legend === */
.flow-bar {
    display: flex;
    height: 18px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--input);
}

.flow-bar span {
    display: block;
    height: 100%;
}

.flow-net { background: #6cd0a5; }
.flow-tax { background: #f08fa3; }
.flow-social { background: #ff9f6e; }
.flow-health { background: #ffcf6e; }
.flow-ppk { background: #7cc4ff; }
.flow-benefits { background: #d68fd6; }
.flow-employer { background: #807b96; }

.flow-legend {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    font-size: 13px;
    color: var(--text-soft);
}

.flow-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.flow-legend b {
    margin-left: auto;
    color: var(--text);
    white-space: nowrap;
}

.flow-legend i {
    font-style: normal;
    color: var(--text-muted);
    width: 48px;
    text-align: right;
}

.flow-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* === Month-by-month table === */
.months-table .net {
    color: var(--green);
    font-weight: 600;
}

.months-table tr.changed td {
    background: rgba(109, 74, 255, 0.10);
}

.months-table tfoot td {
    border-bottom: none;
}

.tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #13111f;
    background: #a48fff;
    border-radius: 4px;
    padding: 0 5px;
    margin-left: 4px;
    white-space: nowrap;
}

/* === Several contracts: one card per contract === */
.contract-card {
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 12px 12px 4px;
    margin-bottom: 12px;
}

.contract-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.contract-number {
    color: var(--accent-soft);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.contract-head select {
    flex: 1;
    min-width: 0;
    background: var(--input);
    color: var(--text-strong);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 6px 8px;
    font: inherit;
    font-size: 13px;
}

.contract-remove,
.contract-add {
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text-soft);
    font: inherit;
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
}

.contract-add {
    width: 100%;
    border-style: dashed;
    padding: 10px;
    font-size: 13px;
}

.contract-remove:hover,
.contract-add:hover {
    color: var(--text);
    border-color: #6d4aff;
}

.month-range {
    grid-column: 2 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.param .month-range select {
    width: auto;
    flex: 1;
    min-width: 0;
}

@media (max-width: 560px) {
    .month-range {
        grid-column: 1 / -1;
    }
}

/* yearly return table: label left, amount right */
.settlement-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.settlement-table tr.muted td {
    color: var(--text-muted);
}

.muted-inline {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.kpi-card.warning-card {
    border-color: var(--orange);
}

/* === B2B comparison table === */
.results-table tr.selected-row td {
    background: rgba(109, 74, 255, 0.10);
}

.results-table tr.employment-row td {
    border-top: 2px solid var(--border-strong);
}

/* === Month-by-month table: grouped header, change arrows, legend === */
.months-intro {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
    margin: -6px 0 12px;
    max-width: 900px;
}

.months-table .group-head th {
    border-bottom: none;
    padding-bottom: 2px;
}

.months-table .group-head th[colspan] {
    text-align: center;
    color: var(--accent-soft);
    border-bottom: 1px solid var(--border-strong);
}

.months-table th.group-start,
.months-table td.group-start {
    border-left: 1px solid var(--border);
}

.months-table td.employer {
    color: var(--text-muted);
}

.delta {
    display: block;
    font-size: 11px;
    font-weight: 600;
}

.delta.up { color: var(--green); }
.delta.down { color: var(--pink); }

.months-table td:first-child .tag {
    margin: 2px 2px 0 0;
}

.months-legend {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.months-legend li {
    padding: 2px 0;
}

.months-legend b {
    color: var(--text-soft);
}

.tag.follow-up {
    background: var(--border-strong);
    color: var(--tag-text);
}

@media (max-width: 560px) {
    /* phones: labels wrap under the month so the take-home column stays on screen */
    .months-table td:first-child {
        min-width: 96px;
        max-width: 130px;
    }

    .months-table td:first-child .tag {
        white-space: normal;
        margin-left: 0;
        line-height: 1.3;
    }

    .months-table th,
    .months-table td {
        padding: 7px 6px;
    }
}

/* One line under the main numbers (pay per hour of work); the detail may wrap on phones */
.kpi-note {
    margin: 12px 0 20px;
    font-size: 13px;
    color: var(--text-soft);
}

.kpi-note-detail {
    color: var(--text-muted);
    font-size: 12px;
}

/* Under the month name in the month-by-month table: working hours and the hourly rate (employment) */
.month-hours {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}

/* One line above the "where the money goes" bar: what the percentages are of */
.flow-intro {
    margin: -4px 0 10px;
}
