/* ── Salary & Taxes Calculator ────────────────────────────────────────────── */

/* Top selectors row (country only, shown when >1 country) */
.st-selectors {
    margin-bottom: var(--space-4);
}

/* Year buttons */
.st-year-group {
    margin-bottom: var(--space-5);
}
.st-year-btns {
    display: flex;
    margin-top: var(--space-2);
}
.st-year-btn {
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-border);
    background: var(--color-surface-2);
    color: var(--color-text-2);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
    line-height: 1.6;
    margin-left: -1px;
    position: relative;
}
.st-year-btn:first-child {
    border-radius: var(--radius-sm) var(--radius-sm) var(--radius-sm) var(--radius-sm);
    margin-left: 0;
}
.st-year-btn:last-child {
    border-radius: var(--radius-sm) var(--radius-sm) var(--radius-sm) var(--radius-sm);
}
.st-year-btn:hover:not(.st-year-btn--active) {
    border-color: var(--color-accent);
    color: var(--color-text-1);
    z-index: 1;
}
.st-year-btn--active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #1a1a1a;
    z-index: 1;
}

/* Amount row: input + period buttons on same line */
.st-amount-row {
    display: flex;
    gap: var(--space-3);
    align-items: stretch;
    flex-wrap: wrap;
}
.st-amount-row .input-group {
    flex: 1;
    min-width: 120px;
}

/* Period segment buttons */
.st-period-btns {
    display: flex;
    flex-shrink: 0;
}
.st-period-btn {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    background: var(--color-surface-2);
    color: var(--color-text-2);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
    line-height: 1.1;
    margin-left: -1px;
    position: relative;
}
.st-period-btn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    margin-left: 0;
}
.st-period-btn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.st-period-btn:hover:not(.st-period-btn--active) {
    border-color: var(--color-accent);
    color: var(--color-text-1);
    z-index: 1;
}
.st-period-btn--active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #1a1a1a;
    z-index: 1;
}

/* Mode tabs */
.st-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--space-5);
}
.st-tab {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--color-text-2);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.st-tab:hover { color: var(--color-text-1); }
.st-tab--active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* Amount input group */
.st-amount-group {
    margin-bottom: var(--space-5);
}

/* Options panel (always open) */
.st-options {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
}
.st-options__heading {
    padding: var(--space-3) var(--space-4);
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-2);
    border-bottom: 1px solid var(--color-border);
}
.st-options__body {
    padding: var(--space-4);
}

/* Option row: toggle label + optional right-side control */
.st-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: 2.5rem;
}

/* Toggle (checkbox + label) */
.st-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--color-text-1);
    flex: 1;
}
.st-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-accent);
    flex-shrink: 0;
    cursor: pointer;
}
.st-toggle__label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* Small rate badge */
.st-rate-badge {
    display: inline-block;
    font-size: var(--text-xs);
    color: var(--color-text-3);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0 var(--space-2);
    line-height: 1.6;
    white-space: nowrap;
}

/* Small input/select on the right side of an option row */
.st-option-input {
    flex-shrink: 0;
}
.form-input--sm {
    width: auto;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-sm);
    height: auto;
    min-width: 150px;
}
.st-option-input.input-group {
    width: auto;
}
.st-option-input .form-input--sm {
    width: 80px;
}

/* Inactive control: dim + block pointer events */
.st-ctrl-off {
    opacity: 0.38;
    pointer-events: none;
    transition: opacity 0.15s;
}

/* Option hint text */
.st-option-hint {
    font-size: var(--text-xs);
    color: var(--color-text-3);
    margin: var(--space-1) 0 var(--space-3);
    padding-left: calc(1rem + var(--space-2));
}

/* Section separator — tighter inside options body */
.st-sep {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-3) 0;
}
/* Wider spacing in result area */
.result-block .st-sep {
    margin: var(--space-5) 0;
}

/* Section sub-labels in result */
.st-section-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-3);
    margin: 0 0 var(--space-2);
}

/* Total row (stronger emphasis) */
.result-row--total .result-row__label {
    font-weight: 600;
    color: var(--color-text-1);
}

/* Net vs cost ratio bar */
.st-ratio {
    margin: var(--space-5) 0;
}
.st-ratio__bar {
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--color-error);
    overflow: hidden;
    margin-bottom: var(--space-2);
}
.st-ratio__fill {
    height: 100%;
    border-radius: var(--radius-full) 0 0 var(--radius-full);
    transition: width 0.5s ease;
}
.st-ratio__fill--net {
    background: var(--color-success);
}
.st-ratio__labels {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--color-text-2);
    flex-wrap: wrap;
    gap: var(--space-1);
}

/* Validation: highlight invalid inputs */
.form-input[aria-invalid="true"] {
    border-color: var(--color-error);
    box-shadow: 0 0 0 1px var(--color-error);
}

/* Pension status label — align with other option rows */
.st-pension-label {
    font-size: var(--text-sm);
    color: var(--color-text-1);
    font-weight: 400;
    flex: 1;
    margin: 0;
}

/* Pension status select — wider than pillar2 */
#st-pension-status.form-input--sm {
    min-width: 100px;
    overflow: hidden;
     width:150px;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 100;     
}

/* Detailid collapsible block */
.st-details {
    margin: var(--space-4) 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.st-details > summary {
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-2);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    user-select: none;
}
.st-details > summary::before {
    content: '▶';
    font-size: var(--text-xs);
    color: var(--color-text-3);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.st-details[open] > summary::before {
    transform: rotate(90deg);
}
.st-details > .ci-schedule__body {
    padding: var(--space-3) var(--space-4);
}
.st-details .result-row {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-2) 0;
}
.st-details .result-row:last-of-type {
    border-bottom: none;
}
.st-details .st-option-hint {
    padding-left: 0;
    margin: var(--space-2) 0 0;
}

/* Responsive: compact buttons on narrow screens */
@media (max-width: 480px) {
    .st-tab {
        font-size: var(--text-xs);
        padding: var(--space-2) var(--space-2);
    }
    .st-period-btn {
        padding: var(--space-2) var(--space-2);
        font-size: var(--text-xs);
    }
}
