/* Extracted from assets/modal.css — SHARED COMPONENTS (buttons/inputs/chips/cards/utilities) — Step 10B */
/* Utility: hide anything with .is-hidden */
.is-hidden {
  display: none !important;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #18202d;
  color: var(--ink);
  font-size: 12px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

/* Fix for grid blowout on mobile with wide inputs */
.form-grid>* {
  min-width: 0;
}

.form-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.form-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2b2f38;
  background: #0f1219;
  color: var(--ink);
  box-sizing: border-box !important;
  max-width: 100%;
  min-width: 0;
  /* Fix height consistency across input types (text vs date) */
  height: 45px !important;
  max-height: 45px !important;
  line-height: normal;
}

/* iOS/Safari: Force date inputs to match text input sizing */
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 8px 12px !important;
  height: 45px !important;
  max-height: 45px !important;
  line-height: 1.2 !important;
}

textarea {
  min-height: 100px;
  resize: vertical;
  height: auto !important;
  max-height: none !important;
}

button.primary {
  background: var(--accent);
  color: #001018;
  border: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 780px) {
  /* MOVED to assets/css/modal-core.css (Step 7) */

  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Ensure grid children can shrink below content size (fixes date picker overflow) */
  .form-grid>* {
    min-width: 0;
  }

  label,
  input,
  select,
  textarea {
    font-size: 1rem;
  }

  button.primary {
    width: 100%;
    padding: 12px;
  }

  label,
  input,
  select,
  textarea {
    font-size: 1rem;
  }

  button.primary {
    width: 100%;
    padding: 12px;
  }

}

.policies-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.policies-box h4 {
  margin-top: 0;
  margin-bottom: 8px;
  font-family: "MD Tall", "Aileron", sans-serif;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 1rem;
}

.policies-box ul {
  margin: 0 0 10px 18px;
  padding: 0;
  list-style-type: disc;
}

.policies-box li {
  margin-bottom: 4px;
}

.agree-policy {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}

.agree-policy input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  /* keep it from shrinking on tiny phones */
  flex: 0 0 16px;
  /* fixes flex-basis so it never takes a full line */
  display: inline-block;
  /* belt-and-suspenders against blocky inputs */
  margin: 0;
  /* kill any UA default margin */
  padding: 0;
  /* ensure no extra space is counted */
  box-sizing: content-box;
  /* don’t inherit text-field sizing */
  appearance: auto;
  /* avoid odd iOS scaling */
  -webkit-appearance: checkbox;
  accent-color: #9be0ff;
}

/* keep the checkbox + text on ONE line and shrink-wrap to content */
.agree-policy {
  display: inline-flex;
  /* was: flex — shrink-wraps the label to its contents */
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  flex-wrap: nowrap;
  /* never wrap to a 2nd row */
  white-space: nowrap;
  /* force one-line */
}

/* let the sentence elide instead of wrapping when space is tiny */
.agree-policy>span {
  min-width: 0;
  /* allow flexbox to actually shrink the text */
  overflow: hidden;
  text-overflow: ellipsis;
  /* “I agree to the policies…” stays one line */
}

/* === Chips selector === */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Aileron", system-ui, sans-serif;
  font-size: .95rem;
  transition: background .15s, border-color .15s, transform .02s;
}

.chip:hover {
  background: rgba(255, 255, 255, .08);
}

.chip.is-selected {
  background: #9be0ff;
  border-color: #9be0ff;
  color: #eafff2;
}

/* Wizard helpers (re-use chip styles from Option A) */
.wiz-step {
  border: 1px dashed rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: 12px;
}

.wiz-step+.wiz-step {
  margin-top: 10px;
}

.wiz-step.is-hidden {
  display: none;
}

.wiz-caption {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .9rem;
}

.wiz-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .25);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.wiz-day-block {
  margin-bottom: 10px;
}

.wiz-day-title {
  font-weight: 600;
  margin-bottom: 6px;
}

/* Primary action buttons: “Next (times)”, “Done”, “Send Request” */
button.primary {
  background: var(--btn-bg);
  color: #f8f8f8;
  border: 1px solid var(--btn-bg);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
}

button.primary:hover {
  filter: brightness(1.05);
}

button.primary:active {
  background: var(--accent-blue-800);
  border-color: var(--accent-blue-800);
}

/* Keep chip selected color consistent with buttons */
.chip.is-selected {
  background: var(--btn-bg);
  color: #b3e6fd;
  border-color: var(--btn-bg);
}

/* ===== Recap (day | times) ===== */
.wiz-recap {
  margin-top: .75rem;
}

.wiz-recap-title {
  margin: 0 0 .5rem 0;
}

