/*
 * ui.css — vocero base components.
 *
 * Hand-written, token-only: every value here is a var() from tokens.css, so
 * each component renders correctly under warm light and warm dark from its
 * first commit. No raw colors, no font stacks, no magic pixels for color.
 * The design-guardian is the discipline a utility framework would impose.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-canvas);

  /* Subtle warm-paper texture (signature treatment, ADR 0005). */
  background-image: radial-gradient(
    color-mix(in srgb, var(--color-primary) 5%, transparent) 0.5px,
    transparent 1.5px
  );
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
}

/* One visible focus style for every interactive element (AA, keyboard). */
:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-offset);
}

/* --- Icons (rendered only by IconHelper#icon) --- */
.ic {
  display: inline-block;
  flex: none;
  fill: currentcolor;
  vertical-align: -0.15em;
}

/* --- Typography roles --- */
.u-display {
  font-size: var(--text-3xl);
  font-weight: var(--weight-heavy);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.u-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
}

.u-body {
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
}

.u-caption {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}

/* Marigold highlight behind a brand headline (Mercado punch). */
.brand-mark {
  position: relative;
  color: var(--color-primary-text);
  white-space: nowrap;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset-inline: -0.06em;
  bottom: 0.05em;
  z-index: -1;
  height: 0.34em;
  background: var(--color-highlight);
  border-radius: var(--radius-xs);
  opacity: 0.45;
  transform: skewX(-6deg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--color-text);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition:
    background-color var(--transition-fast) var(--ease-out),
    border-color var(--transition-fast) var(--ease-out),
    transform var(--transition-fast) var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn--primary {
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--soft {
  color: var(--color-on-primary-soft);
  background: var(--color-primary-soft);
  border-color: color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.btn--soft:hover {
  background: color-mix(in srgb, var(--color-primary-soft) 82%, var(--color-primary));
}

.btn--ghost {
  color: var(--color-primary-text);
  background: var(--color-surface);
  border-color: var(--color-border-strong);
}

.btn--ghost:hover {
  background: var(--color-surface-sunken);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* Icon-only button (menu, back, feedback thumbs). */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--color-text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  transition:
    background-color var(--transition-fast) var(--ease-out),
    color var(--transition-fast) var(--ease-out);
}

.icon-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-sunken);
}

.icon-btn--up:hover {
  color: var(--color-success-text);
}

.icon-btn--down:hover {
  color: var(--color-danger-text);
}

/* Round send button, salsa gradient. */
.send-btn {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--color-on-primary);
  cursor: pointer;
  background: linear-gradient(140deg, var(--color-primary), var(--color-primary-hover));
  border: none;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast) var(--ease-out);
}

.send-btn:active {
  transform: scale(0.94);
}

/* --- Chips (Boxicon glyph + warm label; ADR 0004) --- */
.chip {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-on-primary-soft);
  white-space: nowrap;
  cursor: pointer;
  background: var(--color-primary-soft);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-radius: var(--radius-pill);
  transition:
    background-color var(--transition-fast) var(--ease-out),
    transform var(--transition-fast) var(--ease-out);
}

.chip .ic {
  color: var(--color-primary-text);
}

.chip:hover {
  background: color-mix(in srgb, var(--color-primary-soft) 84%, var(--color-primary));
}

.chip:active {
  transform: translateY(1px);
}

.chip--lead {
  color: var(--color-on-primary);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.chip--lead .ic {
  color: var(--color-on-primary);
}

.chip--lead:hover {
  background: var(--color-primary-hover);
}

/* Horizontal, scrollable chip row. */
.chip-row {
  display: flex;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip-row > .chip {
  flex: none;
}

/* Wrapping chip menu for the /config hub: grouped options that drill in, so they
   wrap into a menu rather than scroll off-screen (issue 32). */
.config-menu {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-block: var(--space-1);
}

/* Destructive chips (borrar / borrar mis datos). */
.chip--danger {
  color: var(--color-danger-text);
  background: var(--color-danger-soft);
  border-color: color-mix(in srgb, var(--color-danger) 24%, transparent);
}

.chip--danger .ic {
  color: var(--color-danger-text);
}

.chip--danger:hover {
  background: color-mix(in srgb, var(--color-danger-soft) 82%, var(--color-danger));
}

/* --- Card --- */
.card {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.card__body {
  padding: var(--space-5);
}

.card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}

.card__text {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
}

/* Card content that preserves the line breaks of generated Content. */
.card__content {
  padding: var(--space-4) var(--space-5);
  white-space: pre-line;
}

.card__foot {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--color-surface) 88%, var(--color-primary));
  border-top: 1px solid var(--color-border);
}

