/* Optimized fach-hr-form.css - Adjusted for consistency with website's general design */

/* --- Variables --- */
:root {
    /* Colors - Aligned with base.css */
    --primary: #FFF200;
    --primary-dark: #EFC000; /* From base.css (original form was #E6D900) */
    --primary-light: #FFF200; /* From base.css (original form was #FFF566, base is same as primary) */
    --primary-alpha: rgba(255, 242, 0, 0.1); /* From base.css (original form was 0.15) */

    /* Base Colors - Aligned with base.css */
    --dark: #111111;
    --dark-800: #333333;
    --dark-600: #555555;
    --dark-400: #777777;
    --light: #FFFFFF;
    --light-800: #F5F5F5; /* Page background */
    --light-600: #EEEEEE; /* Input backgrounds, borders */
    --light-400: #DDDDDD; /* Subtle borders, dividers */
    --gray: #999999;
    --text-gray: var(--dark-600); /* Using a base variable; original form was #555555 */

    /* Feedback Colors (Retained as potentially form-specific) */
    --error-color: #D8000C;
    --error-bg: #FFD2D2;
    --success-color: #4F8A10;
    --success-bg: #DFF2BF;

    /* Typography - Aligned with base.css (assuming 'Inter' is added to base.css definitions) */
    --font-body: 'Gilroy Light', 'Inter', Arial, sans-serif;
    --font-heading: 'Gilroy ExtraBold', 'Inter', Arial, sans-serif;

    /* Spacing - Consistent with base.css */
    --space-xs: 0.25rem;  /* 4px */
    --space-sm: 0.5rem;   /* 8px */
    --space-md: 1rem;    /* 16px */
    --space-lg: 1.5rem;  /* 24px */
    --space-xl: 2rem;    /* 32px */
    --space-xxl: 3rem;   /* 48px */

    /* Border Radius - Consistent with base.css */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows - Aligned with base.css */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);   /* Original form: 0.07 */
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);  /* Original form: 0 4px 12px rgba(0,0,0,0.1) */
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.12); /* Original form: 0 8px 20px rgba(0,0,0,0.12) */

    /* Transitions - Aligned with base.css */
    --transition-fast: 0.2s ease;     /* Original form: 0.2s ease-out */
    --transition-medium: 0.3s ease;   /* Original form: 0.3s ease-out */
    /* --transition-slow from base.css would be 0.5s ease; form did not explicitly define it but could use it */

    /* Max Width (Specific to form, retained) */
    --max-width: 780px;
}

/* --- Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body.page-hr-form { /* Added class to scope body styles if this CSS is loaded globally */
    font-family: var(--font-body);
    background-color: var(--light-800);
    color: var(--dark);
    line-height: 1.6;
    font-size: 16px; /* Base font size */
}

/* --- Form Container --- */
.form-container {
    max-width: var(--max-width);
    margin: 5rem auto 3rem;
    background-color: var(--light);
    padding: var(--space-xl) var(--space-xxl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* --- Typography --- */
h1 {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--dark);
    margin-bottom: var(--space-md);
    font-size: 2.2em;
    font-weight: normal; /* Gilroy ExtraBold is already bold */
}

.form-description, .fieldset-description {
    text-align: left;
    color: var(--text-gray);
    margin-bottom: var(--space-lg);
    font-size: 0.95em;
    line-height: 1.7;
}
.form-description {
    text-align: center;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}


/* --- Progress Bar --- */
.progress-container {
    margin-bottom: var(--space-xl);
    text-align: center;
}

#formProgress {
    width: 100%;
    height: 10px;
    appearance: none;
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-sm);
    background-color: var(--light-600);
}

#formProgress::-webkit-progress-bar {
    background-color: var(--light-600);
    border-radius: var(--radius-md);
}

#formProgress::-webkit-progress-value {
    background-color: var(--primary);
    border-radius: var(--radius-md);
    transition: width 0.4s ease; /* Retained specific ease for progress */
}

#formProgress::-moz-progress-bar {
    background-color: var(--primary);
    border-radius: var(--radius-md);
    transition: width 0.4s ease; /* Retained specific ease for progress */
}

#progressText {
    font-size: 0.9em;
    color: var(--dark-400);
}

/* --- Form Pages --- */
.form-page {
    display: none;
    animation: fadeIn 0.5s ease-in-out; /* Retained specific animation */
}