.wiz-recap .recap-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  row-gap: .5rem;
}

.wiz-recap .recap-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  /* day | times */
  column-gap: .75rem;
  align-items: center;
}

.wiz-recap .recap-day {
  font-weight: 600;
  color: var(--muted-foreground, #cbd5e1);
}

/* Optional: make the “link” style look like a text link */
button.link {
  background: transparent;
  border: 0;
  color: #b3e6fd;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

button.link:hover {
  filter: brightness(1.05);
}

/* === Event workshop: sound / space suggestion option === */
.sound-option {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.sound-option-text {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.2;
}

/* Override global input styles ONLY for this checkbox */
.sound-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  display: inline-block;
  box-sizing: content-box;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--accent);
  margin-right: 1ch;
  /* ≈ 1 “letter h” widths */
}

/* === Collaborative Invitation Setting Date === */
.setting-date {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.setting-date-text {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.2;
}

/* Override global input styles ONLY for this checkbox */
.setting-date input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  display: inline-block;
  box-sizing: content-box;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--accent);
  margin-right: 1ch;
  /* ≈ 1 “letter h” widths */
}

/* Global: consistent spacing between consecutive form grids */
form .form-grid+.form-grid {
  margin-top: 10px;
  /* match your grid gap; tweak once here if needed */
}

.form-status {
  margin: 0;
}

.form-grid .span-2 {
  grid-column: span 2;
}

/* Grid placement helpers (for 3-col form grids) */
.form-grid .col-1 {
  grid-column: 1;
}

.form-grid .col-2 {
  grid-column: 2;
}

.form-grid .col-3 {
  grid-column: 3;
}

/* Invisible placeholder to intentionally “occupy” an empty cell */
.form-grid .grid-spacer {
  height: 0;
}

@media (max-width: 768px) {

  /* Normalize vertical spacing inside form grids */
  .form-grid>div {
    margin-bottom: 16px;
  }

  /* Avoid double spacing at the very end */
  .form-grid>div:last-child {
    margin-bottom: 0;
  }

}

/* Placeholder text should be visually quieter than typed text */
input::placeholder,
textarea::placeholder {
  color: #aab2c1;
  opacity: 0.4;
  /* keeps it subtle across browsers */
}

/* Added from assets/modal.css — components leftovers (10B cleanup) */
/* Availability matrix */
.avail-matrix {
  --am-gap: 10px;
  --am-radius: 10px;
  --am-border: rgba(255, 255, 255, .08);
  --am-cell-bg: rgba(255, 255, 255, .02);
  --am-cell-bg-hover: rgba(255, 255, 255, .06);
  --am-accent: #9be0ff;
  display: grid;
  grid-template-columns: 140px repeat(3, 1fr);
  gap: var(--am-gap);
  padding: 12px;
  border: 1px solid var(--am-border);
  border-radius: var(--am-radius);
  background: rgba(0, 0, 0, .15);
}

.avail-matrix .am-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--am-cell-bg);
  border: 1px solid var(--am-border);
  border-radius: 8px;
  min-height: 44px;
}

.avail-matrix .am-head {
  background: transparent;
  border: none;
  justify-content: flex-start;
  padding-left: 6px;
}

.avail-matrix .am-rowhead {
  justify-content: flex-start;
  padding-left: 10px;
}

.avail-matrix .am-corner {
  justify-content: flex-start;
}

.avail-matrix .am-check {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: "Aileron", system-ui, sans-serif;
  font-size: .95rem;
}

.avail-matrix input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--am-accent);
  cursor: pointer;
}

.avail-matrix .am-cell:hover {
  background: var(--am-cell-bg-hover);
}

.linklike {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
}

.chips-helpers {
  font-size: .9rem;
  color: var(--muted);
}

.chips-helpers .sep {
  margin: 0 8px;
  opacity: .6;
}

#chipWindows {
  display: none;
}

/* shown after at least one day */
#chipWindows.is-visible {
  display: flex;
}

/* reuse your chip look, just a bit smaller for recap */
.chip-mini {
  font-size: .85rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--chip-border, #444);
  background: var(--chip-bg, transparent);
  color: var(--chip-fg, #e5e7eb);
  display: inline-block;
  margin: 0 .25rem .25rem 0;
}

/* ===== iOS ≤16 Autofill Notice ===== */
.ios-autofill-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(155, 224, 255, 0.08);
  border: 1px solid rgba(155, 224, 255, 0.25);
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink, #e9ecf1);
}

.ios-notice-text {
  flex: 1;
}

.ios-notice-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted, #a9b0bd);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.ios-notice-close:hover {
  opacity: 1;
}
