:root {
  --selectify-select-border-radius: 0.25rem;
  --selectify-select-padding: 0.75rem 0.875rem;

  /* Search input padding: block-start, inline-end, block-end, inline-start (start = icon) */
  --selectify-search-padding-block-start: 6px;
  --selectify-search-padding-inline-end: 10px;
  --selectify-search-padding-block-end: 6px;
  --selectify-search-padding-inline-start: 36px;

  /* Border radius (logical): start-start, start-end, end-end, end-start */
  --selectify-radius-start-start: 0.25rem;
  --selectify-radius-start-end: 0.25rem;
  --selectify-radius-end-end: 0.25rem;
  --selectify-radius-end-start: 0.25rem;
  --selectify-select-font-size: 1rem;
  --selectify-select-bg: #fff;
  --selectify-select-border-color: #d5dbe1;
  --selectify-select-color: #37474f;
  --selectify-select-hover-bg: #f6f8fa;
  --selectify-select-focus-border: #1976d2;
  --selectify-select-disabled-bg: #f1f3f5;
  --selectify-select-arrow-color: #607d8b;
  --selectify-dropdown-shadow: 0 10px 28px -12px rgb(16 24 40 / 18%);
  --selectify-option-hover-bg: #eef4fb;
  --selectify-option-active-bg: #dbe8f7;
}

body .selectify-select,
body .wrapper-selectify {
  border: none;
  background: transparent;
}

body .selectify-select,
body .selectify-select * {
  border-color: var(--selectify-select-border-color, var(--r-br));
  color: var(--selectify-select-color, var(--r-tx));
}

body .selectify-select .selectify-selected-one-option {
  background: transparent;
}

body .selectify-clear-all,
body .selectify-select .selectify-available-display,
body .selectify-select .selectify-selected-display{
  background: var(--selectify-select-bg, var(--r-bg));
}

body .selectify-select .selectify-selected-display,
body .selectify-select .selectify-available-display {
  cursor: pointer;
}

body .selectify-clear-all,
body .selectify-select .selectify-selected-display {
  border: 1px solid color-mix(in srgb, var(--selectify-select-border-color, var(--r-br, transparent)) 45%, var(--selectify-select-color, currentColor));
}

body .selectify-select .search-input input {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--selectify-select-border-color, var(--r-br, transparent)) 45%, var(--selectify-select-color, currentColor));
  border-radius: var(--selectify-select-border-radius, 0.25rem);
  box-shadow: none !important;
  background: var(--selectify-select-bg, var(--r-bg));
  color: var(--selectify-select-color, var(--r-tx));
  font-size: 0.875rem;
  line-height: 1.3;
  transition:
    border-color 120ms ease,
    box-shadow 160ms ease;
  padding-block: var(--selectify-search-padding-block-start, 6px) var(--selectify-search-padding-block-end, 6px);
  padding-inline: var(--selectify-search-padding-inline-start, 36px) var(--selectify-search-padding-inline-end, 10px);
}

body .dual-available,
body .dual-selected {
  border: 1px solid color-mix(in srgb, var(--selectify-select-border-color, var(--r-br, transparent)) 45%, var(--selectify-select-color, currentColor));
  background: var(--selectify-select-bg, var(--r-bg));
}

body .selectify-select .selectify-available-display {
  border: 1px solid var(--selectify-select-border-color, var(--r-br));
  box-shadow: var(--selectify-dropdown-shadow, unset);
}

body .selectify-select .search-input+.selectify-selected-one-option {
  border-block-start: 1px solid color-mix(in srgb, color-mix(in srgb, var(--selectify-select-border-color, var(--r-br, transparent)) 45%, var(--selectify-select-color, currentColor)) 40%, transparent);
}

/* Focus (Rail & Halo): ring outside the widget, inset ring inside the menu. */
body .selectify-select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor));
  outline-offset: 2px;
}

body .selectify-select:focus:not(:focus-visible) {
  outline: none;
}

body .selectify-select .search-input input:focus,
body .selectify-select .search-input input:focus-visible {
  border-color: color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor));
  outline: 2px solid color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor));
  outline-offset: 0;
  box-shadow: 0 0 0 5px color-mix(in srgb, color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor)) 22%, transparent) !important;
}

body .selectify-select .selectify-available-display *:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor));
  outline-offset: -2px;
}

body .selectify-select:disabled {
  border-color: var(--selectify-select-border-color, var(--r-br));
  background: var(--selectify-select-disabled-bg, var(--r-bg));
  cursor: not-allowed;
}

