/*!
 * ZidanForm Select-only v2.4.2 — plugin-select-core.css
 * Structure for the select / combobox / tags control only.
 * Pairs with zidan-select.js and plugin-select-theme.css.
 *
 * Generated by scripts/build.mjs — edit the shared stylesheets instead.
 * https://github.com/akhtar1985/zidan-select
 * MIT License © akhtar1985
 */

/* ==================================================================
   1. Scope reset
   ================================================================== */

.zs-root,
.zs-field,
.zs-radio-group {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--zs-font-family, inherit);
  font-size: var(--zs-font-size, 0.9375rem);
  line-height: var(--zs-line-height, 1.4);
  -webkit-tap-highlight-color: transparent;
}

.zs-root *,
.zs-root *::before,
.zs-root *::after,
.zs-field *,
.zs-field *::before,
.zs-field *::after,
.zs-radio-group *,
.zs-radio-group *::before,
.zs-radio-group *::after {
  box-sizing: border-box;
}

/* ==================================================================
   2. Select / combobox / tags — shell
   ================================================================== */

.zs-root .zs-label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--zs-label-size, 0.8125rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.zs-control {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--zs-gap, 6px);
  width: 100%;
  min-height: var(--zs-height, 44px);
  padding: var(--zs-padding-y, 5px) var(--zs-padding-x, 12px);
  border-width: var(--zs-border-width, 1px);
  border-style: solid;
  border-radius: var(--zs-radius, 10px);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

/* bootstrap mounted inside the widget must not double-style our control */
.zs-root .zs-control.form-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--zs-gap, 6px);
  padding: var(--zs-padding-y, 5px) var(--zs-padding-x, 12px);
  height: auto;
  min-height: var(--zs-height, 44px);
}

.zs-root--focus .zs-control,
.zs-root--open .zs-control {
  outline: none;
}

.zs-root--disabled .zs-control,
.zs-root--disabled .zs-control:hover {
  cursor: not-allowed;
}

/* ==================================================================
   3. Values, chips, input, icons
   ================================================================== */

.zs-root .zs-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--zs-gap, 6px);
  max-width: 100%;
}

.zs-root .zs-chips[hidden] {
  display: none;
}

.zs-root .zs-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 4px 3px 9px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-width: 1px;
  border-style: solid;
  border-radius: var(--zs-chip-radius, 8px);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.zs-root .zs-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zs-root .zs-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 150ms ease, background-color 150ms ease;
}

.zs-root .zs-chip-remove:hover,
.zs-root .zs-chip-remove:focus-visible {
  opacity: 1;
  outline: none;
}

.zs-root .zs-input {
  flex: 1 1 60px;
  min-width: 60px;
  height: 32px;
  margin: 0;
  padding: 0;
  font: inherit;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.zs-root .zs-input:focus {
  outline: none;
  box-shadow: none;
}

.zs-root .zs-input[readonly],
.zs-root--disabled .zs-input {
  cursor: pointer;
}

.zs-root--disabled .zs-input {
  cursor: not-allowed;
}

.zs-root .zs-clear,
.zs-root .zs-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.zs-root .zs-clear {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 150ms ease, background-color 150ms ease;
}

.zs-root .zs-clear[hidden] {
  display: none;
}

.zs-root .zs-clear:hover {
  opacity: 1;
}

.zs-root .zs-clear:focus-visible {
  outline: none;
}

.zs-root .zs-arrow {
  pointer-events: none;
  transition: transform 150ms ease, color 150ms ease;
}

.zs-root--open .zs-arrow {
  transform: rotate(180deg);
}

.zs-root--tags .zs-control {
  padding-top: 6px;
  padding-bottom: 6px;
}

.zs-root--tags .zs-input {
  height: 28px;
}

/* ==================================================================
   4. Dropdown / listbox
   ================================================================== */

.zs-root .zs-dropdown {
  position: absolute;
  z-index: var(--zs-z-index, 1055);
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 280px;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-width: var(--zs-dropdown-border-width, 1px);
  border-style: solid;
  border-radius: var(--zs-dropdown-radius, 12px);
}

.zs-root--open .zs-dropdown {
  display: block;
  animation: zs-dropdown-in 140ms ease-out;
}

.zs-root--dropup .zs-dropdown {
  top: auto;
  bottom: calc(100% + 6px);
}

.zs-root--dropup.zs-root--open .zs-dropdown {
  animation-name: zs-dropdown-in-up;
}

@keyframes zs-dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zs-dropdown-in-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.zs-root .zs-group {
  padding: 8px 10px 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zs-root .zs-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--zs-option-padding-y, 9px) var(--zs-option-padding-x, 12px);
  border-radius: var(--zs-option-radius, 8px);
  cursor: pointer;
  transition: background-color 90ms linear, color 90ms linear;
  scroll-margin: 6px;
}

.zs-root .zs-option-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zs-root .zs-option--selected::after {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-inline-start: auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.85;
}

