/**
 * WorkSurely — unified form controls (admin + website)
 * Load after Bootstrap and legacy admin styles.
 */
/* Input tokens: variables.css (.ws-theme) */
/* Loaded last in layouts so it wins over legacy admin/custome CSS */

/* —— Base text inputs —— */
.ws-theme input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not(.select2-search__field):not(.ws-job-search-input),
.ws-theme textarea,
.ws-theme select:not([multiple]):not(.ws-job-search-select),
.ws-theme .form-control,
.ws-theme .form-select {
    box-sizing: border-box;
    font-family: var(--ws-font);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ws-input-text) !important;
    background-color: var(--ws-input-bg) !important;
    border: 1.5px solid var(--ws-input-border) !important;
    border-radius: var(--ws-input-radius) !important;
    box-shadow: var(--ws-input-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ws-theme textarea.form-control,
.ws-theme textarea {
    min-height: 110px;
    height: auto;
    padding: 12px 14px !important;
    line-height: 1.5;
    resize: vertical;
}

.ws-theme input.form-control,
.ws-theme input[type="text"]:not(.ws-job-search-input),
.ws-theme input[type="email"]:not(.ws-job-search-input),
.ws-theme input[type="password"]:not(.ws-job-search-input),
.ws-theme input[type="tel"]:not(.ws-job-search-input),
.ws-theme input[type="url"]:not(.ws-job-search-input),
.ws-theme input[type="number"]:not(.ws-job-search-input),
.ws-theme input[type="date"]:not(.ws-job-search-input),
.ws-theme input[type="datetime-local"]:not(.ws-job-search-input),
.ws-theme input[type="search"]:not(.select2-search__field):not(.ws-job-search-input),
.ws-theme select.form-control,
.ws-theme select.form-select,
.ws-theme .form-control:not(textarea):not([type="file"]),
.ws-theme .form-select {
    height: var(--ws-input-height);
    min-height: var(--ws-input-height);
    max-height: var(--ws-input-height);
    padding: 0 14px !important;
}

.ws-theme input.form-control::placeholder,
.ws-theme textarea.form-control::placeholder,
.ws-theme .form-control::placeholder {
    color: var(--ws-input-placeholder) !important;
    opacity: 1;
    font-weight: 400;
}

.ws-theme input:hover:not(:disabled):not(:focus):not(.select2-search__field),
.ws-theme textarea:hover:not(:disabled):not(:focus),
.ws-theme select:hover:not(:disabled):not(:focus),
.ws-theme .form-control:hover:not(:disabled):not(:focus),
.ws-theme .form-select:hover:not(:disabled):not(:focus) {
    border-color: var(--ws-input-border-hover) !important;
}

/* Unified blue focus (same as Select2 dropdown) — see end of file for full list */

.ws-theme input:disabled,
.ws-theme textarea:disabled,
.ws-theme select:disabled,
.ws-theme .form-control:disabled,
.ws-theme .form-select:disabled {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    cursor: not-allowed;
    opacity: 0.85;
}

/* —— Labels —— */
.ws-theme label,
.ws-theme .form-label {
    font-family: var(--ws-font);
    font-size: var(--ws-label-size);
    font-weight: 600;
    color: var(--ws-label-color);
    margin-bottom: 6px;
    display: inline-block;
    letter-spacing: 0.01em;
}

.ws-theme .form-group {
    margin-bottom: 1.15rem;
    position: relative;
}

.ws-theme .form-group > label,
.ws-theme .mb-3 > label,
.ws-theme .mb-30 > label {
    margin-bottom: 6px;
}

.ws-theme .form-text,
.ws-theme small.text-muted,
.ws-theme .font-xs.color-text-mutted {
    color: #64748b !important;
    font-size: 0.78rem;
}

/* —— Validation —— */
.ws-theme .form-control.is-invalid,
.ws-theme .form-select.is-invalid,
.ws-theme input.is-invalid,
.ws-theme select.is-invalid,
.ws-theme textarea.is-invalid,
.ws-theme .is-invalid {
    border-color: var(--ws-danger) !important;
    background-image: none;
}

.ws-theme .form-control.is-invalid:focus,
.ws-theme .is-invalid:focus {
    border-color: var(--ws-danger) !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18) !important;
}

