/* =========================================================================
   COMBOBOX + INFO TOOLTIPS
   Matches the existing .form__input look (see styles.css).
   ========================================================================= */

.cb {
  position: relative;
}

.cb__input {
  /* inherits .form__input styles via class on the element */
}

/* Multi-select: chips sit above the input */
.cb--multi .cb__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.cb__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.4rem 0.3rem 0.7rem;
  background: var(--ink);
  color: var(--paper, #fff);
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1.2;
}

.cb__chip-x {
  border: 0;
  background: transparent;
  color: inherit;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.cb__chip-x:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

/* Dropdown */
.cb__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0.25rem 0 0;
  padding: 0.3rem;
  list-style: none;
  max-height: 16rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--paper-mute);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.cb__option {
  padding: 0.55rem 0.75rem;
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink);
  user-select: none;
}
.cb__option:hover,
.cb__option.is-active {
  background: var(--paper-soft);
}
.cb__option--other {
  border-top: 1px solid var(--paper-mute);
  margin-top: 0.25rem;
  padding-top: 0.65rem;
  color: var(--ink-soft);
}
.cb__option--other strong {
  color: var(--ink);
  font-weight: 600;
}

.cb__empty {
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* Invalid state for required combobox */
.cb--invalid .cb__input {
  border-color: var(--sunrise);
  background: #fff;
}

/* =========================================================================
   INFO TOOLTIPS (clickable ⓘ next to labels)
   ========================================================================= */

.form__label {
  position: relative; /* anchor for tooltip bubble */
}

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.35rem;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-body);
  line-height: 1;
  cursor: pointer;
  vertical-align: 0.05em;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.info-tip:hover,
.info-tip:focus-visible {
  color: var(--ink);
  outline: none;
}

.info-tip__bubble {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.4rem;
  z-index: 60;
  max-width: 22rem;
  padding: 0.7rem 0.9rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
.info-tip__bubble.is-open {
  display: block;
}
.info-tip__bubble::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 1rem;
  width: 10px;
  height: 10px;
  background: var(--ink);
  transform: rotate(45deg);
}

@media (max-width: 600px) {
  .info-tip__bubble {
    max-width: calc(100vw - 3rem);
  }
}