/* --- Chat bubbles (signature treatment) --- */
.thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.bubble {
  max-width: 86%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  border-radius: var(--radius-bubble);
  box-shadow: var(--shadow-sm);
}

.bubble--bot {
  align-self: flex-start;
  color: var(--color-text);
  background: var(--color-bubble-bot);
  border: 1px solid var(--color-border);
  border-top-left-radius: var(--radius-bubble-tail);
}

.bubble--bot strong {
  font-weight: var(--weight-bold);
  color: var(--color-primary-text);
}

.bubble--user {
  align-self: flex-end;
  color: var(--color-on-bubble-user);
  background: var(--color-bubble-user);
  border-top-right-radius: var(--radius-bubble-tail);
}

/* Day divider / typing indicator meta. */
.day-divider {
  align-self: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
  background: var(--color-surface-sunken);
  border-radius: var(--radius-pill);
}

/* --- Per-platform tab bar --- */
.tabbar {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-2) 0;
  background: var(--color-surface-sunken);
}

.tab {
  display: inline-flex;
  flex: 1;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: var(--space-2);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: color var(--transition-fast) var(--ease-out);
}

.tab:hover {
  color: var(--color-text);
}

.tab--active {
  color: var(--color-primary-text);
  background: var(--color-surface);
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

/* Carousel position dots (Opción 1 de 3). */
.dots {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
}

.dot {
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-border-strong);
  border-radius: var(--radius-pill);
}

.dot--on {
  width: var(--space-4);
  background: var(--color-primary);
}

/* --- Feedback thumbs group --- */
.feedback {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
}

/* --- Composer (chat input) --- */
.composer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.composer__row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
  background: var(--color-bubble-bot);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  transition:
    border-color var(--transition-fast) var(--ease-out),
    box-shadow var(--transition-fast) var(--ease-out);
}

.composer__row:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 var(--focus-width) color-mix(in srgb, var(--color-focus) 32%, transparent);
}

.field {
  flex: 1;
  min-height: 40px;
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--color-text);
  background: transparent;
  border: none;
}

.field:focus {
  outline: none;
}

.field::placeholder {
  color: var(--color-text-muted);
}

/* --- Standalone form field --- */
.field-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.input {
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  transition:
    border-color var(--transition-fast) var(--ease-out),
    box-shadow var(--transition-fast) var(--ease-out);
}

.input::placeholder {
  color: var(--color-text-muted);
}

.input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 var(--focus-width) color-mix(in srgb, var(--color-focus) 32%, transparent);
}

.input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.field-error {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-danger-text);
}

/* --- Status + badge --- */
.status {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-success-text);
}

.status-dot {
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-success);
  border-radius: var(--radius-pill);
}

.badge {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-2xs);
  font-weight: var(--weight-heavy);
  color: var(--color-on-highlight);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  background: var(--color-highlight);
  border-radius: var(--radius-sm);
}

/* --- Avatar --- */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: var(--text-xl);
  background: linear-gradient(140deg, var(--color-primary), var(--color-primary-hover));
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

/* --- App scene (a Project's chat lives here; full chat shell is a later issue) --- */
.scene {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
  max-width: 32rem;
  min-height: 100dvh;
  padding: var(--space-6) var(--space-4);
  margin-inline: auto;
}

