/* «Solo por invitación» (reelstudio/interested.py, 2026-11-19): the form «Sumate a la lista de interesados», its
   thanks page, the landing's invitation line, and the admin's alerts of new interested people (the red count on
   «Admin» and «Interesados», the Panel's alert, the toast) and «Interesados». Linked from base.html
   only when the app defines `interested_css`; app.css is not touched. The red alert tone of the design system; the
   only motion is a gentle pulse, and none under prefers-reduced-motion. Texts run to the edge of their frame. */

/* --- the red count: «Admin» (header, also in the phones' nav row) and «Interesados» (admin nav) */
.interest-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 7px;
  border-radius: 999px; background: var(--red-mark, #d32f2f); color: #fff; font-size: .75rem; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; vertical-align: middle; animation: interest-pulse 2.4s ease-in-out infinite; }
.filter-chip .interest-count { margin-left: 2px; }
.top-nav .interest-count { min-width: 20px; height: 20px; margin-left: 4px; padding: 0 5px; font-size: .7rem; }
@keyframes interest-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, .45); }
  50% { box-shadow: 0 0 0 6px rgba(211, 47, 47, 0); }
}

/* --- the toast: the next page after someone signs up, once */
.toast.toast-interest { grid-template-columns: 28px minmax(0, 1fr) 36px; padding-block: var(--s-4, 16px); background: var(--red-soft, #fff1f0);
  border: 2px solid var(--red-strong, #e57373); border-left: 8px solid var(--red-mark, #d32f2f); color: #5f1111;
  box-shadow: 0 6px 20px rgba(198, 40, 40, .16); font-size: 1.0625rem; }
.toast-interest > .alert-mark { width: 28px; height: 28px; background: var(--red-mark, #d32f2f); font-size: .95rem; }
.toast-interest .toast-head { color: var(--red, #b42318); font-size: 1.125rem; }
.interest-toast-link { justify-self: start; margin-top: 4px; color: var(--red, #b42318); font-weight: 800; }

/* --- the Panel's alert */
.card.interest-alert { display: grid; gap: var(--s-3, 12px); background: var(--red-soft, #fff1f0); border: 2px solid var(--red-strong, #e57373);
  border-left: 8px solid var(--red-mark, #d32f2f); color: #5f1111; box-shadow: 0 6px 20px rgba(198, 40, 40, .14); }
.interest-alert > * { margin: 0; max-width: none; }
.interest-alert h2 { display: flex; align-items: center; gap: var(--s-3, 12px); color: var(--red, #b42318);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); line-height: 1.25; }
.interest-alert-bell { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--red-mark, #d32f2f); font-size: 1.375rem; animation: interest-pulse 2.4s ease-in-out infinite; }
.interest-alert p { font-size: 1.0625rem; line-height: 1.5; font-weight: 500; }
.btn.interest-alert-btn { background: var(--red-mark, #d32f2f); border-color: var(--red-mark, #d32f2f); color: #fff;
  box-shadow: 0 4px 14px rgba(198, 40, 40, .25); }
.btn.interest-alert-btn:hover { background: #b71c1c; border-color: #b71c1c; }
@media (max-width: 479px) { .btn.interest-alert-btn { width: 100%; } }

/* --- the form and its thanks */
.interest-wants .chips { margin-top: var(--s-2, 8px); }
.interest-chip input:checked + span::before { content: "✓"; margin-right: 6px; font-weight: 900; }
.interest-trap { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.interest-thanks { display: grid; justify-items: center; gap: var(--s-3, 12px); padding: var(--s-7, 48px) var(--s-5, 24px); text-align: center; }
.card.interest-thanks > * { margin: 0; max-width: none; }
.interest-thanks h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.2; }
.interest-thanks-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--green, #047857);
  color: #fff; font-size: 2rem; font-weight: 900; }
@media (max-width: 479px) { .interest-thanks { padding: var(--s-6, 32px) var(--s-4, 16px); } .interest-thanks .btn { width: 100%; } }

/* --- the landing's invitation line (instead of the welcome gift) */
.lp-gift.lp-invite { background: var(--accent-soft, #f1edff); border-color: var(--accent-line, #d4c9ff); color: var(--accent-text, #5b3fd9); }
.lp-invite-mark { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-text, #5b3fd9); color: #fff; font-size: .8rem; }

/* --- «Interesados» */
.interest-mode a, .interest-old a { font-weight: 700; }
.interest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3, 12px); }
.card.interest-item { display: grid; gap: var(--s-3, 12px); }
.card.interest-item > * { margin: 0; }
.interest-item.is-fresh { border: 2px solid var(--red-strong, #e57373); box-shadow: inset 6px 0 0 var(--red-mark, #d32f2f), var(--shadow-1, none); }
.interest-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2, 8px) var(--s-3, 12px); }
.interest-name { margin: 0; font-size: 1.1875rem; line-height: 1.3; }
.interest-when { flex-basis: 100%; font: var(--t-small); color: var(--soft); }
.badge.interest-new { background: var(--red-mark, #d32f2f); color: #fff; }
.interest-status-nuevo { background: var(--red-soft, #fff1f0); color: var(--red, #b42318); }
.interest-status-contactado { background: var(--amber-soft, #fff8e6); color: var(--amber, #92400e); }
.interest-status-invitado { background: var(--green-soft, #ecfdf5); color: var(--green, #047857); }
.interest-status-descartado { background: var(--bg-2, #f1f1f6); color: var(--faint, #626875); }
.interest-data { display: grid; gap: var(--s-3, 12px) var(--s-5, 24px); margin: 0; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .interest-data { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.interest-data > div { min-width: 0; }
.interest-data dt { font: var(--t-caption); color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.interest-data dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.interest-message { grid-column: 1 / -1; }
.interest-message dd { white-space: pre-line; padding: var(--s-3, 12px) var(--s-4, 16px); border-radius: var(--r-md, 12px);
  background: var(--card-2, #f6f6f9); border: 1px solid var(--line, #e6e6ee); }
.interest-phone { margin-right: var(--s-3, 12px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.interest-wa { font-weight: 800; color: var(--green, #047857); white-space: nowrap; }
.interest-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.interest-tags li { padding: 2px 10px; border-radius: 999px; background: var(--accent-soft, #f1edff); color: var(--accent-text, #5b3fd9); font: var(--t-caption); }
.interest-note { padding: var(--s-2, 8px) var(--s-3, 12px); border-radius: var(--r-md, 12px); background: var(--amber-soft, #fff8e6);
  border: 1px solid var(--amber-line, #f2cf86); font: var(--t-small); max-width: none; }
.interest-note.is-done { background: var(--green-soft, #ecfdf5); border-color: var(--green-line, #a7e3c9); }
.interest-actions form { margin: 0; }
.interest-history > summary { cursor: pointer; font: var(--t-small); font-weight: 700; color: var(--accent-text, #5b3fd9); }
.interest-history ol { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 2px; font: var(--t-small); color: var(--soft); }
.interest-history-when { font-variant-numeric: tabular-nums; color: var(--text); }
.interest-empty p { margin: 0; }
@media (max-width: 479px) { .interest-actions .btn { flex: 1 1 100%; } .interest-actions form { flex: 1 1 100%; } .interest-actions form .btn { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .interest-count, .interest-alert-bell { animation: none; }
}