.ws-theme .form-control.is-valid:focus {
    border-color: var(--ws-success) !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18) !important;
}

.ws-theme .invalid-feedback {
    font-size: 0.78rem;
    color: var(--ws-danger);
}

.ws-theme form .text-danger,
.ws-theme .field-error {
    font-size: 0.78rem;
}

/* —— Checkboxes & radios (global) —— */
.ws-theme .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding-left: 0;
    margin-bottom: 0.5rem;
    min-height: auto;
}

.ws-theme .form-check-inline {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    margin-bottom: 0.35rem;
}

.ws-theme .form-check-input {
    float: none;
    margin-left: 0 !important;
    margin-top: 0.12em;
    flex-shrink: 0;
}

.ws-theme .form-check-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    line-height: 1.45;
}

/* Native / Bootstrap inputs — custom appearance */
.ws-theme .form-check-input,
.ws-theme input[type="checkbox"].select-box,
.ws-theme input[type="checkbox"]:not(.cb-container input),
.ws-theme input[type="radio"]:not(.cb-container input) {
    -webkit-appearance: none;
    appearance: none;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.375rem;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.75rem 0.75rem;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ws-theme input[type="radio"]:not(.cb-container input),
.ws-theme .form-check-input[type="radio"] {
    border-radius: 50%;
    background-size: auto;
}

.ws-theme input[type="checkbox"]:not(.cb-container input):checked,
.ws-theme input[type="checkbox"].select-box:checked,
.ws-theme .form-check-input[type="checkbox"]:checked {
    background-color: var(--ws-accent);
    border-color: var(--ws-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2 6.4 11 12.5 5' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ws-theme input[type="radio"]:not(.cb-container input):checked,
.ws-theme .form-check-input[type="radio"]:checked {
    background-color: #fff;
    border-color: var(--ws-accent);
    background-image: none;
    box-shadow: inset 0 0 0 0.28rem var(--ws-accent);
}

.ws-theme .form-check-input:focus,
.ws-theme .form-check-input:focus-visible,
.ws-theme input[type="checkbox"]:not(.cb-container input):focus,
.ws-theme input[type="checkbox"]:not(.cb-container input):focus-visible,
.ws-theme input[type="radio"]:not(.cb-container input):focus,
.ws-theme input[type="radio"]:not(.cb-container input):focus-visible,
.ws-theme input[type="checkbox"].select-box:focus,
.ws-theme input[type="checkbox"].select-box:focus-visible {
    outline: none;
    border-color: var(--ws-focus-border);
    box-shadow: var(--ws-focus-ring);
}

.ws-theme .form-check-input.is-invalid,
.ws-theme input[type="checkbox"].is-invalid:not(.cb-container input),
.ws-theme input[type="radio"].is-invalid:not(.cb-container input) {
    border-color: var(--ws-danger) !important;
}

.ws-theme label:has(> input[type="checkbox"]),
.ws-theme label:has(> input[type="radio"]) {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    line-height: 1.45;
}

/* cb-container + .checkmark (job filters, admin filters) */
.ws-theme .cb-container {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    position: relative;
    padding-left: 0;
    margin-bottom: 0.5rem;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    font-weight: 500;
    color: #475569;
}

.ws-theme .cb-container input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ws-theme .cb-container .checkmark {
    order: -1;
    flex-shrink: 0;
    position: relative;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.375rem;
    background-color: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ws-theme .cb-container .text-small {
    font-size: 0.88rem;
    color: #475569;
}

.ws-theme .cb-container input[type="radio"] ~ .checkmark {
    border-radius: 50%;
}

.ws-theme .cb-container input[type="checkbox"]:checked ~ .checkmark {
    background-color: var(--ws-accent);
    border-color: var(--ws-accent);
}

.ws-theme .cb-container input[type="checkbox"]:checked ~ .checkmark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.3125rem;
    height: 0.5625rem;
    margin-top: -1px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -58%) rotate(45deg);
}

.ws-theme .cb-container input[type="radio"]:checked ~ .checkmark {
    border-color: var(--ws-accent);
    background-color: #fff;
}

.ws-theme .cb-container input[type="radio"]:checked ~ .checkmark::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.5rem;
    height: 0.5rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background-color: var(--ws-accent);
}

.ws-theme .cb-container:hover .checkmark {
    border-color: #a5b4fc;
}

.ws-theme .cb-container input:focus-visible ~ .checkmark {
    border-color: var(--ws-focus-border);
    box-shadow: var(--ws-focus-ring);
}

.ws-theme .cb-container input:disabled ~ .checkmark,
.ws-theme .cb-container input:disabled ~ .text-small {
    opacity: 0.55;
    cursor: not-allowed;
}

.ws-theme .filter-block label.cb-container:hover .text-small {
    color: var(--ws-accent-dark);
}

.ws-theme .joblist-filter-card .list-checkbox li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ws-theme .joblist-filter-card .cb-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
    max-width: calc(100% - 2.5rem);
}