body .selectify-available-one-option {
  background: var(--selectify-select-bg, var(--r-bg));
  color: var(--selectify-select-color, var(--r-tx));
  border-block-end: 0;
}

body .selectify-selected-display:hover {
  border-color: color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor));
  background: var(--selectify-select-hover-bg, var(--r-bg));
}

body .selectify-clear-all:hover,
body .selectify-available-one-option:hover,
body .selectify-selected-one-option.dual-item:hover {
  border-color: color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor));
  background: var(--selectify-select-hover-bg, var(--r-bg));
}

body .selectify-available-one-option:active {
  background: var(--selectify-option-active-bg, var(--r-bg));
}

/* Option Items Styling */
body .dual-item {
  border-block-end: 0;
}

body .selectify-available-one-option.s-selected,
body .selectify-available-one-option.s-selected * {
  font-weight: 600;
}

.selectify-select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor));
  outline-offset: 2px;
}

.selectify-available-one-option:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor));
  outline-offset: -2px;
  background: var(--selectify-option-hover-bg);
}

.selectify-selected-display:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--selectify-select-focus-border-color, var(--selectify-select-focus-border, currentColor)) 65%, var(--selectify-select-color, currentColor));
  outline-offset: 2px;
}

body .dual-available,
body .dual-selected,
body .selectify-available-display,
body .selectify-selected-display {
  border-radius: var(--selectify-select-border-radius);
}

body .selectify svg {
  /* The first line is the fallback for browsers without color-mix(). */
  /* stylelint-disable-next-line declaration-block-no-duplicate-properties */
  fill: var(--selectify-select-arrow-color);
  fill: color-mix(in srgb, var(--selectify-select-arrow-color, currentColor) 70%, var(--selectify-select-color, currentColor));
}

/* ============================================
   Color Disabled — Strip Selectify colors only
   When body.selectify-color-disabled is present,
   reset color, background, border-color, text,
   and hover color variables. Layout properties
   (border-radius, padding, font-size, shadow)
   are never touched.
   ============================================ */

/* Reset select/dropdown color variables */
body.selectify-color-disabled {
  --selectify-select-bg: initial;
  --selectify-select-border-color: initial;
  --selectify-select-color: initial;
  --selectify-select-hover-bg: initial;
  --selectify-select-focus-border: initial;
  --selectify-select-focus-border-color: initial;
  --selectify-select-disabled-bg: initial;
  --selectify-select-arrow-color: initial;
  --selectify-option-hover-bg: initial;
  --selectify-option-active-bg: initial;
}

/* Reset checkbox/radio color variables */
body.selectify-color-disabled .selectify-radio,
body.selectify-color-disabled .selectify-checkbox,
body.selectify-color-disabled .selectify-radio *,
body.selectify-color-disabled .selectify-checkbox * {
  --selectify-checkbox-border-color: initial;
  --selectify-checkbox-bg: initial;
  --selectify-checkbox-check-circle: initial;
  --selectify-checkbox-checked-border-color: initial;
  --selectify-checkbox-checked-bg: initial;
  --selectify-checkbox-checked-circle: initial;
  --selectify-checkbox-disabled-border-color: initial;
  --selectify-checkbox-disabled-bg: initial;
  --selectify-checkbox-disabled-circle: initial;
  --selectify-checkbox-hover-border-color: initial;
  --selectify-checkbox-hover-bg: initial;
  --selectify-checkbox-active-border-color: initial;
  --selectify-checkbox-active-bg: initial;
  --selectify-checkbox-indeterminate-border-color: initial;
  --selectify-checkbox-indeterminate-bg: initial;
  --selectify-checkbox-indeterminate-bar: initial;
  --selectify-checkbox-invalid-border-color: initial;
  --selectify-checkbox-invalid-bg: initial;
}

/* Reset select widget color variables */
body.selectify-color-disabled .selectify-select,
body.selectify-color-disabled .selectify-select * {
  --selectify-select-bg: initial;
  --selectify-select-border-color: initial;
  --selectify-select-color: initial;
  --selectify-select-hover-bg: initial;
  --selectify-select-focus-border: initial;
  --selectify-select-focus-border-color: initial;
  --selectify-select-disabled-bg: initial;
  --selectify-select-arrow-color: initial;
  --selectify-option-hover-bg: initial;
  --selectify-option-active-bg: initial;
}
