/* === HSP Points Calculator. Adds to payroll-calculator.css === */

/* TIGHTER UI: smaller paddings, denser layout for the long HSP form */
.pc-form .pc-row { padding: 10px 0; }
.pc-form .pc-row-toggle { padding: 8px 0; }
.pc-form .pc-toggle { padding: 7px 11px; }
.pc-form .pc-input,
.pc-form .pc-select { padding: 7px 11px; font-size: var(--small); }

/* Restore prefix-padding (the tighter rule above stripped it) so the ¥ sign
   never overlaps the digits, even for 9-digit incomes like 300,000,000 */
.pc-form .pc-row-control-prefix + .pc-input { padding-left: 28px; }
.pc-form .pc-input-prefix       + .pc-input { padding-left: 32px; }
.pc-form .pc-input-gross        { padding-left: 36px !important; }

.pc-form .pc-row-control { width: 100%; }
.pc-form .pc-btn-reset { margin-top: 14px; }

/* Section headers within the long form */
.hsp-section { padding: 12px 0 4px; border-top: 1px solid var(--border-subtle); margin-top: 6px; }
.hsp-section:first-of-type { padding-top: 0; border-top: none; margin-top: 0; }
.hsp-section + .pc-row { padding-top: 4px; }
.hsp-section-title {
    margin: 0 0 2px;
    font-size: var(--extra-small);
    font-weight: 800;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.10em;
}
.hsp-section-text {
    margin: 0;
    font-size: var(--extra-small);
    color: var(--text-muted);
    line-height: 1.45;
}

/* Stack of full-width checkbox toggles inside a section */
.hsp-checks { display: grid; gap: 6px; padding: 6px 0 0; }
.hsp-checks .pc-toggle { padding: 7px 11px; }
.hsp-checks .pc-toggle-text { font-size: var(--small); line-height: 1.35; }

/* Conditional sub-checkbox indented under its parent */
.hsp-sub { padding-left: 20px; }

/* "+X" point pill on form labels (potential reward, soft outline). Distinct from
   the result-panel pill (solid blue) which means "earned". UX best practice:
   filled pill = active state, outlined pill = available/preview state. */
.hsp-pts-pill {
    display: inline-block;
    background: rgba(0, 113, 235, 0.10);
    color: var(--blue);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: var(--extra-extra-small);
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
    margin: 0 2px;
    letter-spacing: 0.02em;
    vertical-align: 1px;
}
/* Inline note in muted text following a pill (e.g. "management type only") */
.hsp-pts-note {
    color: var(--text-muted);
    font-weight: 500;
    font-size: var(--extra-small);
}

/* === Result panel. Primary metric (TOTAL POINTS) === */
.hsp-points-value {
    font-size: 60px !important;
    font-weight: 900 !important;
    color: var(--blue) !important;
    letter-spacing: -0.04em !important;
    line-height: 1 !important;
    font-variant-numeric: tabular-nums;
}
.hsp-points-suffix {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
    margin-left: 6px;
    letter-spacing: 0;
}

/* Status badge */
.hsp-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: var(--extra-small);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    border: 1px solid transparent;
}
.hsp-status {
    padding: 8px 14px;
    font-size: var(--small);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}
.hsp-status[data-state="below"] {
    background: #f4f5f7; color: var(--text-muted); border-color: var(--border-default);
}
.hsp-status[data-state="belowmin"] {
    background: var(--red); color: #fff; border-color: transparent;
    box-shadow: 0 4px 14px rgba(235, 0, 58, 0.28);
}
.hsp-status[data-state="eligible"] {
    background: var(--green); color: #fff; border-color: transparent;
    box-shadow: 0 4px 14px rgba(0, 154, 68, 0.28);
}
.hsp-status[data-state="special"] {
    background: linear-gradient(135deg, #003e82 0%, #0058b8 100%);
    color: #fff; border-color: transparent;
    box-shadow: 0 4px 14px rgba(0, 88, 184, 0.30);
}
.hsp-status::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.hsp-status[data-state="eligible"]::before,
.hsp-status[data-state="belowmin"]::before,
.hsp-status[data-state="special"]::before {
    background: rgba(255, 255, 255, .9);
}

.hsp-status-note {
    margin: 8px 0 0;
    font-size: var(--extra-small);
    color: var(--text-muted);
}

/* === Progress bar with markers at 70 and 80 === */
.hsp-bar-wrap {
    margin: 18px 0 16px;
    position: relative;
}
.hsp-bar-track {
    height: 10px;
    background: rgba(0, 88, 184, 0.10);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.hsp-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0071eb 0%, #0058b8 100%);
    border-radius: 999px;
    transition: width .25s ease-out;
}
.hsp-bar-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hsp-bar-marker {
    position: absolute;
    top: -3px;
    width: 1px; height: 16px;
    background: rgba(0, 88, 184, 0.55);
}
.hsp-bar-marker[data-at="70"] { left: 70%; }
.hsp-bar-marker[data-at="80"] { left: 80%; }
.hsp-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: var(--extra-extra-small);
    color: var(--text-muted);
    font-weight: 600;
}
.hsp-bar-labels span:nth-child(2) { position: absolute; left: calc(70% - 18px); }
.hsp-bar-labels span:nth-child(3) { position: absolute; left: calc(80% - 18px); }
.hsp-bar-labels { position: relative; }

/* === Breakdown table === */
.pc-result .pc-table th:last-child,
.pc-result .pc-table td:last-child {
    width: 60px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.hsp-row-zero th, .hsp-row-zero td { color: var(--text-faint, #94a3b8) !important; opacity: 0.55; font-weight: 500 !important; }
.hsp-row-total {
    border-top: 2px solid var(--blue) !important;
}
.hsp-row-total th, .hsp-row-total td {
    padding-top: 10px !important;
    font-size: var(--default) !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
}

/* Bonus details list */
.hsp-bonuses-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 113, 235, .14);
}
.hsp-bonuses-title {
    font-size: var(--extra-small);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin: 0 0 8px;
}
.hsp-bonuses {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    gap: 4px;
}
.hsp-bonuses li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    background: #f5f8ff;
    border-radius: 8px;
    font-size: var(--extra-small);
    color: var(--text-main);
    line-height: 1.4;
}
/* "+X" point chip pill. UX best practice for compact numeric badges */
.hsp-bonuses li strong {
    flex-shrink: 0;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: var(--extra-extra-small);
    letter-spacing: 0.02em;
    padding: 3px 9px;
    border-radius: 999px;
    line-height: 1.3;
}
.hsp-bonus-empty {
    background: transparent !important;
    color: var(--text-muted) !important;
    font-style: italic;
    justify-content: center !important;
}

/* J-Skip callout */
.hsp-jskip {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: var(--extra-small);
    line-height: 1.55;
}
.hsp-jskip[data-state="eligible"] {
    background: linear-gradient(135deg, #003e82 0%, #0058b8 100%);
    color: #fff;
    font-weight: 600;
}
.hsp-jskip[data-state="notmatch"] {
    background: #f5f8ff;
    color: var(--text-muted);
    border: 1px solid rgba(0, 113, 235, .14);
}

/* Mobile */
@media (max-width: 480px) {
    .hsp-points-value { font-size: 48px !important; }
}
