/* Form controls shared by the two prelaunch pages. */
.custom-combobox-options,
.custom-combobox-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.custom-combobox-option[aria-selected="true"] {
  margin-block: 2px;
}

.custom-combobox-sheet-head,
.custom-combobox-sheet-actions {
  display: none;
}

.form-feedback {
  display: none !important;
}

.form-toast {
  position: fixed;
  z-index: 2000;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  width: min(420px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid #a7f3d0;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  box-shadow: 0 18px 46px rgba(6, 40, 26, .2);
}

.form-toast[hidden] { display: none; }
.form-toast.is-error { border-color: #fecaca; }
.form-toast-head { display: flex; align-items: flex-start; gap: 12px; }
.form-toast-copy { flex: 1; min-width: 0; }
.form-toast strong { display: block; font-size: 16px; line-height: 1.3; }
.form-toast p { margin-top: 5px; font-size: 14px; line-height: 1.45; }
.form-toast-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.form-toast button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #a7f3d0;
  border-radius: 9px;
  background: #f0fdf4;
  color: #065f46;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.form-toast button:hover { background: #dcfce7; }
.form-toast button:focus-visible { outline: 3px solid #10b981; outline-offset: 2px; }
.form-toast .form-toast-close {
  flex: none;
  width: 44px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: #374151;
  font-size: 23px;
}

@media (max-width: 719px) {
  html.combo-sheet-open,
  html.combo-sheet-open body { overflow: hidden; }

  .custom-combobox-popover.combo-viewport,
  .custom-combobox-single-popover.combo-viewport {
    position: fixed !important;
    z-index: 1500 !important;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding-top: env(safe-area-inset-top);
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .combo-viewport .custom-combobox-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 8px 16px;
    border-bottom: 1px solid #e5e7eb;
  }
  .combo-viewport .custom-combobox-sheet-title { font-size: 17px; font-weight: 700; }
  .combo-viewport .custom-combobox-sheet-close {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    cursor: pointer;
  }
  .combo-viewport .custom-combobox-sheet-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
  .combo-viewport .custom-combobox-search,
  .combo-viewport .custom-combobox-single-search { flex: none; min-height: 58px; }
  .combo-viewport .custom-combobox-options,
  .combo-viewport .custom-combobox-single-options {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .combo-viewport .custom-combobox-actions,
  .combo-viewport .custom-combobox-sheet-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: none;
    min-height: 64px;
    padding: 8px 16px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid #e5e7eb;
    background: #fff;
  }
  .combo-viewport .custom-combobox-sheet-done,
  .combo-viewport .custom-combobox-done {
    min-height: 44px;
    padding: 9px 16px;
    border: 0;
    border-radius: 9px;
    background: #065f46;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .combo-viewport .custom-combobox-option,
  .combo-viewport .custom-combobox-single-option { min-height: 48px; }
  .form-toast { top: max(10px, env(safe-area-inset-top)); right: 10px; width: calc(100vw - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  .custom-combobox-option,
  .custom-combobox-single-option { transition: none; }
}