.ws-theme .joblist-filter-card .cb-container .checkmark {
    order: -1;
}

.ws-theme .joblist-filter-card .cb-container .text-small {
    flex: 0 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-theme .joblist-filter-card .filter-block > label.cb-container {
    display: inline-flex;
    margin-right: 0.75rem;
}

/* —— Password field (single box + icon inside, matches email input) —— */
.ws-theme .ws-password-wrap {
    position: relative;
    width: 100%;
    display: block;
}

.ws-theme .ws-password-wrap .form-control {
    width: 100% !important;
    padding-right: 2.75rem !important;
    border-radius: var(--ws-input-radius) !important;
    border: 1.5px solid var(--ws-input-border) !important;
}

.ws-theme .ws-password-wrap .ws-password-toggle,
.ws-theme .ws-password-wrap .password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    z-index: 2;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #64748b !important;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ws-theme .ws-password-wrap .ws-password-toggle:hover,
.ws-theme .ws-password-wrap .password-toggle:hover {
    transform: translateY(-50%) !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
    box-shadow: none !important;
}

.ws-theme .ws-password-wrap .ws-password-toggle:focus,
.ws-theme .ws-password-wrap .ws-password-toggle:focus-visible,
.ws-theme .ws-password-wrap .password-toggle:focus,
.ws-theme .ws-password-wrap .password-toggle:focus-visible {
    outline: none;
    transform: translateY(-50%) !important;
    background: #eef2ff !important;
    color: var(--ws-focus-border, #4f46e5) !important;
    box-shadow: none !important;
}

.ws-theme .ws-password-wrap:focus-within .form-control {
    border-color: var(--ws-focus-border) !important;
    box-shadow: var(--ws-focus-ring) !important;
}

.ws-theme .ws-password-wrap .form-control:focus,
.ws-theme .ws-password-wrap .form-control:focus-visible {
    outline: none !important;
    border-color: var(--ws-focus-border) !important;
    box-shadow: var(--ws-focus-ring) !important;
}

/* Legacy split input-group password (admin / old markup) */
.ws-theme .input-group.password-group > .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important;
}

.ws-theme .input-group.password-group .password-toggle {
    border: 1.5px solid var(--ws-input-border) !important;
    border-left: 0 !important;
    border-radius: 0 var(--ws-input-radius) var(--ws-input-radius) 0 !important;
    background: var(--ws-input-bg) !important;
    min-width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ws-theme .input-group-text {
    background: #f8fafc;
    border: 1.5px solid var(--ws-input-border);
    color: #64748b;
    font-size: 0.88rem;
    border-radius: var(--ws-input-radius);
}

/* —— File inputs —— */
.ws-theme input[type="file"].form-control,
.ws-theme input[type="file"].fileupload {
    height: auto !important;
    min-height: var(--ws-input-height) !important;
    max-height: none !important;
    padding: 8px 12px !important;
    font-size: 0.85rem;
    cursor: pointer;
}

.ws-theme input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    font-family: var(--ws-font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.ws-theme input[type="file"]::file-selector-button:hover {
    filter: brightness(1.06);
}

/* —— Auth pages —— */
.ws-theme .auth-right form {
    gap: 10px;
}

.ws-theme .auth-right > form > label,
.ws-theme .auth-right form > label:not(:has(input[type="checkbox"])) {
    display: block;
    margin-top: 4px;
    margin-bottom: 2px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.ws-theme .auth-right input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    height: var(--ws-input-height);
    min-height: var(--ws-input-height);
    padding: 0 14px !important;
    display: block;
}

.ws-theme .auth-right .ws-password-wrap .form-control {
    width: 100% !important;
    padding-right: 2.75rem !important;
}

.ws-theme .auth-right label:has(input[type="checkbox"]),
.ws-theme .auth-right label:has(input[type="radio"]) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0;
}

.ws-theme .field-error {
    color: var(--ws-danger);
    font-size: 0.76rem;
    min-height: 16px;
}

/* —— Search bars (hero / job list): single container, no nested input boxes —— */
.ws-theme .hero-search-bar,
.ws-theme .joblist-search-bar {
    border: 1px solid #dde3f2 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.05) !important;
    background: #fff !important;
    padding: 6px !important;
    gap: 0 !important;
    align-items: stretch !important;
}

.ws-theme .joblist-search-bar .search-field,
.ws-theme .hero-search-bar .search-field {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.ws-theme .joblist-search-bar .search-field + .search-field,
.ws-theme .hero-search-bar .search-field + .search-field {
    border-left: 1px solid #e8ecf4 !important;
}

.ws-theme .joblist-search-bar .search-field:focus-within,
.ws-theme .hero-search-bar .search-field:focus-within {
    background: #f5f7ff !important;
    box-shadow: none !important;
    outline: none !important;
    z-index: 1;
}

.ws-theme .joblist-search-bar .search-field i,
.ws-theme .hero-search-bar .search-field i {
    flex-shrink: 0;
    font-size: 1.05rem;
    color: #94a3b8;
}

.ws-theme .joblist-search-bar .search-field input,
.ws-theme .joblist-search-bar .search-field select,
.ws-theme .hero-search-bar .search-field input,
.ws-theme .hero-search-bar .search-field select {
    flex: 1;
    width: 100% !important;
    min-width: 0;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--ws-input-text) !important;
}

.ws-theme .joblist-search-bar .search-field input:focus,
.ws-theme .joblist-search-bar .search-field input:focus-visible,
.ws-theme .joblist-search-bar .search-field select:focus,
.ws-theme .hero-search-bar .search-field input:focus,
.ws-theme .hero-search-bar .search-field input:focus-visible,
.ws-theme .hero-search-bar .search-field select:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}

/* Select2 in job list industry field */
.ws-theme .joblist-search-bar .select2-container,
.ws-theme .hero-search-bar .select2-container {
    width: 100% !important;
    flex: 1;
    min-width: 0;
}

.ws-theme .joblist-search-bar .select2-container .select2-selection--single,
.ws-theme .hero-search-bar .select2-container .select2-selection--single {
    height: 42px !important;
    min-height: 42px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
}

.ws-theme .joblist-search-bar .select2-container--default .select2-selection--single .select2-selection__rendered,
.ws-theme .hero-search-bar .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0 !important;
    line-height: 42px !important;
    color: #334155 !important;
    font-size: 0.9rem;
    font-weight: 500;
}

