/* =============================================================
   shopstatus.css  —  Shared stylesheet for ShopStatus pages
   ============================================================= */

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Design tokens ── */
:root {
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --green-border: #bbf7d0;
  --yellow: #d97706;
  --yellow-bg: #fffbeb;
  --yellow-border: #fde68a;
  --orange: #ea580c;
  --orange-bg: #fff7ed;
  --orange-border: #fed7aa;
  --blue: #2563eb;
  --blue-bg: #eff6ff;
  --blue-border: #bfdbfe;
  --purple: #7c3aed;
  --purple-bg: #f5f3ff;
  --purple-border: #ddd6fe;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --accent: #5c6ac4;
  --accent-dark: #4a56b0;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
}

/* ── Base ── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Nav ── */
header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-900);
  text-decoration: none;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.tag {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px var(--green-bg);
  }

  50% {
    box-shadow: 0 0 0 5px #bbf7d0;
  }
}

.nav-pill {
  font-size: .8rem;
  font-weight: 500;
  padding: .3rem .75rem;
  border-radius: 99px;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
  white-space: nowrap;
}

/* ── Page header (inner pages) ── */
.page-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 2rem 1.5rem 1.75rem;
}

.page-header-inner {
  max-width: 860px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--gray-900);
  flex: 1;
  margin-bottom: 0;
}

.page-header p {
  font-size: .93rem;
  color: var(--gray-500);
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--gray-400);
  margin-bottom: .85rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--gray-300);
}

/* ── Badges ──
   Variant colours are supplied via the --c/--bg/--bd custom properties
   (see the status-colour variant block further down). */
.badge {
  --c: var(--gray-700);
  --bg: var(--gray-100);
  --bd: var(--gray-200);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .58rem;
  border-radius: 99px;
  white-space: nowrap;
  line-height: 1.4;
  flex-shrink: 0;
  background: var(--bg);
  color: var(--c);
  border: 1px solid var(--bd);
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--c);
}

.badge-resolved,
.dot-resolved,
.toast-success {
  --c: var(--green);
  --bg: var(--green-bg);
  --bd: var(--green-border);
}

.badge-monitoring,
.dot-monitoring,
.toast-warning {
  --c: var(--yellow);
  --bg: var(--yellow-bg);
  --bd: var(--yellow-border);
}

.badge-identified,
.badge-major,
.dot-identified {
  --c: var(--orange);
  --bg: var(--orange-bg);
  --bd: var(--orange-border);
}

.badge-investigating,
.dot-investigating {
  --c: var(--purple);
  --bg: var(--purple-bg);
  --bd: var(--purple-border);
}

.badge-minor {
  --c: var(--blue);
  --bg: var(--blue-bg);
  --bd: var(--blue-border);
}

.toast-error {
  --c: var(--red);
  --bg: var(--red-bg);
  --bd: var(--red-border);
}

.toast-info {
  --c: var(--accent);
  --bg: #eef2ff;
  --bd: var(--gray-200);
}

/* ── Cards ── */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: box-shadow .15s, border-color .15s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.card-badges {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-shrink: 0;
}

.card-title {
  font-size: .97rem;
  font-weight: 600;
  color: var(--gray-900);
  flex: 1;
  min-width: 0;
}

.card-body {
  font-size: .875rem;
  color: var(--gray-500);
  line-height: 1.55;
}

.card-link {
  margin-left: auto;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: .8rem;
  white-space: nowrap;
}

.card-link:hover {
  text-decoration: underline;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--gray-200);
  background: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: auto;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
}

.footer-supported {
  font-size: .82rem;
  color: var(--gray-400);
  margin-bottom: .65rem;
}

.footer-logo img {
  height: 48px;
  opacity: .7;
  transition: opacity .15s;
  vertical-align: middle;
}

.footer-logo img:hover {
  opacity: 1;
}

.footer-disclaimer {
  font-size: .78rem;
  color: var(--gray-400);
  margin-top: 1.1rem;
  line-height: 1.6;
}

.footer-disclaimer a {
  color: var(--accent);
  text-decoration: none;
}

.footer-disclaimer a:hover {
  text-decoration: underline;
}

/* ── Homepage: hero ── */
.hero {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  max-width: 560px;
  margin: 0 auto .75rem;
}

.hero p {
  color: var(--gray-500);
  font-size: 1.05rem;
  max-width: 460px;
  margin: 0 auto 2rem;
}

