/* Custom select — matches Squad Institute form inputs (apply, contact) */

.cs {
  position: relative;
  width: 100%;
}

.cs-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cs-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font-family: 'Hanken Grotesk', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink, #16151c);
  background: var(--bone, #f3f2ec);
  border: 1.5px solid var(--line-l, rgba(0, 0, 0, 0.12));
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cs-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-value.is-placeholder {
  color: var(--mute, #6b6a75);
}

.cs-trigger:hover {
  border-color: rgba(0, 0, 0, 0.22);
}

.cs-trigger:focus {
  outline: none;
  border-color: var(--violet, #1f6f5b);
  box-shadow: 0 0 0 3px rgba(31, 111, 91, 0.14);
}

.cs.is-open .cs-trigger {
  border-color: var(--violet, #1f6f5b);
  box-shadow: 0 0 0 3px rgba(31, 111, 91, 0.14);
}

.fgroup.invalid .cs-trigger {
  border-color: var(--coral, #ff6b57);
}

.cs-chevron {
  flex-shrink: 0;
  width: 12px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6A75' stroke-width='1.8' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.15s;
}

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

.cs-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 120;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1.5px solid var(--line-l, rgba(0, 0, 0, 0.12));
  border-radius: 10px;
  box-shadow:
    0 12px 40px -16px rgba(22, 21, 28, 0.28),
    0 4px 12px rgba(22, 21, 28, 0.08);
  max-height: min(280px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cs-option {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink, #16151c);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cs-option:hover,
.cs-option.is-focused {
  background: var(--bone-2, #eae9e1);
}

.cs-option.is-selected {
  background: rgba(31, 111, 91, 0.08);
  font-weight: 500;
}

.cs-option.is-selected::after {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.2l3 3 6-6.5' stroke='%231F6F5B' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.cs-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .cs-trigger,
  .cs-chevron {
    transition: none;
  }
}