.ws-theme .joblist-search-bar .select2-container--default .select2-selection--single .select2-selection__arrow,
.ws-theme .hero-search-bar .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    right: 0 !important;
}

.ws-theme .joblist-search-bar .select2-container--default.select2-container--focus .select2-selection--single,
.ws-theme .joblist-search-bar .select2-container--default.select2-container--open .select2-selection--single,
.ws-theme .hero-search-bar .select2-container--default.select2-container--focus .select2-selection--single,
.ws-theme .hero-search-bar .select2-container--default.select2-container--open .select2-selection--single {
    border: none !important;
    box-shadow: none !important;
}

.ws-theme .joblist-search-bar > .btn,
.ws-theme .joblist-search-bar > a.btn,
.ws-theme .hero-search-bar > .btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    margin-left: 6px;
    align-self: center;
}

@media (max-width: 992px) {
    .ws-theme .joblist-search-bar,
    .ws-theme .hero-search-bar {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .ws-theme .joblist-search-bar .search-field + .search-field,
    .ws-theme .hero-search-bar .search-field + .search-field {
        border-left: none !important;
        border-top: 1px solid #e8ecf4 !important;
    }

    .ws-theme .joblist-search-bar > .btn,
    .ws-theme .joblist-search-bar > a.btn,
    .ws-theme .hero-search-bar > .btn {
        width: 100%;
        margin: 6px 0 0;
    }
}

/* —— Select2 (overrides custome.css 48px rules) —— */
.ws-theme .select2-container {
    width: 100% !important;
}

/* Select2 inline search — invisible field, default Select2 behaviour (no inner textbox) */
.ws-theme .select2-container .select2-search--inline,
.ws-theme .select2-container--default .select2-selection--multiple .select2-search--inline {
    float: left;
    margin: 0;
    padding: 0;
}

.ws-theme .select2-container .select2-search__field,
.ws-theme .select2-container input.select2-search__field,
.ws-theme .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field,
.admin-panel-body.ws-theme .select2-container--default .select2-selection--multiple input[type="search"] {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 5px 0 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    outline: 0 !important;
    -webkit-appearance: textfield;
    appearance: textfield;
    line-height: normal !important;
    font-size: 100% !important;
    font-weight: normal !important;
    color: inherit !important;
}

.ws-theme .select2-container--default .select2-selection--single,
.ws-theme .select2-container--default .select2-selection--multiple {
    border: 1.5px solid var(--ws-input-border) !important;
    border-radius: var(--ws-input-radius) !important;
    background: var(--ws-input-bg) !important;
    box-shadow: var(--ws-input-shadow) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ws-theme .select2-container--default .select2-selection--single {
    height: var(--ws-input-height) !important;
    min-height: var(--ws-input-height) !important;
    display: flex;
    align-items: center;
    padding: 0 !important;
}

.ws-theme .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.4 !important;
    padding: 10px 36px 10px 14px !important;
    color: var(--ws-input-text) !important;
    font-size: 0.92rem;
    font-weight: 500;
}

.ws-theme .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 10px !important;
}