.form-page.active {
    display: block;
}

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

/* --- Fieldsets and Legends --- */
fieldset {
    border: 1px solid var(--light-400);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-md);
    position: relative;
}

legend {
    font-family: var(--font-heading);
    font-weight: normal;
    padding: 0 var(--space-sm);
    color: var(--dark);
    font-size: 1.25em;
    margin-left: 0;
    margin-bottom: var(--space-sm);
}

/* --- Form Groups --- */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label:not(.checkbox-group label):not(.captcha-group label) {
    display: block;
    margin-bottom: var(--space-sm);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark-800);
}

.required-star {
    color: var(--error-color);
    margin-left: 2px;
    font-weight: normal;
}

.field-description {
    font-size: 0.875em;
    color: var(--dark-400);
    margin-top: calc(-1 * var(--space-sm) + 4px);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.field-description.confidential-note {
    font-weight: bold;
    color: var(--dark-600);
}

input[type="file"]#profilePicFile + small.field-description {
    margin-left: var(--space-sm);
}

.field-error {
    font-size: 0.85em;
    color: var(--error-color);
    margin-top: var(--space-xs);
    display: none;
    font-weight: 600;
}

/* --- Form Group Layouts --- */
.form-group-inline {
    display: flex;
    gap: var(--space-lg);
}

.form-group-inline > div {
    flex: 1;
}

.form-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-lg);
}

/* --- Form Inputs --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: calc(var(--space-sm) + 2px) var(--space-md);
    border: 1px solid var(--light-400);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color var(--transition-medium), box-shadow var(--transition-medium);
    background-color: var(--light);
    color: var(--dark-800);
    appearance: none;
}

/* Input States */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray);
    font-family: var(--font-body);
    opacity: 0.8;
}

input.input-error,
select.input-error,
textarea.input-error,
details.input-error > summary {
     border-color: var(--error-color) !important;
     background-color: var(--error-bg) !important;
     color: var(--error-color) !important;
}
input.input-error::placeholder,
textarea.input-error::placeholder {
    color: var(--error-color);
    opacity: 0.7;
}


/* --- Special Input Styles --- */
input[type="date"] {
    min-height: calc(1rem + 2 * (var(--space-sm) + 2px) + 2px);
    color-scheme: light;
    position: relative;
}

input[type="file"] {
    padding: var(--space-sm);
    border: 2px dashed var(--light-400);
    background-color: var(--light-800);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
}

input[type="file"]::file-selector-button {
     font-family: var(--font-heading);
     padding: var(--space-sm) var(--space-md);
     border-radius: var(--radius-sm);
     border: none;
     background-color: var(--primary);
     color: var(--dark); /* Text color for yellow button should be dark for contrast */
     cursor: pointer;
     transition: background-color var(--transition-fast);
     margin-right: var(--space-md);
     font-size: 0.9rem;
     text-transform: uppercase;
     letter-spacing: 0.5px;
}

input[type="file"]::file-selector-button:hover {
     background-color: var(--primary-dark);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

select {
     background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='%23555555'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E"); /* fill is var(--dark-600) */
     background-repeat: no-repeat;
     background-position: right var(--space-sm) center;
     background-size: 20px;
     padding-right: calc(var(--space-md) + 24px);
}
select[multiple] {
    background-image: none;
    padding-right: var(--space-md);
    min-height: 100px;
}


/* --- Range Slider (Native for Student Form) --- */
.range-container {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xs);
}

input[type="range"] {
    flex-grow: 1;
    height: 8px;
    cursor: pointer;
    appearance: none;
    background: var(--light-600);
    border-radius: var(--radius-sm);
    padding: 0;
    border: none;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid var(--light);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s ease; /* Retained specific ease */
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}
input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(0.95);
}


input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid var(--light);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s ease; /* Retained specific ease */
}
input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
}
input[type="range"]::-moz-range-thumb:active {
    transform: scale(0.95);
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    background: var(--light-600);
    border-radius: var(--radius-sm);
    border: none;
}
input[type="range"]::-moz-range-progress {
    background-color: var(--primary);
    height: 8px;
    border-radius: var(--radius-sm);
}


.range-value {
    font-family: var(--font-heading);
    font-weight: normal;
    font-size: 1em;
    min-width: 80px;
    text-align: right;
    color: var(--dark-600);
}

