/*
 * Expected salary calculators. Built on the existing calculator components
 * (.calc-hero, .calc-tool, .card.shadow, .sw-btn, .form-select).
 * Only the few additions below are new; colours are the existing site colours.
 */

/* Compact summary */
.sd-sum { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 0.9rem 1.25rem; }
.sd-amount { font-size: 2rem; line-height: 1.15; }
.sd-sum-side { text-align: right; }

/* Step indicator: circles joined by bars that fill as you move on */
.sd-steps { display: flex; align-items: center; margin: 0 0 16px; padding: 0 0 14px; border-bottom: 1px solid #eef1f4; }
.sd-steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #8a949e; white-space: nowrap; }
.sd-steps li:not(:last-child) { flex: 1 1 0; }
.sd-steps li.is-reachable { cursor: pointer; }
.sd-line { position: relative; flex: 1 1 auto; height: 4px; margin: 0 12px; background: #eef1f4; border-radius: 99px; overflow: hidden; }
.sd-line::after { content: ''; position: absolute; inset: 0; width: 0; background: #64ddac; border-radius: 99px; transition: width 0.45s ease; }
.sd-steps li.is-done .sd-line::after { width: 100%; }
.sd-n { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1px solid #c9d2db; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: #fff; }
.sd-steps li.is-active { color: #2e5984; font-weight: 600; }
.sd-steps li.is-active .sd-n { background: #2e5984; border-color: #2e5984; color: #fff; }
.sd-steps li.is-done { color: #2e5984; }
.sd-steps li.is-done .sd-n { background: #64ddac; border-color: #64ddac; color: #12372a; }

.sd-panel { min-height: 120px; }
.sd-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
@media (max-width: 575.98px) { .sd-sum-side { text-align: left; } .sd-amount { font-size: 1.7rem; } }
.sd-nav .sw-btn { min-width: 130px; min-height: 46px; line-height: 1.2; padding: 0 16px; }
#sd-next { margin-left: auto; }

/* Loader between steps */
.sd-loader { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border-radius: inherit; z-index: 2; }
.sd-loader[hidden] { display: none; }
.sd-loader .spinner-border { width: 2rem; height: 2rem; color: #2e5984; border-width: 0.2em; }

/* Experience: existing toggle buttons */
.sd-exp { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-exp .sw-btn { flex: 1 1 30%; min-width: 0; font-size: 13px; line-height: 1.2; min-height: 44px; padding: 0 8px; white-space: normal; }
.sd-label { display: block; font-size: 14px; font-weight: 500; color: #2e5984; margin-bottom: 6px; line-height: 1.3; }
.sd-field.is-missing > .form-label,
.sd-field.is-missing > .sd-label { color: #dc3545; }
.sd-field.is-missing .form-select { border-color: #dc3545; }

/* Summary and results */
.sd-mask { letter-spacing: 0.06em; }
.sd-break li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid #eef1f4; font-size: 14px; }
.sd-break li:first-child { border-top: 0; }
.sd-cmp { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 0; margin-bottom: 8px; cursor: pointer; }
.sd-cmp-row { display: flex; justify-content: space-between; font-size: 13px; color: #6a6a6a; margin-bottom: 3px; }
.sd-cmp.is-selected .sd-cmp-row { color: #2e5984; font-weight: 600; }
.sd-cmp-track { display: block; height: 6px; background: #eef1f4; border-radius: 99px; overflow: hidden; }
.sd-cmp-track i { display: block; height: 100%; background: #b8c9db; border-radius: 99px; }
.sd-cmp.is-selected .sd-cmp-track i { background: #64ddac; }
.sd-details > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: #2e5984; }
.sd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sd-actions .sw-btn { width: 100%; line-height: 1.2; min-height: 46px; font-size: 14px; padding: 0 10px; display: flex; align-items: center; justify-content: center; }
.sd-actions .sw-outline, .sd-nav .sw-outline, .sd-exp .sw-outline { background: #fff; }
.sd-actions .sw-outline:hover, .sd-nav .sw-outline:hover, .sd-exp .sw-outline:hover { background: #2e5984; color: #fff; }

@media (max-width: 575.98px) {
    .sd-t { display: none; }
    .sd-steps li.is-active .sd-t { display: inline; }
    .sd-line { margin: 0 8px; }
    .sd-actions { grid-template-columns: 1fr; }
}
