/**
 * Salary Calculator Styles
 * Extends the existing I-Migrator design system
 */

/* Calculator card borders — structured, not floating */
.col-lg-7 > .card {
    border: 1px solid var(--im-bg-300, #cccbc8);
    border-top: 3px solid var(--im-accent-200, #00668c);
    border-radius: 0.375rem;
}

.col-lg-5 > .card {
    border: 1px solid var(--im-bg-300, #cccbc8);
    border-radius: 0.375rem;
}

/* Form sections */
.salary-calculator-form .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.salary-calculator-form .form-text {
    font-size: 0.8rem;
    color: var(--im-text-200, #313d44);
}

/* Section badges */
.salary-calculator-form .badge.bg-accent-200 {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 50%;
}

/* Input group styling */
.salary-calculator-form .input-group-text {
    background-color: var(--im-bg-200, #f5f4f1);
    border-color: var(--im-bg-300, #cccbc8);
    color: var(--im-text-200, #313d44);
}

/* Checkbox styling */
.salary-calculator-form .form-check {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.salary-calculator-form .form-check-label {
    font-size: 0.9rem;
}

/* Deductions section */
.salary-calculator-form .col-md-4 .form-label {
    font-size: 0.85rem;
}

/* Results panel */
#results-display .display-5 {
    font-size: 2.5rem;
}

#result-badge {
    border-radius: 0.5rem;
}

#result-details dl {
    margin-bottom: 0;
}

#result-details dt {
    color: var(--im-text-200, #313d44);
    font-weight: 500;
}

#result-details dd {
    color: var(--im-text-100, #1d1c1c);
    font-weight: 600;
}

#result-details .row > dt,
#result-details .row > dd {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--im-bg-300, #cccbc8);
}

#result-details .row > dt:last-of-type,
#result-details .row > dd:last-of-type {
    border-bottom: none;
}

/* Recommendation styling */
#result-recommendation h6 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

#result-recommendation p {
    line-height: 1.5;
}

/* Warning alerts */
#result-warnings .alert {
    border-left: 3px solid var(--im-warning, #ffc107);
}

/* Loading state */
#calculate-btn .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
}

/* Initial state illustration */
#results-initial .display-4 {
    font-size: 3rem;
    opacity: 0.5;
}

/* Key thresholds list */
#results-initial ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#results-initial .badge {
    min-width: 80px;
    font-weight: 500;
}

/* Sticky results panel offset for navbar */
@media (min-width: 992px) {
    .sticky-lg-top {
        top: 100px !important;
    }
}

/* Mobile improvements */
@media (max-width: 991.98px) {
    .salary-calculator-form h5 {
        font-size: 1rem;
    }

    #result-badge h4 {
        font-size: 1.25rem;
    }

    #result-details dt,
    #result-details dd {
        font-size: 0.9rem;
    }
}

/* Hover effects for checkboxes */
.salary-calculator-form .form-check:hover {
    background-color: var(--im-bg-200, #f5f4f1);
    border-radius: 0.25rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: calc(1.5rem + 0.5rem);
    padding-right: 0.5rem;
}

/* Select dropdown styling */
.salary-calculator-form select.form-select {
    background-color: #fff;
}

.salary-calculator-form select.form-select:focus {
    border-color: var(--im-green, #448c74);
    box-shadow: 0 0 0 0.2rem rgba(68, 140, 116, 0.25);
}

/* Alert warning in deductions section */
.salary-calculator-form .alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border: none;
    border-left: 3px solid var(--im-warning, #ffc107);
}

/* Button states */
#calculate-btn {
    transition: all 0.2s ease;
}

#calculate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#calculate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Results CTA buttons */
#results-display .btn-outline-primary:hover {
    background-color: var(--im-green, #448c74);
    color: #fff;
}

/* Disclaimer section */
.bg-bg-200.rounded-2 h6 {
    color: var(--im-text-100, #1d1c1c);
    font-size: 0.9rem;
}

/* Animation for results */
#results-display {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error state */
#results-error .alert-danger {
    border: none;
    border-left: 3px solid var(--im-danger, #dc3545);
}

/* Breadcrumb styling */
.breadcrumb-item a {
    color: var(--im-green, #448c74);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Page header badges */
.badge.bg-primary-100 {
    background-color: rgba(68, 140, 116, 0.1) !important;
}

.badge.text-primary-300 {
    color: var(--im-green, #448c74) !important;
}

/* Tooltip styling */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* Comparison section styling */
.comparison-row {
    padding: 0.5rem 0;
}

.comparison-badge {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Comparison row values */
.comparison-row .fs-4 {
    color: var(--im-text-100, #1d1c1c);
}

.comparison-row .fs-5 {
    color: var(--im-text-100, #1d1c1c);
}

/* Mobile adjustments for comparison */
@media (max-width: 575.98px) {
    .comparison-row .fs-4 {
        font-size: 1.1rem !important;
    }

    .comparison-row .fs-5 {
        font-size: 1rem !important;
    }

    .comparison-badge {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
}

/* Conditional fields styling (FRNT-001 to FRNT-004) */
#nhs-band-section,
#education-role-section,
#london-area-section,
#isl-experience-section {
    background-color: rgba(var(--bs-info-rgb), 0.03);
    padding: 1rem;
    margin-left: 0;
    border-radius: 0 0.5rem 0.5rem 0;
    animation: slideDown 0.2s ease-out;
}

#isl-experience-section {
    background-color: rgba(var(--bs-warning-rgb), 0.03);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ISL info alert */
#isl-info-alert {
    background-color: rgba(var(--bs-info-rgb), 0.1);
    border: none;
    border-left: 3px solid var(--im-info, #0dcaf0);
}

/* ISL warnings in results (FRNT-005) */
.isl-warning {
    background-color: rgba(var(--bs-info-rgb), 0.1) !important;
    border: none !important;
    border-left: 3px solid var(--im-info, #0dcaf0) !important;
}

#result-warnings .alert-info {
    background-color: rgba(var(--bs-info-rgb), 0.1);
    border: none;
    border-left: 3px solid var(--im-info, #0dcaf0);
}

/* NHS band warning */
#nhs-band-warning {
    background-color: rgba(var(--bs-warning-rgb), 0.1);
    padding: 0.5rem;
    border-radius: 0.25rem;
}

/* Nation selector styling */
#job_nation {
    background-color: #fff;
}

/* Disabled/dimmed state for non-eligible options */
.salary-calculator-form .col-md-6[style*="opacity: 0.5"] .form-check-label {
    cursor: not-allowed;
}

.salary-calculator-form .col-md-6[style*="opacity: 0.5"] .form-check-input {
    cursor: not-allowed;
}

/* Transitional badge in dropdown */
#nhs_band option:disabled {
    color: var(--im-text-200, #313d44);
}

/* Education role select */
#education_role option[data-scotland-only="true"] {
    font-style: italic;
}

/* Smooth transitions for conditional fields */
#nhs-band-section,
#education-role-section,
#london-area-section,
#isl-experience-section,
#isl-info-alert {
    transition: opacity 0.2s ease, max-height 0.3s ease;
}

