/* ============================================
   Churn Solution — Omnisend integration
   Page styles, on top of style.css
   ============================================ */
/* ============================================
   AUTOMATIONS
   The design gives the win-back visual a fixed 600px column.
   ============================================ */
:is(#root, #root-end) .automations .split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
}

/* ============================================
   MOCKUPS — shared pieces
   HTML/CSS product visuals from omnisend-mockups.jsx. Each sits in a light
   frame like the design's; the parts inside are plain divs, never controls.
   ============================================ */
:is(#root, #root-end) .mock-frame {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  background: var(--ink-100);
  color: var(--violet-800);
  line-height: 1.45;
}
: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-card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-button {
  padding: 11px;
  border-radius: 8px;
  background: var(--gold-400);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
:is(#root, #root-end) .mock-button-lg {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
}
/* Taller than the design's 430px: Geist sets the email about 50px taller
   than the design's font, and the chip must clear its button. */
:is(#root, #root-end) .mock-winback {
  height: 500px;
  padding: 24px;
}
:is(#root, #root-end) .mock-email {
  position: absolute;
  left: 24px;
  top: 24px;
  width: min(360px, 66%);
  overflow: hidden;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(15, 18, 77, 0.08);
}
:is(#root, #root-end) .mock-email-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-200);
  font-size: 12px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-email-head strong {
  font-weight: 600;
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-email-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px;
  background: var(--violet-800);
  color: var(--paper);
  text-align: center;
}
:is(#root, #root-end) .mock-email-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-400);
}
:is(#root, #root-end) .mock-email-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-wrap: balance;
}
:is(#root, #root-end) .mock-email-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-email-price {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ink-100);
  color: var(--violet-800);
  font-weight: 700;
  text-align: center;
}
:is(#root, #root-end) .mock-sms {
  position: absolute;
  right: 24px;
  top: 150px;
  z-index: 1;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--ink-200);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 16px 36px rgba(15, 18, 77, 0.16);
}
:is(#root, #root-end) .mock-sms-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-600);
  text-align: center;
}
:is(#root, #root-end) .mock-sms-bubble {
  padding: 10px 12px;
  border-radius: 14px 14px 14px 4px;
  background: var(--ink-100);
  font-size: 12px;
  line-height: 1.45;
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-personalize {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--violet-800);
  box-shadow: var(--sh-md);
}
:is(#root, #root-end) .mock-personalize span {
  font-size: 11px;
  color: var(--violet-200);
}
:is(#root, #root-end) .mock-personalize strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--paper);
}

/* ============================================
   MOCKUP — Connect to Omnisend card (How it works, step 1)
   ============================================ */
:is(#root, #root-end) .mock-connect {
  display: flex;
  justify-content: center;
}
:is(#root, #root-end) .mock-connect-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 34px 28px 26px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--paper);
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 18, 77, 0.08);
}
:is(#root, #root-end) .mock-connect-logo {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 12px;
  background: var(--paper);
}
:is(#root, #root-end) .mock-connect-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
:is(#root, #root-end) .mock-connect-title {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-connect-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-400);
}

/* ============================================
   MOCKUP — sync settings form (How it works, step 2)
   ============================================ */
:is(#root, #root-end) .mock-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
:is(#root, #root-end) .mock-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-input {
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  font-size: 13px;
  color: var(--violet-800);
  overflow-wrap: anywhere;
}
:is(#root, #root-end) .mock-field-help {
  font-size: 11px;
  color: var(--ink-600);
}

/* ============================================
   MOCKUP — contact timeline event (How it works, step 3)
   ============================================ */
:is(#root, #root-end) .mock-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}
:is(#root, #root-end) .mock-contact > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
:is(#root, #root-end) .mock-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--violet-800);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
}
:is(#root, #root-end) .mock-contact-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-contact-meta {
  font-size: 12px;
  color: var(--ink-600);
  overflow-wrap: anywhere;
}
:is(#root, #root-end) .mock-event {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--ink-100);
}
:is(#root, #root-end) .mock-event-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 6px;
}
:is(#root, #root-end) .mock-event-head strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-event-head span {
  font-size: 11px;
  color: var(--ink-600);
  white-space: nowrap;
}
:is(#root, #root-end) .mock-event-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--ink-200);
  font-size: 12px;
}
:is(#root, #root-end) .mock-event-row span {
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-event-row strong {
  font-weight: 700;
  color: var(--violet-800);
  text-align: right;
}

/* ============================================
   MOCKUP — segments list (How it works, step 4)
   ============================================ */
:is(#root, #root-end) .mock-segments-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
}
:is(#root, #root-end) .mock-segments-head span:last-child {
  font-size: 11px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-segment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-sm);
}
:is(#root, #root-end) .mock-segment > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
:is(#root, #root-end) .mock-segment-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--violet-800);
}
:is(#root, #root-end) .mock-segment-rule {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mock-segment-count {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ink-100);
  font-size: 13px;
  font-weight: 700;
  color: var(--violet-800);
}

/* ============================================
   EVENT PROPERTIES (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);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1080px) {
  :is(#root, #root-end) .automations .split,
  :is(#root, #root-end) .offers {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  /* The layered win-back visual is composed for the design's 600px column;
     full width spreads its pieces into the corners. */
  :is(#root, #root-end) .mock-winback {
    max-width: 600px;
    margin-inline: auto;
  }
}

@media (max-width: 600px) {
  :is(#root, #root-end) .offer-table th,
  :is(#root, #root-end) .offer-table td {
    padding: 14px 16px;
  }

  /* Mockups: tighter frames, and the layered win-back visual stacks */
  :is(#root, #root-end) .mock-frame {
    padding: 16px;
  }
  :is(#root, #root-end) .mock-connect-card {
    padding: 28px 20px 22px;
  }
}

/* Below ~664px (32px gutters) the win-back frame can't reach its 600px and
   the SMS slides over the email's text, so the layers stack instead. */
@media (max-width: 680px) {
  :is(#root, #root-end) .mock-winback {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  :is(#root, #root-end) :is(.mock-email, .mock-sms, .mock-personalize) {
    position: static;
    width: auto;
  }
  :is(#root, #root-end) .mock-sms {
    align-self: flex-end;
    width: min(220px, 85%);
  }
}