/* --- Checkbox & Multi-select Details --- */
.checkbox-group {
    padding: var(--space-xs) 0;
}
details.multi-select-details + .checkbox-group {
    padding-top: 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: calc(var(--space-sm) + 2px);
    cursor: pointer;
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--dark);
    padding: var(--space-xs) 0;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}
.checkbox-group label:hover {
    background-color: var(--primary-alpha); /* Subtle hover, uses updated alpha */
}

.checkbox-group input[type="checkbox"] {
    width: 1.1em;
    height: 1.1em;
    margin-right: var(--space-sm);
    accent-color: var(--primary-dark); /* Uses updated primary-dark */
    cursor: pointer;
    flex-shrink: 0;
    appearance: auto;
}

details.multi-select-details {
    border: 1px solid var(--light-400);
    border-radius: var(--radius-sm);
    background-color: var(--light);
    margin-top: var(--space-xs);
    position: relative;
}

details.multi-select-details summary {
    padding: calc(var(--space-sm) + 2px) var(--space-md);
    cursor: pointer;
    list-style: none;
    position: relative;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--dark-800);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}
details.multi-select-details summary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

details.multi-select-details summary::-webkit-details-marker {
    display: none;
}

details.multi-select-details summary::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-style: solid;
    border-color: var(--dark-600);
    border-width: 0 2px 2px 0;
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-70%) rotate(45deg);
    transition: transform var(--transition-medium);
    pointer-events: none;
}

details[open].multi-select-details summary::after {
    transform: translateY(-30%) rotate(-135deg);
}

details.multi-select-details .checkbox-group {
    padding: var(--space-sm) var(--space-md) var(--space-md);
    max-height: 220px;
    overflow-y: auto;
    border-top: 1px solid var(--light-400);
    background-color: var(--light);
}
.employer-checkboxes {
    /* Inherits .checkbox-group */
}


/* --- Terms Box --- */
.terms-box {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--light-400);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    background-color: var(--light-800);
    font-size: 0.875em;
    line-height: 1.6;
    border-radius: var(--radius-sm);
    color: var(--dark-600);
}

.terms-agreement label {
    font-weight: 700;
    align-items: flex-start;
    margin-top: var(--space-md);
}

.terms-agreement input[type="checkbox"] {
     margin-top: 0.25em;
}

/* --- Captcha --- */
.captcha-group {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    background-color: var(--light-800);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--light-400);
}

.captcha-group label#captchaLabel {
    margin-bottom: 0;
    font-family: var(--font-heading);
    font-weight: normal;
    flex-shrink: 0;
    color: var(--dark-800);
    font-size: 1em;
}

.captcha-group input#captchaInput {
    width: 120px;
    flex-grow: 0;
    min-width: 80px;
    text-align: center;
    font-size: 1.1em;
}

/* --- Dynamic Entry Styles --- */
.dynamic-entries-container {
    /* No common styles needed here currently */
}

.education-entry,
.experience-entry,
.skill-entry,
.activity-entry {
    position: relative;
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--light-400);
    border-radius: var(--radius-md);
    background-color: var(--light);
    box-shadow: var(--shadow-sm); /* Uses updated shadow */
}

.entry-divider {
    display: none;
}

.remove-button-container {
    text-align: right;
    margin-bottom: 0;
    position: absolute;
    top: calc(var(--space-sm) + 2px);
    right: calc(var(--space-sm) + 2px);
    z-index: 10;
}

.remove-degree-btn {
    width: 30px;
    height: 30px;
    background-color: transparent;
    color: var(--dark-400);
    border-radius: 50%; /* Circle */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), border-radius var(--transition-fast);
    padding: 0;
    border: 1px solid var(--light-400);
    box-shadow: none;
    overflow: hidden;
}

.remove-degree-btn svg {
    width: 1.2em;
    height: 1.2em;
    display: block;
}

.remove-degree-btn:hover,
.remove-degree-btn:focus-visible {
    background-color: var(--error-bg);
    color: var(--error-color);
    border-color: var(--error-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-sm); /* Uses updated shadow */
    border-radius: var(--radius-sm); /* Square on hover */
}