.ws-theme .select2-container--default .select2-selection--multiple {
    min-height: var(--ws-input-height) !important;
    height: auto !important;
    padding: 2px 6px !important;
    cursor: text;
}

.ws-theme .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    min-height: 0 !important;
    height: auto !important;
    padding: 0 5px !important;
    margin: 0;
    display: block;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.ws-theme .select2-container .select2-search--inline .select2-search__field:focus,
.ws-theme .select2-container .select2-search--inline .select2-search__field:focus-visible,
.admin-panel-body.ws-theme .select2-container .select2-search__field:focus {
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    background: transparent !important;
}

.ws-theme .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #eef2ff !important;
    border: 1px solid #c7d2fe !important;
    color: var(--ws-accent-dark) !important;
    border-radius: 6px !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 2px 6px !important;
    margin-right: 5px !important;
    margin-top: 5px !important;
    float: left;
}

.ws-theme .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #6366f1 !important;
    margin-right: 4px;
}

.ws-theme .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--ws-danger) !important;
}

.ws-theme .select2-container--default.select2-container--focus .select2-selection--single,
.ws-theme .select2-container--default.select2-container--focus .select2-selection--multiple,
.ws-theme .select2-container--default.select2-container--open .select2-selection--single,
.ws-theme .select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--ws-focus-border) !important;
    box-shadow: var(--ws-focus-ring) !important;
}

