/* ==========================================================================
   CUSTOM SELECT — the designed dropdown list (contact form "Service of interest")
   Built by js/effects/custom-select.js. Colors come from theme.css.
   ========================================================================== */

/* the real <select> stays in the form but is hidden */
.cselect__native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.cselect { position: relative; }

/* ---- The closed box (looks like the other inputs) ---- */
.cselect__button {
  display: flex; align-items: center; gap: 8px;
  padding-inline-end: 44px; text-align: start; cursor: pointer;
  min-height: 60px;
}
.cselect__value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cselect.is-empty .cselect__value { color: var(--text-on-light-faint); }
.cselect__chosen-icon:empty { display: none; }
.cselect__chosen-icon svg { width: 18px; height: 18px; color: var(--orange); display: block; }
.field.is-open .field__chevron { transform: rotate(180deg); }
.field__chevron { transition: transform .4s var(--ease); }
.field.is-open .cselect__button { border-color: var(--blue); background: var(--card-hover-bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 12%, transparent); }

/* ---- The open list ---- */
.cselect__list {
  position: absolute; z-index: 30; top: calc(100% + 8px);
  inset-inline-end: 0; width: max(100%, 290px);          /* wider than the box if needed, so names fit on one line */
  margin: 0; padding: 6px; list-style: none;
  max-height: 340px; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 18px;
  background: var(--form-bg);
  border: 1px solid var(--line-on-light);
  box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--navy) 35%, transparent), 0 4px 12px -4px color-mix(in srgb, var(--navy) 12%, transparent);
  outline: none;
  /* closed state */
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top center;
  transition: opacity .25s var(--ease), transform .4s var(--ease), visibility 0s linear .4s;
}
.cselect.is-open .cselect__list {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .25s var(--ease), transform .45s var(--ease), visibility 0s;
}

/* ---- One option ---- */
.cselect__option {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 12px; cursor: pointer;
  font-size: .95rem; font-weight: 600; color: var(--text-on-light);
  transition: background-color .25s var(--ease);
  /* options slide in one after another when the list opens */
  opacity: 0; transform: translateY(6px);
}
.cselect.is-open .cselect__option {
  opacity: 1; transform: none;
  transition: background-color .25s var(--ease), opacity .35s var(--ease), transform .45s var(--ease);
  transition-delay: 0s, calc(var(--i) * 25ms), calc(var(--i) * 25ms);
}
.cselect__option.is-active { background: color-mix(in srgb, var(--blue-pale) 70%, transparent); }

.cselect__icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  background: var(--blue-pale); color: var(--blue);
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .4s var(--ease);
}
.cselect__icon svg { width: 18px; height: 18px; }
.cselect__option.is-active .cselect__icon { transform: scale(1.06); }
.cselect__label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the chosen option: orange icon + check mark */
.cselect__check { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--orange); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s var(--ease); }
.cselect__option[aria-selected="true"] .cselect__icon  { background: var(--orange); color: var(--navy); }
.cselect__option[aria-selected="true"] .cselect__check { opacity: 1; transform: none; }

/* thin scrollbar inside the list */
.cselect__list::-webkit-scrollbar { width: 6px; }
.cselect__list::-webkit-scrollbar-thumb { background: var(--line-on-light); border-radius: 6px; }