.remove-degree-btn:active {
    transform: scale(1);
    background-color: var(--error-color);
    color: var(--light);
    border-color: var(--error-color);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.hidden-form-group {
    display: none;
    margin-top: var(--space-md);
    padding: var(--space-md);
    background-color: var(--light-800);
    border-radius: var(--radius-sm);
    border: 1px solid var(--light-400);
}


/* --- Buttons --- */
.navigation-buttons, .form-submit-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-xs);
    padding-top: var(--space-xs);
}
.form-submit-area {
    justify-content: flex-end;
}

/* Base .btn styles should largely come from main.css (buttons.css) */
/* This .btn definition ensures form-specific buttons match general site buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Use padding from buttons.css (main site) for consistency */
    padding: var(--space-md) var(--space-xl); /* Was calc(var(--space-sm) + 4px) var(--space-xl) */
    border-radius: var(--radius-sm);
    font-size: 0.95rem; /* Site buttons.css might use 1rem, adjust if needed */
    font-weight: normal; /* Site buttons.css uses bold, but Gilroy ExtraBold is already bold */
    font-family: var(--font-heading);
    transition: all var(--transition-medium); /* Uses updated transition */
    text-align: center;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    cursor: pointer;
    min-width: 140px;
    line-height: 1.4;
    box-shadow: var(--shadow-sm); /* Uses updated shadow */
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background-color: var(--light-600) !important;
    color: var(--dark-400) !important;
    border-color: var(--light-400) !important;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md); /* Uses updated shadow */
}
.btn:active {
    transform: translateY(0px);
    box-shadow: var(--shadow-sm); /* Uses updated shadow */
}

/* Button Variations specific to form context */
/* These should visually align with btn-primary from buttons.css */
.btn-next, .btn-submit {
    background-color: var(--primary);
    color: var(--dark); /* Text color for yellow buttons, typically dark */
    border-color: var(--primary);
}
.btn-next:hover, .btn-submit:hover {
    background-color: var(--primary-dark); /* Uses updated primary-dark */
    border-color: var(--primary-dark);
}

/* This should be a distinct style, e.g., like a secondary or outline button */
.btn-back {
    background-color: var(--light);
    color: var(--dark-600);
    border: 1px solid var(--light-400);
    box-shadow: none; /* Typically, back buttons are less prominent */
}
.btn-back:hover {
    background-color: var(--light-800); /* Slight change on hover */
    border-color: var(--dark-400);
    color: var(--dark-800);
}

/* For "Add Degree", "Add Skill" etc. - could align with btn-dark or a new subtle style */
.btn-secondary {
    background-color: var(--dark-800);
    color: var(--light);
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
    min-width: auto;
    box-shadow: none;
    border-color: var(--dark-800);
}
.btn-secondary:hover {
    background-color: var(--dark); /* Darken on hover */
    color: var(--light);
    border-color: var(--dark);
}
.btn-secondary i {
    margin-right: var(--space-sm);
    font-size: 0.9em;
}


/* Page-specific button handling */
#page1 .btn-back { display: none; }
#page8 .btn-next { display: none; } /* Assuming page 8 is the last page for student form */
/* For hire-students-switzerland.html (4 pages) */
/* #page4 .btn-next { display: none; } /* This would be handled by JS or specific form logic */
#page1 .navigation-buttons { justify-content: flex-end; }


/* Status messages */
.form-status {
    margin-top: var(--space-md);
    width: 100%;
}
.form-status p {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1em;
    font-weight: 600;
    border-width: 1px;
    border-style: solid;
}
.form-status p.success { /* Ensure these use the form's feedback colors */
    background-color: var(--success-bg);
    color: var(--success-color);
    border-color: var(--success-color);
}
.form-status p.error {
    background-color: var(--error-bg);
    color: var(--error-color);
    border-color: var(--error-color);
}


/* === Ion.RangeSlider Customization (uses updated variables) === */
.ion-range-slider-container {
    margin-bottom: var(--space-lg);
    padding-top: 10px;
    margin-top: var(--space-sm);
}

.ion-range-slider-container .irs--flat {
    height: auto;
    min-height: 50px;
}

.ion-range-slider-container .irs--flat .irs-line {
    background-color: var(--light-600);
    border: 1px solid var(--light-400);
    height: 8px;
    top: 25px;
    border-radius: var(--radius-sm);
}