/* ── Homepage: subscribe form ── */
.subscribe-form {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 460px;
  margin: 0 auto .6rem;
}

.subscribe-form input[type="email"] {
  flex: 1 1 220px;
  padding: .65rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem;
  color: var(--gray-900);
  background: var(--gray-50);
  outline: none;
  transition: border-color .15s;
}

.subscribe-form input[type="email"]::placeholder {
  color: var(--gray-400);
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--accent);
  background: #fff;
}

.subscribe-form button {
  padding: .65rem 1.3rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}

.subscribe-form button:hover {
  background: var(--accent-dark);
}

.form-hint {
  font-size: .8rem;
  color: var(--gray-400);
}

/* ── Homepage: main content ── */
main {
  max-width: 860px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
}

.section-meta {
  font-size: .8rem;
  color: var(--gray-400);
}

/* ── Homepage: card meta row ── */
.card-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--gray-400);
  padding-top: .25rem;
  border-top: 1px solid var(--gray-100);
}

.card-meta span strong {
  color: var(--gray-700);
  font-weight: 500;
}

/* ── Homepage: show more ── */
.show-more {
  display: flex;
  justify-content: center;
}

.show-more a {
  font-size: .875rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  padding: .5rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  transition: background .15s, border-color .15s;
}

.show-more a:hover {
  background: var(--gray-50);
  border-color: var(--accent);
}

/* ── Homepage: responsive ── */
@media (max-width: 520px) {
  .subscribe-form {
    flex-direction: column;
  }

  .subscribe-form input[type="email"],
  .subscribe-form button {
    width: 100%;
  }

  .card-meta {
    flex-direction: column;
    gap: .4rem;
  }

  .card-link {
    margin-left: 0;
  }
}

/* ── Incident list: toolbar ── */
.toolbar {
  max-width: 860px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

.toolbar-left {
  font-size: .85rem;
  color: var(--gray-500);
}

.toolbar-left strong {
  color: var(--gray-900);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ctrl-label {
  font-size: .8rem;
  color: var(--gray-500);
}

.ctrl-select {
  font-size: .82rem;
  padding: .3rem .65rem;
  border: 1px solid var(--gray-200);
  border-radius: 7px;
  background: #fff;
  color: var(--gray-700);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .5rem center;
  padding-right: 1.6rem;
}

.ctrl-select:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

/* ── Incident list ── */
.incident-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

/* ── Incident list: card footer row ── */
.card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  font-size: .8rem;
  color: var(--gray-400);
  padding-top: .5rem;
  border-top: 1px solid var(--gray-100);
}

.card-footer-item {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.card-footer-item svg {
  flex-shrink: 0;
}

/* ── Incident list: pagination ── */
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* margin-top: 1.5rem; */
  flex-wrap: wrap;
  gap: .75rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--gray-700);
  font-size: .83rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}

.page-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page-btn.disabled {
  color: var(--gray-300);
  pointer-events: none;
}

.page-btn.ellipsis {
  border-color: transparent;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.pagination-label {
  font-size: .82rem;
  color: var(--gray-400);
}

/* ── Incident list: responsive ── */
@media (max-width: 560px) {
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }

  .card-link {
    margin-left: 0;
  }

  .pagination-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Detail: page header additions ── */
.incident-title-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .6rem;
}

.incident-badges {
  display: flex;
  gap: .4rem;
  flex-shrink: 0;
  margin-top: .2rem;
}

.page-header .lead {
  font-size: .93rem;
  color: var(--gray-500);
  max-width: 640px;
  margin-top: .15rem;
}

/* ── Detail: main (two-column grid) ── */
.incident-detail-container {
  display: grid;
  grid-template-columns: 1fr 260px;
  align-items: start;
}

/* ── Detail: timeline ── */
.timeline-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.1rem;
}

.timeline-meta {
  font-size: .82rem;
  color: var(--gray-400);
  font-weight: 400;
  margin-left: .6rem;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--gray-200);
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-top: .1rem;
}

.timeline-dot-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Timeline dot colours pull from the --c/--bg/--bd variant block above. */
.timeline-dot {
  background: var(--bg, var(--gray-100));
  border: 2px solid var(--bd, var(--gray-200));
}

.timeline-dot .timeline-dot-inner {
  background: var(--c, var(--gray-400));
}

.timeline-content {
  flex: 1;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .9rem 1.1rem;
}

.timeline-content-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .4rem;
  flex-wrap: wrap;
}

.timeline-timestamp {
  font-size: .78rem;
  color: var(--gray-400);
}