.zs-root .zs-option--disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.zs-root .zs-option--disabled::after {
  display: none;
}

.zs-root .zs-state {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  font-size: 0.875rem;
}

.zs-root .zs-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-style: solid;
  border-radius: 50%;
  animation: zs-spin 700ms linear infinite;
}

@keyframes zs-spin {
  to { transform: rotate(360deg); }
}

.zs-root .zs-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid transparent;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.zs-root .zs-more[disabled] {
  cursor: default;
}

@media (max-width: 480px) {
  .zs-root .zs-dropdown {
    max-height: min(280px, 45vh);
  }
}

/* screen-reader only live region */
.zs-root .zs-live,
.zs-field .zs-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==================================================================
   5. Select layout mechanics
   (skin and token presets live in plugin-theme.css)
   ================================================================== */

.zs-root[data-zs-layout="classic-clean"] .zs-control {
  padding-top: var(--zs-padding-y, 5px);
  padding-bottom: var(--zs-padding-y, 5px);
}

.zs-root[data-zs-layout="floating-label"] .zs-control {
  padding-top: 16px;
  padding-bottom: 6px;
  align-items: flex-end;
}

.zs-root[data-zs-layout="floating-label"] .zs-label {
  position: absolute;
  inset-inline-start: calc(var(--zs-padding-x, 12px) + 1px);
  top: 50%;
  margin: 0;
  padding: 0 4px;
  transform: translateY(-50%);
  font-size: var(--zs-font-size, 0.9375rem);
  font-weight: 500;
  border-radius: 4px;
  pointer-events: none;
  transition: transform 150ms ease, font-size 150ms ease, color 150ms ease, top 150ms ease;
}

.zs-root[data-zs-layout="floating-label"].zs-root--focus .zs-label,
.zs-root[data-zs-layout="floating-label"].zs-root--open .zs-label,
.zs-root[data-zs-layout="floating-label"].zs-root--has-value .zs-label {
  top: 10px;
  transform: translateY(-50%) scale(0.86);
  transform-origin: left center;
  font-weight: 600;
}

.zs-root[data-zs-layout="floating-label"] .zs-input {
  height: 28px;
}

.zs-root[data-zs-layout="floating-label"].zs-root--multiple .zs-control,
.zs-root[data-zs-layout="floating-label"].zs-root--tags .zs-control {
  padding-top: 20px;
}

.zs-root[data-zs-layout="soft-pill"] .zs-chip-remove {
  width: 20px;
  height: 20px;
}

.zs-root[data-zs-layout="soft-pill"] .zs-dropdown {
  padding: 8px;
}

.zs-root[data-zs-layout="soft-pill"].zs-root--multiple .zs-input,
.zs-root[data-zs-layout="soft-pill"].zs-root--tags .zs-input {
  min-width: 90px;
}

.zs-root[data-zs-layout="bordered-brutalist"] .zs-control {
  font-weight: 600;
}

.zs-root[data-zs-layout="bordered-brutalist"] .zs-chip {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.zs-root[data-zs-layout="bordered-brutalist"] .zs-dropdown {
  padding: 0;
}

.zs-root[data-zs-layout="bordered-brutalist"] .zs-option {
  border-bottom-width: 1px;
  border-bottom-style: solid;
  font-weight: 500;
}

.zs-root[data-zs-layout="bordered-brutalist"] .zs-option:last-child {
  border-bottom: 0;
}

.zs-root[data-zs-layout="bordered-brutalist"] .zs-group {
  border-bottom-width: 2px;
  border-bottom-style: solid;
  font-weight: 800;
}

.zs-root[data-zs-layout="glass-elevated"] .zs-control,
.zs-root[data-zs-layout="glass-elevated"] .zs-dropdown {
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
}

.zs-root[data-zs-layout="glass-elevated"] .zs-dropdown {
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

.zs-root--mount {
  margin: 0;
}

/* ==================================================================
   11. Form layout helper
   ================================================================== */

.zs-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--zs-grid-min, 230px), 1fr));
  gap: var(--zs-grid-gap, 16px);
  align-items: start;
}

.zs-form-grid > .zs-full {
  grid-column: 1 / -1;
}

/* ==================================================================
   12. Focus & motion
   ================================================================== */

.zs-check input:focus-visible + .zs-check-box,
.zs-check input:focus-visible + .zs-switch-track,
.zs-radio input:focus-visible + .zs-radio-dot {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.zs-input-native:focus-visible,
.zs-file-input:focus-visible {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .zs-root,
  .zs-root *,
  .zs-root *::before,
  .zs-root *::after,
  .zs-field,
  .zs-field *,
  .zs-field *::before,
  .zs-field *::after,
  .zs-radio-group,
  .zs-radio-group * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .zs-root .zs-spinner {
    animation-duration: 1.2s !important;
    animation-iteration-count: infinite !important;
  }
}