.ion-range-slider-container .irs--flat .irs-bar {
    background-color: var(--primary);
    height: 8px;
    top: 25px;
}
.ion-range-slider-container .irs--flat .irs-bar--single,
.ion-range-slider-container .irs--flat .irs-bar-edge {
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}
.ion-range-slider-container .irs--flat .irs-bar:nth-of-type(3) {
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}
.ion-range-slider-container .irs--flat .irs-slider.to + .irs-bar {
     border-top-right-radius: var(--radius-sm);
     border-bottom-right-radius: var(--radius-sm);
}


.ion-range-slider-container .irs--flat .irs-handle {
    background-color: var(--primary);
    border: 3px solid var(--light);
    width: 20px;
    height: 20px;
    top: 19px;
    box-shadow: var(--shadow-sm); /* Uses updated shadow */
    border-radius: 50%;
}
.ion-range-slider-container .irs--flat .irs-handle>i:first-child { display: none; }
.ion-range-slider-container .irs--flat .irs-handle.state_hover,
.ion-range-slider-container .irs--flat .irs-handle:hover {
    background-color: var(--primary-dark); /* Uses updated primary-dark */
    border-color: var(--light);
    box-shadow: var(--shadow-md); /* Uses updated shadow */
    transform: scale(1.1);
}

.ion-range-slider-container .irs--flat .irs-min,
.ion-range-slider-container .irs--flat .irs-max {
    color: var(--dark-600);
    font-family: var(--font-body);
    font-size: 0.85em;
    background-color: transparent;
    top: 0;
    padding: 0 var(--space-xs);
    display: block !important;
}

.ion-range-slider-container .irs--flat .irs-from,
.ion-range-slider-container .irs--flat .irs-to,
.ion-range-slider-container .irs--flat .irs-single {
    background-color: var(--dark-800);
    color: var(--light);
    font-family: var(--font-heading);
    font-size: 0.9em;
    font-weight: normal;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    text-shadow: none;
    top: -5px;
}
.ion-range-slider-container .irs--flat .irs-from:before,
.ion-range-slider-container .irs--flat .irs-to:before,
.ion-range-slider-container .irs--flat .irs-single:before {
    border-top-color: var(--dark-800);
}

.ion-range-slider-container .irs--flat .irs-grid {
    top: 40px;
    height: auto;
}
.ion-range-slider-container .irs--flat .irs-grid-text {
    color: var(--dark-400);
    font-family: var(--font-body);
    font-size: 0.8em;
}
.ion-range-slider-container .irs--flat .irs-grid-pol { background-color: var(--light-400); }
.ion-range-slider-container .irs--flat .irs-grid-pol.small { background-color: var(--light-600); }

/* === END Ion.RangeSlider Customization === */


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .form-container {
        padding: var(--space-lg) var(--space-xl);
        margin-right: var(--space-sm);
        margin-left: var(--space-sm);
        margin-top: 3rem;
    }

    h1 { font-size: 1.8em; }

    .form-group-inline {
        flex-direction: column;
        gap: 0;
    }
     .form-group-inline > div {
        margin-bottom: var(--space-lg);
    }
    .form-group-inline > div:last-child {
        margin-bottom: 0;
    }

    .form-group-grid {
        gap: var(--space-md);
    }

    .captcha-group {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }
    .captcha-group label#captchaLabel { text-align: center; }
    .captcha-group input#captchaInput { width: 100%; }


    .navigation-buttons, .form-submit-area {
        flex-direction: column;
        gap: var(--space-md);
    }
    .btn { width: 100%; }

    #page1 .navigation-buttons {
        align-items: stretch;
    }
     #page8 .navigation-buttons { /* Student form last page */
        flex-direction: column-reverse;
        align-items: stretch;
    }
    /* For Employer form (4 pages), last page is page4 */
    .employer-form #page4 .navigation-buttons {
        flex-direction: column-reverse;
        align-items: stretch;
    }


    legend {
        white-space: normal;
        font-size: 1.15em;
    }

    .range-container {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    .range-value { text-align: center; margin-top: var(--space-xs); }

    .education-entry, .experience-entry, .skill-entry, .activity-entry {
        padding: var(--space-md);
    }
    .remove-button-container {
        top: var(--space-xs);
        right: var(--space-xs);
    }
}