.ws-theme .select2-dropdown {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: var(--ws-input-radius) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12) !important;
    overflow: hidden;
    font-family: var(--ws-font);
}

.ws-theme .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--ws-accent) !important;
}

.ws-theme .select2-search--dropdown .select2-search__field {
    height: 38px !important;
    min-height: 38px !important;
    border: 1.5px solid var(--ws-input-border) !important;
    border-radius: 8px !important;
    padding: 0 10px !important;
    font-size: 0.9rem;
}

.ws-theme .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--ws-focus-border) !important;
    box-shadow: var(--ws-focus-ring) !important;
    outline: none !important;
}

/* —— jQuery UI —— */
.ws-theme .ui-autocomplete {
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--ws-input-radius) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12) !important;
    font-family: var(--ws-font);
    font-size: 0.88rem;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
}

.ws-theme .ui-menu-item-wrapper.ui-state-active {
    background: var(--ws-accent) !important;
    border-color: var(--ws-accent) !important;
}

/* —— Modals —— */
.ws-theme .modal-content {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
    overflow: hidden;
}

.ws-theme .modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem 1.25rem;
}

.ws-theme .modal-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
}

.ws-theme .modal-body {
    padding: 1.25rem;
}

.ws-theme .modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 0.85rem 1.25rem;
    gap: 8px;
}

/* —— Buttons in forms —— */
.ws-theme .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600;
    padding: 10px 18px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ws-theme .btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.ws-theme .btn-secondary,
.ws-theme .btn-outline-secondary {
    border-radius: 10px !important;
    font-weight: 600;
    border: 1.5px solid #e2e8f0 !important;
}

.ws-theme .btn-default,
.ws-theme .btn-brand {
    border-radius: 10px !important;
    font-weight: 600;
    min-height: 42px;
    padding: 8px 18px;
}

.ws-theme .btn-outline-primary {
    border-radius: 10px !important;
    border-width: 1.5px !important;
    font-weight: 600;
    color: var(--ws-accent) !important;
    border-color: #c7d2fe !important;
}

.ws-theme .btn-outline-primary:hover {
    background: #eef2ff !important;
    color: var(--ws-accent-dark) !important;
}

/* —— Admin inner panels —— */
.ws-theme .panel-white,
.ws-theme .section-box .box-padding,
.ws-theme .box-content form {
    font-family: var(--ws-font);
}

