/* Shared Describe It / Tailor It pattern. Ink & Brass; flat modal with stacked edges. */
.ai-followup-modal .modal-dialog { max-width: 600px; }
.ai-followup-modal [hidden] { display: none !important; }
/* Announce step changes without a native control outline around the heading. */
#aiFollowupTitle:focus,
#aiFollowupQuestionTitle:focus,
#aiTweakQuestion:focus { outline: none; }
.ai-followup-stack { position: relative; padding-bottom: 18px; }
.ai-followup-peek { position: absolute; inset: 12px 10px 8px; border: 2px solid var(--cf-border); background: var(--cf-page); border-radius: 8px; pointer-events: none; }
.ai-followup-peek.ai-followup-farthest { inset: 24px 20px 0; }
.ai-followup-card { position: relative; padding: 1.25rem; min-height: 320px; border: 2px solid var(--cf-border); background: var(--cf-surface); border-radius: 8px; }
.ai-followup-dots { display: flex; gap: 5px; }
.ai-followup-dots span { width: 24px; height: 4px; background: var(--cf-border); border-radius: 3px; }
.ai-followup-dots span.is-complete { background: var(--cf-ink); }
.ai-followup-choice { display: flex; gap: .75rem; align-items: center; padding: .75rem; border: 1px solid var(--cf-control-border); border-radius: 5px; background: var(--cf-surface); }
.ai-followup-choice input { flex: 0 0 auto; margin: 0; }
.ai-followup-choice:has(input:checked) { background: var(--cf-brass-soft); outline: 2px solid var(--cf-ink); outline-offset: -2px; }
.ai-settings-summary {
  margin: 0;
  border: 1px solid var(--cf-border);
  border-radius: 6px;
  background: var(--cf-page);
  color: var(--cf-ink);
}
.ai-settings-summary > div {
  display: grid;
  grid-template-columns: minmax(8rem, 30%) minmax(0, 1fr);
  gap: .5rem;
  padding: .5rem .625rem;
}
.ai-settings-summary > div + div { border-top: 1px solid var(--cf-border); }
.ai-settings-summary dd { margin: 0; overflow-wrap: anywhere; }
.ai-followup-modal .dropdown-menu { max-height: 280px; overflow-y: auto; max-width: 100%; }
.ai-followup-modal .dropdown-item { white-space: normal; }
.ai-followup-modal textarea { min-height: 120px; }
.ai-followup-modal .modal-footer .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; }
.ai-date-flow .shift-calendar-grid { gap: 4px; }
.ai-date-flow .shift-calendar-day { display: grid; place-items: center; height: auto; aspect-ratio: 1; padding: 0; line-height: 1; font-size: .75rem; font-weight: 700; border-radius: 6px; }
.ai-date-flow .shift-calendar-day.is-selected { background: var(--bs-dark); color: var(--bs-white); box-shadow: none; }
.ai-date-flow .shift-calendar-day.is-selected:focus-visible { outline-offset: 2px; }
.ai-date-flow, .ai-date-flow-content { min-width: 0; }
.ai-date-flow .shift-calendar { padding: .5rem; }
@media (prefers-reduced-motion: no-preference) {
  .ai-followup-card.is-entering { animation: ai-followup-enter .18s ease-out; }
  @keyframes ai-followup-enter { from { transform: translateY(10px); } to { transform: translateY(0); } }
}
@media (max-width: 575.98px) {
  .ai-followup-modal .modal-dialog { margin: .5rem; }
  .ai-followup-card { padding: 1rem; }
  .ai-settings-summary > div { grid-template-columns: minmax(0, 1fr); gap: .125rem; }
  .ai-followup-modal .modal-footer { align-items: flex-start; }
  .ai-followup-modal .modal-footer > div { flex: 1; }
}

.ai-followup-item { padding: .75rem; border: 1px solid var(--cf-control-border); border-radius: 5px; background: var(--cf-surface); }
.ai-followup-item.is-selected { background: var(--cf-brass-soft); outline: 2px solid var(--cf-ink); outline-offset: -2px; }
.ai-followup-add { color: var(--cf-ink); font: inherit; }
.ai-followup-add:hover { border-color: var(--cf-ink); }
.ai-followup-add:focus-visible { outline: 2px solid var(--cf-ink); outline-offset: 2px; }
.ai-followup-add:disabled { opacity: .5; cursor: not-allowed; }
.ai-followup-add-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 1em; width: 1em; height: 1em; line-height: 1; }
@media (max-width: 575.98px) {
  .ai-followup-add-icon { flex-basis: 1.35em; width: 1.35em; height: 1.35em; }
}
.ai-item-limit { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ai-item-stepper { display: inline-flex; align-items: stretch; flex: 0 0 9rem; width: 9rem; height: 32px; min-height: 32px; max-height: 32px; box-sizing: border-box; border: 2px solid var(--cf-ink); border-radius: 6px; background: var(--cf-surface); }
.ai-item-stepper:focus-within { outline: 2px solid var(--cf-ink); outline-offset: 2px; }
.ai-followup-item input[type="checkbox"] { flex: 0 0 auto; }
.ai-followup-item input[type="text"] { min-width: 0; }

.ai-item-stepper > .btn { display: flex; align-items: center; justify-content: center; flex: 0 0 2.25rem; height: 28px; min-height: 28px; max-height: 28px; padding: 0; border: 0; border-radius: 4px; }
.ai-item-stepper > .form-control { flex: 1 1 0; width: 0; min-width: 0; height: 28px; min-height: 28px; max-height: 28px; box-sizing: border-box; line-height: 28px; padding: 0 .25rem; border: 0; border-radius: 0; font-weight: 700; text-align: center; }
/* Readable, complete before/after values without widening the mobile stack. */
.ai-tweak-change-value { white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-tweak-change-description { white-space: normal; }
.ai-tweak-change-description > :last-child { margin-bottom: 0; }
