/* ============================================
   Churn Solution — Slack integration
   Page styles, on top of style.css
   ============================================ */
/* ============================================
   NOTIFICATIONS (the reference's offers table)
   ============================================ */
:is(#root, #root-end) .offers-section {
  background: var(--ink-50);
}
:is(#root, #root-end) .offers {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
:is(#root, #root-end) .offers-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
:is(#root, #root-end) .offers-copy p {
  font-size: 16.5px;
  color: var(--ink-600);
  text-wrap: pretty;
}
:is(#root, #root-end) .offer-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  font-size: 15.5px;
}
:is(#root, #root-end) .offer-table th,
:is(#root, #root-end) .offer-table td {
  padding: 17px 24px;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-bottom: 1px solid var(--ink-200);
  background: var(--paper);
}
:is(#root, #root-end) .offer-table tr:last-child > * {
  border-bottom: 0;
}
:is(#root, #root-end) .offer-table thead th {
  background: var(--violet-800);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
:is(#root, #root-end) .offer-table tbody th {
  width: 40%;
  font-weight: 600;
  color: var(--violet-800);
}
:is(#root, #root-end) .offer-table td {
  color: var(--ink-600);
}

/* ============================================
   MOCKUPS
   Product visuals rebuilt from the design's HTML mockups (see the Mockups
   section of slack-app.jsx). Status colours have no theme token, so they are
   scoped here.
   ============================================ */
:is(#root, #root-end) .mock {
  --mock-red: #d2453b;
  --mock-green: #1b8a45;
  --mock-indigo: #5b63b7;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  background: var(--ink-100);
  color: var(--violet-800);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  user-select: none;
}
:is(#root, #root-end) .mock-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--paper);
}
:is(#root, #root-end) .mock-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
:is(#root, #root-end) .mock-subtitle {
  font-size: 12px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-muted {
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-button {
  padding: 11px;
  border-radius: 8px;
  background: var(--gold-400);
  color: var(--paper);
  font-weight: 700;
  text-align: center;
}

/* Slack alert in #churn-alerts */
:is(#root, #root-end) .mock-alert {
  padding: 24px;
}
:is(#root, #root-end) .mock-slack-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
:is(#root, #root-end) .mock-slack-head .mock-muted {
  font-size: 11px;
  color: var(--ink-400);
}
:is(#root, #root-end) .mock-slack-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--violet-800);
}
:is(#root, #root-end) .mock-slack-avatar img {
  width: 20px;
  height: auto;
  display: block;
}
:is(#root, #root-end) .mock-slack-attachment {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--ink-200);
  border-left: 5px solid var(--mock-red);
  border-radius: var(--r-sm);
}
:is(#root, #root-end) .mock-slack-title {
  font-size: 15px;
  font-weight: 700;
}
:is(#root, #root-end) .mock-slack-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  font-size: 12px;
}
:is(#root, #root-end) .mock-slack-label {
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-slack-value {
  font-weight: 700;
}
:is(#root, #root-end) .mock-slack-quote {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ink-100);
  font-size: 12px;
}
:is(#root, #root-end) .mock-slack-replies {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-slack-reply {
  display: flex;
  gap: 10px;
  font-size: 12px;
}
:is(#root, #root-end) .mock-slack-reply strong,
:is(#root, #root-end) .mock-slack-reply .mock-muted {
  display: block;
}
:is(#root, #root-end) .mock-slack-initials {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
}
:is(#root, #root-end) .mock-slack-initials.is-green {
  background: var(--mock-green);
}
:is(#root, #root-end) .mock-slack-initials.is-indigo {
  background: var(--mock-indigo);
}
:is(#root, #root-end) .mock-stats {
  display: flex;
  gap: 10px;
}
:is(#root, #root-end) .mock-stat {
  flex: 1 1 0;
  min-width: 0;
  gap: 2px;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
}
:is(#root, #root-end) .mock-stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
:is(#root, #root-end) .mock-stat-value.is-green {
  color: var(--mock-green);
}
:is(#root, #root-end) .mock-stat-value.is-navy {
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-stat-value.is-red {
  color: var(--mock-red);
}
:is(#root, #root-end) .mock-stat-label {
  font-size: 11px;
  color: var(--ink-600);
}

/* Connect to Slack card */
:is(#root, #root-end) .mock-connect {
  align-items: center;
}
:is(#root, #root-end) .mock-connect-card {
  width: 100%;
  max-width: 340px;
  align-items: center;
  padding: 34px 28px 26px;
  text-align: center;
  box-shadow: var(--sh-md);
}
:is(#root, #root-end) .mock-connect-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}
:is(#root, #root-end) .mock-connect-card .mock-title {
  margin-top: 8px;
  font-size: 16px;
}
:is(#root, #root-end) .mock-connect-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-400);
}
:is(#root, #root-end) .mock-connect-card .mock-button {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
}

/* Channel picker */
:is(#root, #root-end) .mock-panel {
  border-radius: 12px;
}
:is(#root, #root-end) .mock-channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  font-weight: 500;
}
:is(#root, #root-end) .mock-channel.is-selected {
  padding: 9px 11px;
  border: 2px solid var(--violet-800);
  background: var(--ink-100);
  font-weight: 700;
}
:is(#root, #root-end) .mock-channel-tag {
  font-size: 11px;
}

/* Notification toggles */
:is(#root, #root-end) .mock-toggles {
  display: flex;
  flex-direction: column;
}
:is(#root, #root-end) .mock-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--ink-200);
  font-weight: 600;
}
:is(#root, #root-end) .mock-toggle {
  position: relative;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--ink-300);
}
:is(#root, #root-end) .mock-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
}
:is(#root, #root-end) .mock-toggle.is-on {
  background: var(--violet-800);
}
:is(#root, #root-end) .mock-toggle.is-on::after {
  left: 17px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1080px) {
  :is(#root, #root-end) .offers {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 600px) {
  :is(#root, #root-end) .mock,
  :is(#root, #root-end) .mock-alert {
    padding: 14px;
  }
  :is(#root, #root-end) .mock-card {
    padding: 14px;
  }
  :is(#root, #root-end) .mock-slack-attachment {
    padding: 12px;
  }
  :is(#root, #root-end) .mock-stats {
    gap: 8px;
  }
  :is(#root, #root-end) .mock-stat {
    padding: 10px 6px;
  }
  :is(#root, #root-end) .mock-connect-card {
    padding: 26px 18px 20px;
  }
  :is(#root, #root-end) .offer-table th,
  :is(#root, #root-end) .offer-table td {
    padding: 14px 16px;
  }
}
