/* ── Salary Benchmark Section ── */

/* Always-visible intro card */
.salary-benchmark-card {
    margin-top: 16px;
    padding: 10px 14px 8px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.salary-benchmark-card-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.salary-benchmark-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.01em;
}

.salary-benchmark-card-note {
    font-size: 10px;
    color: var(--color-text-disabled, #555);
    line-height: 1.5;
    margin: 0;
}

/* Body — always visible, seamlessly joined to the card above */
.salary-benchmark-body {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.salary-benchmark-inner {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Rows */
.sbm-row {
    display: flex;
    gap: 10px;
}

.sbm-row-2col > .sbm-field {
    flex: 1;
    min-width: 0;
}

/* Fields */
.sbm-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sbm-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

/* Required fields: accent dot before the label text */
.sbm-label.sbm-required::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
    opacity: 0.7;
}

/* Optional fields: label is more dimmed */
.sbm-label.sbm-optional {
    opacity: 0.5;
}

/* Shake animation for missing required fields */
@keyframes sbm-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.sbm-input.sbm-error {
    border-color: var(--color-error, #ff6b6b) !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2) !important;
    animation: sbm-shake 0.35s ease;
}

.sbm-input {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 13px;
    padding: 7px 10px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.sbm-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.sbm-input::placeholder {
    color: var(--color-text-disabled, #555);
}

/* Steppers */
.sbm-stepper {
    display: flex;
    align-items: stretch;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 34px;
}

.sbm-step-btn {
    padding: 0 10px;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
    font-family: inherit;
}

.sbm-step-btn:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.sbm-step-btn:active {
    background: var(--color-accent);
    color: #fff;
}

.sbm-step-input {
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
    color: var(--color-text-primary);
    text-align: center;
    padding: 0 4px;
    width: 42px;
    flex-shrink: 0;
    font-size: 13px;
    font-family: inherit;
    -moz-appearance: textfield;
}

.sbm-step-input:focus {
    outline: none;
    background: rgba(0, 122, 255, 0.08);
}

.sbm-step-input::-webkit-outer-spin-button,
.sbm-step-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Submit button */
.sbm-submit-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
    font-family: inherit;
}

.sbm-submit-btn:hover:not(:disabled) {
    background: var(--color-accent-hover, #339af0);
}

.sbm-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.sbm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sbm-submit-btn.sbm-success {
    background: var(--color-success, #51cf66);
}

.sbm-privacy-note {
    font-size: 10px;
    color: var(--color-text-disabled, #555);
    text-align: center;
    line-height: 1.5;
    margin-top: -2px;
}

/* Light mode */
body.light-mode .salary-benchmark-card,
body.light-mode .salary-benchmark-body {
    border-color: #d1d1d6;
}

/* Mobile */
@media (max-width: 768px) {
    .salary-benchmark-header {
        padding: 11px 14px;
        font-size: 12px;
    }

    .salary-benchmark-inner {
        padding: 12px 14px 14px;
        gap: 9px;
    }

    .sbm-input {
        font-size: 12px;
        padding: 6px 9px;
    }

    .sbm-step-input {
        font-size: 12px;
    }

    .sbm-step-btn {
        padding: 0 8px;
        font-size: 15px;
    }

    .sbm-submit-btn {
        font-size: 12px;
        padding: 9px 14px;
    }
}