.timeline-body {
  font-size: .88rem;
  color: var(--gray-700);
  line-height: 1.55;
}

/* ── Detail: sidebar ── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}

.info-card h3 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin-bottom: .75rem;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.info-item-label {
  font-size: .75rem;
  color: var(--gray-400);
  font-weight: 500;
}

.info-item-value {
  font-size: .88rem;
  color: var(--gray-900);
  font-weight: 500;
}

.info-divider {
  height: 1px;
  background: var(--gray-100);
  margin: .1rem 0;
}

.component-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--gray-700);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: .25rem .65rem;
  border-radius: 6px;
}

.component-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  flex-shrink: 0;
}

/* ── Detail: back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .83rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  padding: .5rem 0;
  margin-top: 1.5rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* ── Detail: responsive ── */
@media (max-width: 680px) {
  .incident-detail-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: -1;
  }
}

@media (max-width: 480px) {
  .timeline::before {
    left: 8px;
  }

  .timeline-dot {
    width: 18px;
    height: 18px;
  }

  .timeline-dot-inner {
    width: 8px;
    height: 8px;
  }
}

.error-container {
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.error-wrap {
  max-width: 520px;
  width: 100%;
  text-align: center;
}

/* ── 404 graphic ── */
.error-graphic {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.error-code {
  font-size: clamp(6rem, 20vw, 9rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--gray-200);
  user-select: none;
  position: relative;
}

/* Floating incident card that drifts in */
.floating-card {
  position: absolute;
  top: 10%;
  right: -30%;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .09);
  padding: .65rem .9rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
  animation: float-in 1s .3s cubic-bezier(.21, 1.02, .73, 1) both, bob 4s 1.3s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.floating-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.floating-card-2 {
  top: auto;
  bottom: 12%;
  right: auto;
  left: -28%;
  animation-delay: .5s, 1.5s;
  animation-duration: 1s, 4.5s;
}

/* ── Text ── */
.error-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.25;
  margin: 0 0 .75rem;
}

.error-message {
  font-size: 1rem;
  color: var(--gray-500);
  line-height: 1.65;
  margin: 0 0 2rem;
}

/* ── Action buttons ── */
.error-actions {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.3rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.3rem;
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

@media (max-width: 480px) {

  .floating-card,
  .floating-card-2 {
    display: none;
  }
}

/* =====================================================
       TOAST COMPONENT — add this block to shopstatus.css
       ===================================================== */

/* ── Stack container (fixed, bottom-right) ── */
.toast-stack {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  align-items: flex-end;
  pointer-events: none;
  /* let clicks pass through the gap between toasts */
}

/* ── Individual toast ── */
.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .10), 0 1px 4px rgba(0, 0, 0, .06);
  padding: .85rem 1rem .85rem 1rem;
  width: 320px;
  max-width: calc(100vw - 3rem);
  position: relative;
  overflow: hidden;

  /* enter animation */
  animation: toast-in .22s cubic-bezier(.21, 1.02, .73, 1) forwards;
}

/* Variants — left border colour comes from the shared --c variant property. */
.toast-success,
.toast-error,
.toast-warning,
.toast-info {
  border-left-color: var(--c);
}

/* Slide+fade in */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Slide+fade out (added by JS) */
.toast.toast-out {
  animation: toast-out .18s ease-in forwards;
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(.97);
  }
}

/* ── Icon circle ── */
.toast-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: .05rem;
}

.toast .toast-icon {
  background: var(--bg);
  color: var(--c);
}

/* ── Body ── */
.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.35;
  margin: 0 0 .2rem;
}

.toast-message {
  font-size: .82rem;
  color: var(--gray-500);
  line-height: 1.45;
  margin: 0;
}

/* ── Close button ── */
.toast-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 0;
  line-height: 1;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color .12s, background .12s;
  margin-top: .05rem;
}

.toast-close:hover {
  color: var(--gray-700);
  background: var(--gray-100);
}

/* ── Auto-dismiss progress bar ── */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 0 var(--radius);
  width: 100%;
  transform-origin: left;
  animation: toast-shrink var(--toast-duration, 4s) linear forwards;
}

.toast .toast-progress {
  background: var(--c);
}

@keyframes toast-shrink {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

/* ── Mobile: full width ── */
@media (max-width: 400px) {
  .toast-stack {
    right: .75rem;
    left: .75rem;
    bottom: .75rem;
    align-items: stretch;
  }

  .toast {
    width: 100%;
  }
}