@media (max-width: 480px) {
    body.page-hr-form { font-size: 15px; }
    .form-container { padding: var(--space-md); }
    h1 { font-size: 1.6em; }
    input, select, textarea, .btn, details.multi-select-details summary { font-size: 0.95rem; }
    .btn { padding: var(--space-sm) var(--space-lg); }
    fieldset { padding: var(--space-md); }
    legend { font-size: 1.1em; }

    .form-description, .fieldset-description {
        font-size: 0.9em;
    }
    .field-error {
        font-size: 0.8em;
    }
}

/* --- Dark Mode Styles --- */
@media (prefers-color-scheme: dark) {
    :root {
        /* Aligned with dark-mode.css (from base theme) */
        --light: #121212;        /* Form container background */
        --light-800: #1e1e1e;    /* Page bg */
        --light-600: #2a2a2a;    /* Input bg, less prominent borders */
        --light-400: #3a3a3a;    /* Subtle borders, dividers */

        --dark: #f8f8f8;         /* Main text */
        --dark-800: #e6e6e6;     /* Lighter text, headings */
        --dark-600: #c8c8c8;     /* Medium text */
        --dark-400: #a0a0a0;     /* Subtle text, placeholders */
        --text-gray: var(--dark-400); /* Consistent with base dark mode */
        --gray: #8a8a8a;         /* Placeholder text color (if needed distinctly from --dark-400) */

        --primary: #FFF200;      /* Base dark theme primary */
        --primary-dark: #FFF200; /* Base dark theme primary-dark (same as primary) */
        --primary-light: #FFF200;/* Base dark theme primary-light (same as primary) */
        --primary-alpha: rgba(255, 224, 50, 0.15); /* Base dark theme alpha (form was 0.2) */

        /* Feedback Colors (Retained as form-specific for dark mode) */
        --error-bg: #4D0003;
        --error-color: #FFBDBD;
        --success-bg: #1E420A;
        --success-color: #BDECB6;

        /* Shadows - Aligned with dark-mode.css (from base theme) */
        --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.2);    /* Form was 0.3 opacity */
        --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.3);   /* Form was 0.4 opacity */
        --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.4);  /* Form was 0.45 opacity */
    }

    body.page-hr-form {
        background-color: var(--light-800); /* Page background */
        color: var(--dark);
    }
    .form-container {
        background-color: var(--light); /* Form itself */
        box-shadow: var(--shadow-lg);
    }
    h1, legend { color: var(--dark-800); }
    .form-description, .fieldset-description, #progressText { color: var(--text-gray); }

    
    input[type="text"], input[type="email"], input[type="tel"],
    input[type="date"], input[type="number"], select, textarea {
        background-color: var(--light-600);
        border-color: var(--light-400);
        color: var(--dark);
    }
    
    input::placeholder, textarea::placeholder { color: var(--gray); }
    
    input:focus, select:focus, textarea:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-alpha); /* Uses updated alpha */
    }
    
    input.input-error, select.input-error, textarea.input-error,
    details.input-error > summary {
         border-color: var(--error-color) !important;
         background-color: var(--error-bg) !important;
         color: var(--error-color) !important;
    }
    input.input-error::placeholder, textarea.input-error::placeholder {
        color: var(--error-color); opacity: 0.7;
    }
    
    .field-error { color: var(--error-color); }
    
    select {
        /* SVG fill uses --dark-400 from dark mode variables which is #a0a0a0 */
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='%23a0a0a0'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    }
    input[type="date"] { color-scheme: dark; }
    
    input[type="file"] {
        background-color: var(--light-600);
        border-color: var(--light-400);
    }
    input[type="file"]::file-selector-button {
        background-color: var(--primary);
        color: #333; /* Dark text on yellow button for contrast */
        /* border-color: var(--primary); implicitly from no border */
    }
    input[type="file"]::file-selector-button:hover {
        background-color: var(--primary-dark); /* Will be same as --primary in dark mode */
    }
    
    details.multi-select-details { background-color: var(--light-600); border-color: var(--light-400); }
    details.multi-select-details summary { color: var(--dark); }
    details.multi-select-details summary::after { border-color: var(--dark-400); }
    details.multi-select-details .checkbox-group { background-color: var(--light); border-top-color: var(--light-400); }
    .checkbox-group label { color: var(--dark); }
    .checkbox-group label:hover { background-color: rgba(255, 242, 0, 0.08); } /* Keep specific subtle hover */
    .checkbox-group input[type="checkbox"] { accent-color: var(--primary-dark); }


    .education-entry, .experience-entry, .skill-entry, .activity-entry {
        background-color: var(--light-600); 
        border-color: var(--light-400);
    }
    .hidden-form-group {
        background-color: var(--light); 
        border-color: var(--light-400);
    }

    .terms-box {
        background-color: var(--light-600);
        color: var(--dark-600);
        border-color: var(--light-400);
    }
    .terms-box h4, .terms-box h5, .terms-box strong { color: var(--dark-800); }
    .terms-box a { color: var(--primary); }
    .terms-box a:hover { color: var(--primary-light); } /* Will be same as --primary */
    
    /* Buttons in Dark Mode */
    .btn-next, .btn-submit {
        background-color: var(--primary);
        color: #333; /* Dark text on yellow button */
        border-color: var(--primary);
    }
    .btn-next:hover, .btn-submit:hover {
        background-color: var(--primary-dark); /* Same as --primary due to dark mode var alignment */
        border-color: var(--primary-dark);
    }
    
    .btn-back {
        background-color: var(--light-400); /* A bit darker than inputs */
        color: var(--dark-800);
        border-color: var(--light-400);
    }
    .btn-back:hover {
        background-color: var(--light-600); /* Even darker */
        border-color: var(--dark-600);
    }
    .btn-secondary { /* "Add" buttons */
        background-color: var(--light-400);
        color: var(--dark-800);
        border-color: var(--light-400);
    }
    .btn-secondary:hover {
        background-color: var(--light-600);
        border-color: var(--dark-600);
    }
    
    .form-status p.success {
        background-color: var(--success-bg);
        color: var(--success-color);
        border-color: var(--success-color);
    }
    .form-status p.error {
        background-color: var(--error-bg);
        color: var(--error-color);
        border-color: var(--error-color);
    }
    
    .remove-degree-btn {
        color: var(--dark-600);
        border-color: var(--light-600); /* Or var(--light-400) for more subtlety */
    }

    .remove-degree-btn:hover,
    .remove-degree-btn:focus-visible {
        background-color: var(--error-bg);
        color: var(--error-color);
        border-color: var(--error-color);
    }
    .remove-degree-btn:active {
        background-color: var(--error-color);
        color: var(--dark); /* Text on error bg in dark mode */
    }


    /* Dark Mode Ion.RangeSlider */
    .ion-range-slider-container .irs--flat .irs-line {
        background-color: var(--light-400);
        border-color: var(--light-400); /* or var(--light-600) if too stark */
    }
    /* .irs-bar remains primary yellow via var(--primary) */
    .ion-range-slider-container .irs--flat .irs-handle {
        border: 3px solid var(--light-800); /* Page background for border */
        background-color: var(--primary);
    }
    .ion-range-slider-container .irs--flat .irs-handle.state_hover,
    .ion-range-slider-container .irs--flat .irs-handle:hover {
        background-color: var(--primary-dark); /* Same as --primary */
        border-color: var(--light-800);
    }
    .ion-range-slider-container .irs--flat .irs-min,
    .ion-range-slider-container .irs--flat .irs-max {
        color: var(--dark-600);
    }
    .ion-range-slider-container .irs--flat .irs-from,
    .ion-range-slider-container .irs--flat .irs-to,
    .ion-range-slider-container .irs--flat .irs-single {
        background-color: var(--light); /* Callout bg */
        color: var(--dark-800);         /* Callout text */
    }
    .ion-range-slider-container .irs--flat .irs-from:before,
    .ion-range-slider-container .irs--flat .irs-to:before,
    .ion-range-slider-container .irs--flat .irs-single:before {
        border-top-color: var(--light);
    }
    .ion-range-slider-container .irs--flat .irs-grid-text { color: var(--dark-400); }
    .ion-range-slider-container .irs--flat .irs-grid-pol { background-color: var(--light-400); }
    .ion-range-slider-container .irs--flat .irs-grid-pol.small { background-color: var(--light-600); }

    #formProgress { background-color: var(--light-400); }
    #formProgress::-webkit-progress-bar { background-color: var(--light-400); }
    /* Progress value remains primary */
}