/*
 * Felan - Admin Toolkit
 */

/* ==========================================================
   1. Disable the sticky header on account / dashboard pages
   ==========================================================
   The theme's JS adds .on to header.site-header.sticky-header on scroll,
   which makes it position:fixed. On dashboard pages that fixed header
   sits on top of the page's own action buttons ("Add New Job" etc).
   Here we simply neutralise the fixed positioning on those pages - the
   header still renders normally, it just scrolls away with the page. */
body.felan-toolkit-no-sticky header.site-header.sticky-header.on {
    position: static !important;
    top: auto !important;
    box-shadow: none !important;
}

body.felan-toolkit-no-sticky .felan-shf-spacer {
    display: none !important;
}

/* ==========================================================
   2. Selected skills get a distinct colour (Select2 multiple)
   ==========================================================
   The job submit form renders skills as a Select2 multi-select. By
   default the chosen items look almost identical to the surrounding
   chrome, which makes it hard to tell at a glance what is selected.
   Colour is configurable in Settings -> Felan Toolkit. */
.felan-toolkit-skills-field .select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-container--default .select2-selection--multiple .select2-selection__choice.felan-toolkit-skill-selected {
    background: var(--felan-toolkit-skill-color, #2563eb) !important;
    border-color: var(--felan-toolkit-skill-color, #2563eb) !important;
    color: #fff !important;
    font-weight: 500;
    border-radius: 4px;
    padding: 3px 8px 3px 6px;
}

.felan-toolkit-skills-field .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
.select2-container--default .select2-selection--multiple .select2-selection__choice.felan-toolkit-skill-selected .select2-selection__choice__remove {
    color: rgba(255, 255, 255, 0.85) !important;
    margin-right: 5px;
}

.felan-toolkit-skills-field .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,
.select2-container--default .select2-selection--multiple .select2-selection__choice.felan-toolkit-skill-selected .select2-selection__choice__remove:hover {
    color: #fff !important;
}

/* Already-selected options in the open dropdown, so you can see at a
   glance which ones you've already picked. */
.felan-toolkit-skills-dropdown .select2-results__option[aria-selected="true"] {
    background: color-mix(in srgb, var(--felan-toolkit-skill-color, #2563eb) 12%, transparent);
    color: var(--felan-toolkit-skill-color, #2563eb);
    font-weight: 500;
}
