/* ===== CUSTOM SELECTS ===== */
.custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 9rem;
}

.custom-select-trigger {
  width: 100%;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  box-shadow: 0 3px 10px -7px rgba(15, 23, 42, 0.4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.custom-select-trigger:hover {
  border-color: #a5b4fc;
  background: #fff;
}

.custom-select-trigger:focus,
.custom-select.is-open .custom-select-trigger {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.custom-select-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-chevron {
  flex-shrink: 0;
  color: #64748b;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.custom-select.is-open .custom-select-chevron {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: fixed;
  z-index: 10000;
  display: none;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 45px -16px rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(16px);
}

.custom-select-menu.is-open {
  display: block;
}

.custom-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-select-option:hover,
.custom-select-option.is-focused {
  background: #eef2ff;
  color: #4338ca;
}

.custom-select-option.is-selected {
  background: #4f46e5;
  color: #fff;
}

.custom-select-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.custom-select-option-check {
  opacity: 0;
  font-size: 0.75rem;
}

.custom-select-option.is-selected .custom-select-option-check {
  opacity: 1;
}

/* The same component also runs in standalone document previews. */
.custom-select,.custom-select *,.custom-select-menu,.custom-select-menu *{box-sizing:border-box}
.custom-select[hidden]{display:none!important}
.custom-select-trigger{font-family:inherit;cursor:pointer}
.custom-select-option{border:0;background:transparent;font-family:inherit;cursor:pointer;overflow-wrap:anywhere}
.custom-select-menu{max-width:calc(100vw - 16px)}
.custom-select-trigger:focus{border-color:var(--primary,#4f46e5)}
html.dark .custom-select-trigger,html.dark .custom-select-menu{background:#182234;border-color:#334155;color:#e2e8f0}
html.dark .custom-select-option{color:#e2e8f0}
html.dark .custom-select-option:hover,html.dark .custom-select-option.is-focused{background:#29364d;color:#fff}
html.dark .custom-select-option.is-selected{background:#4f46e5;color:#fff}
.pdf-toolbar .custom-select{width:160px;min-width:0}
.pdf-toolbar .custom-select-trigger{min-height:38px;font-size:12px;padding:8px 10px}
@media(prefers-reduced-motion:reduce){.custom-select-trigger,.custom-select-chevron,.custom-select-option{transition:none}}
