/* Custom select — zëvendëson dropdown-in native kudo */
.csel {
  position: relative;
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

.csel__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;
  opacity: 0 !important;
  pointer-events: none !important;
}

.csel__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  min-height: 44px;
  border: 1px solid var(--border, #e8e4df);
  border-radius: var(--input-radius, 4px);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.csel__trigger:hover:not(:disabled) {
  border-color: #ccc;
  background: #fff;
}

.csel__trigger:focus-visible,
.csel.is-open .csel__trigger {
  outline: none;
  border-color: var(--primary, #0a0a0a);
}

.csel__trigger:disabled,
.csel.is-disabled .csel__trigger {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f0eeeb;
}

.csel__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.csel.is-placeholder .csel__value {
  color: var(--text-muted, #888);
  font-weight: 400;
}

.csel__chev {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.csel.is-open .csel__chev { transform: rotate(180deg); }

.csel__list {
  position: absolute;
  z-index: 300;
  left: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 100%;
  width: max-content;
  max-width: min(420px, calc(100vw - 24px));
  max-height: min(280px, 50vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--input-radius, 4px);
  box-shadow: 0 8px 24px rgba(10, 10, 10, 0.12);
}

.csel__list--fixed {
  position: fixed !important;
  min-width: 0;
  width: auto;
}

.csel.is-drop-up .csel__chev { transform: rotate(0deg); }

.csel__list[hidden] { display: none !important; }

.csel__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius, 4px);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  user-select: none;
}

.csel__check {
  width: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  opacity: 0;
}

.csel__opt.is-selected .csel__check { opacity: 1; }

.csel__label {
  flex: 1;
  min-width: max-content;
  white-space: nowrap;
}

.csel__opt.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Admin / light */
.csel--light .csel__trigger {
  background: #fff;
  border-color: var(--border, #e8e4df);
  color: var(--primary, #0a0a0a);
}

.csel--light .csel__list,
.csel__list--light {
  background: #fff;
  border: 1px solid var(--border, #e8e4df);
}

.csel--light .csel__opt,
.csel__list--light .csel__opt { color: var(--primary, #0a0a0a); }
.csel--light .csel__opt:hover,
.csel__list--light .csel__opt:hover { background: #f5f3f0; }
.csel--light .csel__opt.is-selected,
.csel__list--light .csel__opt.is-selected {
  background: var(--accent-soft, #f5efe6);
  color: var(--primary, #0a0a0a);
}
.csel--light .csel__check,
.csel__list--light .csel__check { color: var(--accent, #c9a96e); }

/* Public contact / dark */
.csel--dark .csel__trigger {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--input-radius, 4px);
}

.csel--dark .csel__trigger:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.csel--dark .csel__trigger:focus-visible {
  outline: none;
  border-color: var(--gold, #b8956a);
}

.csel--dark .csel__list,
.csel__list--dark {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: var(--input-radius, 4px);
}

.csel--dark .csel__opt,
.csel__list--dark .csel__opt {
  color: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  border-radius: var(--radius, 4px);
}

.csel--dark .csel__opt:hover,
.csel__list--dark .csel__opt:hover { background: rgba(255, 255, 255, 0.06); }

.csel--dark .csel__opt.is-selected,
.csel__list--dark .csel__opt.is-selected {
  background: rgba(255, 255, 255, 0.08);
}

.csel--dark .csel__check,
.csel__list--dark .csel__check { color: #fff; }

/* Studio pick — wrapper pa kufi; trigger mban stilin e inputit */
.csel.studio-pick {
  flex: 1;
  min-width: 180px;
}

.csel.studio-pick .csel__trigger {
  min-height: var(--control-h, 44px);
  font-size: 13px;
}