.ws-theme .panel-white {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.ws-theme .box-content .form-group i,
.ws-theme .form-group i.position-absolute {
    color: #94a3b8;
}

/* —— Range sliders (job filters) —— */
.ws-theme input[type="range"] {
    accent-color: var(--ws-accent);
    height: 6px;
    cursor: pointer;
}

/* —— Alerts in forms —— */
.ws-theme .alert {
    border-radius: 10px;
    border: none;
    font-size: 0.88rem;
}

.ws-theme .alert-success {
    background: #ecfdf5;
    color: #047857;
}

.ws-theme .alert-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.ws-theme .alert-info {
    background: #eff6ff;
    color: #1d4ed8;
}

/* —— Misc sizing & accessibility —— */
.ws-theme .form-control-sm {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    font-size: 0.85rem !important;
    padding: 0 10px !important;
}

.ws-theme .form-control-lg {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    font-size: 1rem !important;
}

.ws-theme .input-group > .form-control {
    height: var(--ws-input-height);
    min-height: var(--ws-input-height);
}

.ws-theme .input-group > .input-group-text {
    height: var(--ws-input-height);
    min-height: var(--ws-input-height);
    display: flex;
    align-items: center;
}

.ws-theme .input-group:focus-within {
    box-shadow: var(--ws-focus-ring);
    border-radius: var(--ws-input-radius);
}

.ws-theme .input-group:focus-within > .form-control,
.ws-theme .input-group:focus-within > .input-group-text,
.ws-theme .input-group:focus-within > .btn {
    border-color: var(--ws-focus-border) !important;
    z-index: 1;
}

.ws-theme .input-group .form-control:focus {
    box-shadow: none !important;
}

/* jQuery UI autocomplete input in profile */
.ws-theme .ui-autocomplete-input.form-control,
.ws-theme input.ui-autocomplete-input {
    height: var(--ws-input-height);
}

@media (max-width: 576px) {
    .ws-theme .form-control,
    .ws-theme .form-select,
    .ws-theme input.form-control,
    .ws-theme select.form-control {
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .ws-theme .select2-container .select2-search__field {
        font-size: 16px;
    }
}

/* Select2 multiselect: no visible inner textbox (max specificity, end of file) */
.ws-theme .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field,
.admin-panel-body.ws-theme .select2-container--default .select2-selection--multiple input.select2-search__field,
.ws-theme .select2-container--default .select2-selection--multiple input.select2-search__field {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 5px 0 0 0 !important;
    vertical-align: top;
}

/* When max items selected, Select2 disables search — hide leftover box */
.ws-theme .select2-container--default .select2-selection--multiple .select2-search__field:disabled {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.ws-theme .select2-container--default .select2-selection--multiple .select2-search--inline:has(.select2-search__field:disabled) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* ========== Unified focus: blue border + ring (all inputs, same as Select2) ========== */
.ws-theme input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not(.select2-search__field):not(.ws-job-search-input):focus,
.ws-theme input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not(.select2-search__field):not(.ws-job-search-input):focus-visible,
.ws-theme textarea:focus,
.ws-theme textarea:focus-visible,
.ws-theme select:not(.ws-job-search-select):focus,
.ws-theme select:not(.ws-job-search-select):focus-visible,
.ws-theme .form-control:focus:not(.is-invalid),
.ws-theme .form-control:focus-visible:not(.is-invalid),
.ws-theme .form-select:focus:not(.is-invalid),
.ws-theme .form-select:focus-visible:not(.is-invalid),
.admin-panel-body.ws-theme input:focus:not(.select2-search__field),
.admin-panel-body.ws-theme textarea:focus,
.admin-panel-body.ws-theme select:focus,
.admin-panel-body.ws-theme .form-control:focus:not(.is-invalid),
.admin-panel-body.ws-theme .form-select:focus:not(.is-invalid),
.admin-panel-body.ws-theme input[type="text"]:focus,
.admin-panel-body.ws-theme input[type="email"]:focus,
.admin-panel-body.ws-theme input[type="password"]:focus,
.admin-panel-body.ws-theme input[type="tel"]:focus,
.admin-panel-body.ws-theme input[type="number"]:focus,
.admin-panel-body.ws-theme input[type="date"]:focus,
.admin-panel-body.ws-theme input[type="search"]:focus:not(.select2-search__field),
.admin-panel-body.ws-theme input[type="url"]:focus,
.ws-theme .auth-right input:not([type="checkbox"]):not([type="radio"]):not(.ws-password-wrap .form-control):focus,
.ws-theme .auth-right .ws-password-wrap:focus-within .form-control,
.ws-theme .ui-autocomplete-input:focus,
.ws-theme .dataTables_wrapper .dataTables_filter input:focus {
    outline: none !important;
    border-color: var(--ws-focus-border) !important;
    box-shadow: var(--ws-focus-ring) !important;
    background-color: #fff !important;
}

/* Search bar inputs: never apply global input border/focus (prevents double box) */
.ws-theme .joblist-search-bar input:not([type="checkbox"]):not([type="radio"]):focus,
.ws-theme .joblist-search-bar input:not([type="checkbox"]):not([type="radio"]):focus-visible,
.ws-theme .joblist-search-bar select:focus,
.ws-theme .hero-search-bar input:not([type="checkbox"]):not([type="radio"]):focus,
.ws-theme .hero-search-bar input:not([type="checkbox"]):not([type="radio"]):focus-visible,
.ws-theme .hero-search-bar select:focus {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* ========== Job search bar (find-jobs + homepage) — one border per field ========== */
.ws-theme .ws-job-search {
    width: 100%;
}

.ws-theme .ws-job-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.ws-theme .ws-job-search-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

.ws-theme .ws-job-search-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--ws-input-height, 44px);
    padding: 0 14px;
    background: #fff;
    border: 1.5px solid var(--ws-input-border, #d1d5db);
    border-radius: var(--ws-input-radius, 10px);
    box-shadow: var(--ws-input-shadow, none);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ws-theme .ws-job-search-control i {
    flex-shrink: 0;
    font-size: 1.05rem;
    color: #94a3b8;
    pointer-events: none;
}

.ws-theme .ws-job-search-input {
    flex: 1;
    width: 100% !important;
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    font-family: var(--ws-font);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ws-input-text, #0f172a) !important;
}

.ws-theme .ws-job-search-input::placeholder {
    color: var(--ws-input-placeholder, #94a3b8);
    font-weight: 400;
}

.ws-theme .ws-job-search-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0 center !important;
    background-size: 12px !important;
    padding-right: 20px !important;
    cursor: pointer;
}

.ws-theme .ws-job-search-control:focus-within {
    border-color: var(--ws-focus-border, #4f46e5) !important;
    box-shadow: var(--ws-focus-ring, 0 0 0 3px rgba(79, 70, 229, 0.22)) !important;
}

.ws-theme .ws-job-search-input:focus,
.ws-theme .ws-job-search-input:focus-visible {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.ws-theme .ws-job-search-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-bottom: 1px;
}

.ws-theme .ws-job-search-btn {
    min-height: var(--ws-input-height, 44px);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    white-space: nowrap;
}

.ws-theme .ws-job-search-btn-icon {
    min-width: var(--ws-input-height, 44px);
    min-height: var(--ws-input-height, 44px);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ws-theme .joblist-hero .ws-job-search {
    margin-top: 4px;
}

@media (max-width: 991.98px) {
    .ws-theme .ws-job-search-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ws-theme .ws-job-search-actions {
        width: 100%;
        padding-bottom: 0;
    }

    .ws-theme .ws-job-search-btn {
        flex: 1;
    }
}

/* Invalid fields: red focus ring */
.ws-theme .form-control.is-invalid:focus,
.ws-theme .form-control.is-invalid:focus-visible,
.ws-theme input.is-invalid:focus,
.ws-theme select.is-invalid:focus,
.ws-theme textarea.is-invalid:focus {
    border-color: var(--ws-danger) !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2) !important;
}

/* —— Find jobs sidebar filters (form-check layout) —— */
.ws-theme .joblist-filter-card .ws-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ws-theme .joblist-filter-card .ws-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    min-height: 1.75rem;
}

.ws-theme .joblist-filter-card .ws-filter-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    min-height: 0;
}

.ws-theme .joblist-filter-card .form-check {
    padding-left: 0;
}

.ws-theme .joblist-filter-card .ws-filter-check .form-check-input {
    flex-shrink: 0;
    margin: 0;
    float: none;
    width: 1.125rem;
    height: 1.125rem;
}

.ws-theme .joblist-filter-card .ws-filter-check .form-check-label {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.35;
    cursor: pointer;
}

.ws-theme .joblist-filter-card .ws-filter-row__count {
    flex-shrink: 0;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    color: #6366f1;
    background: #eef2ff;
    border-radius: 8px;
    min-width: 1.5rem;
    text-align: center;
}

.ws-theme .joblist-filter-card .ws-filter-inline-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.ws-theme .joblist-filter-card .ws-filter-inline-radios .ws-filter-check {
    flex: 0 0 auto;
}

.ws-theme .joblist-filter-card .experience-fields {
    padding-top: 0.25rem;
}

.ws-theme .joblist-filter-card .experience-fields center {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: #64748b;
}