.scene__header {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.scene__id {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.scene__name {
  overflow: hidden;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene__note {
  text-align: center;
}

/* --- Chat list (the WhatsApp-style Project switcher for portfolio owners) --- */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  list-style: none;
}

.chat-list__item {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: inherit;
  color: var(--color-text);
  text-align: start;
  cursor: pointer;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--transition-fast) var(--ease-out),
    border-color var(--transition-fast) var(--ease-out),
    transform var(--transition-fast) var(--ease-out);
}

.chat-list__item:hover {
  background: var(--color-surface-sunken);
}

.chat-list__item:active {
  transform: translateY(1px);
}

.chat-list__item--active {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

.chat-list__avatar {
  flex: none;
}

.chat-list__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.chat-list__name {
  overflow: hidden;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list__preview {
  overflow: hidden;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list__here {
  flex: none;
  color: var(--color-primary-text);
}

/* --- Empty state (teach the next step; never a blank box) --- */
.empty {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-10) var(--space-5);
  margin: auto 0;
  text-align: center;
}

.empty__emoji {
  font-size: var(--text-3xl);
}

.empty__title {
  color: var(--color-primary-text);
}

.empty__text {
  max-width: 26rem;
  color: var(--color-text-muted);
}

/* --- Notice (flash: sign-in errors, confirmations) --- */
.notice {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

.notice--success {
  color: var(--color-success-text);
  background: var(--color-success-soft);
  border-color: color-mix(in srgb, var(--color-success) 30%, transparent);
}

.notice--error {
  color: var(--color-danger-text);
  background: var(--color-danger-soft);
  border-color: color-mix(in srgb, var(--color-danger) 30%, transparent);
}

.notice--info {
  color: var(--color-primary-text);
  background: var(--color-primary-soft);
  border-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
}

/* --- Auth (pre-auth login / verify — the one form surface, ADR 0011) --- */
.auth {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: var(--space-6);
}

.auth__panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  max-width: 26rem;
}

.auth__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  text-align: center;
}

.auth__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.auth__wordmark {
  color: var(--color-primary-text);
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth__note {
  text-align: center;
}

.auth__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  color: var(--color-success-text);
  background: var(--color-success-soft);
  border-radius: var(--radius-pill);
}

/* --- Chat shell (the whole app is a chat, scoped to one Project) --- */
.chat {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 32rem;
  height: 100dvh;
  margin-inline: auto;
  background: var(--color-canvas);
}

.chat__header {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

/* Sin conexión / failed-send banner: the network is a hard dependency (ADR 0003),
   so a dropped connection or a turn that could not complete surfaces here, calm and
   plain, rather than pretending to work. Hidden until the connection controller
   shows it. */
.connbanner {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-danger-text);
  text-align: center;
  background: var(--color-danger-soft);
  border-bottom: 1px solid color-mix(in srgb, var(--color-danger) 24%, transparent);
}

.connbanner .ic {
  flex: none;
}

/* display:flex above outranks the bare `hidden` attribute, so the connection
   controller's `hidden = true` can't hide it — restore it, as .opt-in[hidden] does. */
.connbanner[hidden] {
  display: none;
}

.chat__id {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.chat__name {
  overflow: hidden;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat__transcript {
  flex: 1;
  padding: var(--space-4);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* One turn: a bubble and, when the bot delivers, the Carousel below it. */
.turn {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Paced delivery: steps are revealed one at a time (see the pace controller);
   with no JS the `pace--running` flag never lands, so every step stays visible. */
.pace {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pace--running .pace__step:not(.pace__step--in) {
  display: none;
}

/* --- Typing indicator ("escribiendo…") --- */
.typing {
  display: none;
  gap: var(--space-1);
  align-items: center;
  align-self: flex-start;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bubble-bot);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-bubble);
  border-top-left-radius: var(--radius-bubble-tail);
  box-shadow: var(--shadow-sm);
}

.typing--on {
  display: inline-flex;
}

.typing__dot {
  width: var(--space-2);
  height: var(--space-2);
  background: var(--color-text-muted);
  border-radius: var(--radius-pill);
  animation: typing-bounce 1.2s var(--ease-out) infinite;
}

.typing__dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing__dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-bounce {
  0%,
  60%,
  100% {
    opacity: 0.5;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* --- Action Card (presents one piece of Content, ADR 0004 chrome) --- */
.actioncard__head {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.actioncard__voice {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.actioncard__save {
  flex: none;
  color: var(--color-text-muted);
}

.actioncard__save--on {
  color: var(--color-primary-text);
}

.actioncard__actions {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--color-surface) 88%, var(--color-primary));
  border-top: 1px solid var(--color-border);
}

/* Same override as .connbanner: display:flex outranks the bare `hidden` attribute,
   so the card controller's `hidden = true` can't hide the edit bar — restore it. */
.actioncard__actions--edit[hidden] {
  display: none;
}

.actioncard__action {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-1);
  align-items: center;
  min-height: 44px;
  padding: var(--space-2);
  font-family: inherit;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  transition:
    background-color var(--transition-fast) var(--ease-out),
    color var(--transition-fast) var(--ease-out);
}

.actioncard__action:hover {
  color: var(--color-text);
  background: var(--color-surface-sunken);
}

.actioncard__action--primary {
  color: var(--color-primary-text);
}

.actioncard__spacer {
  flex: 1;
}

/* A recorded 👍/👎 stays lit in its own hue (issue 14). */
.icon-btn--up[aria-pressed="true"] {
  color: var(--color-success-text);
}

.icon-btn--down[aria-pressed="true"] {
  color: var(--color-danger-text);
}

/* Inline Editar: the tabs + body give way to a textarea over the same card. */
.card__editor {
  width: 100%;
  min-height: 8rem;
  padding: var(--space-4) var(--space-5);
  font: inherit;
  line-height: var(--leading-normal);
  color: var(--color-text);
  resize: vertical;
  background: var(--color-surface);
  border: none;
  border-top: 1px solid var(--color-border);
}

.card__editor:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.card--editing .tabbar,
.card--editing .card__content,
.card--editing .actioncard__actions:not(.actioncard__actions--edit) {
  display: none;
}

/* --- Strategy Card (a surfaced play; sibling of the Action Card, ADR 0010) --- */
.strategy-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* A marigold left rail marks a play apart from a piece of Content. */
.strategycard {
  border-left: 3px solid var(--color-highlight);
}

.strategycard__body {
  padding: var(--space-4) var(--space-5);
}

.strategycard__name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.strategycard__why-label {
  margin-top: var(--space-3);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  color: var(--color-highlight-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.strategycard__rationale {
  margin-top: var(--space-1);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

/* The quiet acknowledgement a rejected card leaves behind. */
.strategycard__dismissed {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
  padding: var(--space-2) 0;
  color: var(--color-text-muted);
}

/* --- Carousel of Action Cards (variations of one thing) --- */
.carousel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.carousel__viewport {
  position: relative;
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel__viewport::-webkit-scrollbar {
  display: none;
}

.carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: center;
}

.carousel__nav {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
}

.carousel__meter {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  min-width: 8rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-text-muted);
  text-align: center;
}

.carousel__next .ic {
  transform: scaleX(-1);
}

/* --- Saved Shelf ("Mis mensajes") --- */
.shelf__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 0;
  margin: 0;
  list-style: none;
}

/* --- Offerings Import (issue 12) --- */

/* Accessible-only file input: the styled chip label is the visible affordance. */
.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.import-upload {
  margin: 0;
}

.import-upload .chip {
  cursor: pointer;
}

/* Confirm-before-trust review: the extracted items shown for the owner to accept
   or correct before anything is written to the profile. */
.import-review {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  width: fit-content;
  max-width: 100%;
  padding: var(--space-3) var(--space-4);
  margin: 0;
  list-style: none;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.import-review__item {
  display: flex;
  gap: var(--space-2);
  align-items: baseline;
}

.import-review__name {
  font-weight: var(--weight-bold);
  color: var(--color-text);
}

.import-review__price {
  font-weight: var(--weight-bold);
  color: var(--color-primary-text);
}

.import-review__category {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* --- Web-push opt-in (issue 20) --- */
.btn--sm {
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.opt-in {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin: var(--space-3) var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-soft);
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, transparent);
  border-radius: var(--radius-lg);
}

.opt-in[hidden] {
  display: none;
}

.opt-in__icon {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  color: var(--color-primary-text);
}

.opt-in__text {
  flex: 1;
  min-width: 0;
}

.opt-in__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-on-primary-soft);
}

.opt-in__body {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.opt-in__actions {
  display: flex;
  flex-shrink: 0;
  gap: var(--space-2);
}

@media (width <= 33rem) {
  .opt-in {
    flex-wrap: wrap;
  }

  .opt-in__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
