/* ============================================
   Churn Solution — Cursor MCP integration
   Page styles, on top of style.css
   ============================================ */
/* Mockup frame — the grey panel every product mockup sits in. The mockups
   themselves are styled in the MOCKUPS block below. */
:is(#root, #root-end) .shot {
  position: relative;
  min-width: 0;
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: 24px;
}

/* ============================================
   TOOLS — the reference's offers table, listing the MCP tools
   ============================================ */
: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 (cursor-mcp-mockups.jsx)
   Cursor chat, settings, mcp.json and sign-in, drawn in the page's tokens.
   Everything sits inside a .shot frame; .mk-card is the white window.
   ============================================ */
:is(#root, #root-end) .shot {
  /* Status colours the theme has no token for, taken from the design. */
  --mk-green: #1b8a45;
  --mk-green-ink: #1b6b35;
  --mk-green-bg: #ddf5e3;
  --mk-red: #d2453b;
  color: var(--violet-800);
}
:is(#root, #root-end) .mk-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-sm);
  background: var(--paper);
  box-shadow: var(--sh-sm);
  font-size: 13px;
  line-height: 1.5;
}
:is(#root, #root-end) .mk-muted {
  font-size: 12px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mk-button {
  display: block;
  padding: 11px;
  border-radius: 8px;
  background: var(--gold-400);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

/* Editor window: title bar + chat pane */
:is(#root, #root-end) .mk-editor .mk-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-md);
}
:is(#root, #root-end) .mk-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-200);
}
:is(#root, #root-end) .mk-window-title {
  font-size: 14px;
  font-weight: 700;
}
:is(#root, #root-end) .mk-status {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--mk-green-bg);
  color: var(--mk-green-ink);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
:is(#root, #root-end) .mk-window-body {
  padding: 18px;
  background: var(--ink-50);
}

/* Chat: question, tool call, answer */
:is(#root, #root-end) .mk-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
:is(#root, #root-end) .mk-bubble {
  align-self: flex-end;
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--violet-800);
  color: var(--paper);
  line-height: 1.45;
}
:is(#root, #root-end) .mk-tool {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  background: var(--ink-100);
  color: var(--ink-600);
  font-size: 11px;
  font-weight: 700;
}
:is(#root, #root-end) .mk-tool svg {
  flex-shrink: 0;
  color: var(--mk-green);
}
:is(#root, #root-end) .mk-answer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink-900);
}
:is(#root, #root-end) .mk-answer strong {
  font-weight: 700;
  color: var(--violet-800);
}
:is(#root, #root-end) .mk-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
:is(#root, #root-end) .mk-bar-label {
  width: 110px;
  flex-shrink: 0;
  color: var(--ink-600);
}
:is(#root, #root-end) .mk-bar-value {
  width: 32px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 700;
}
/* <progress> as a plain rounded bar; --bar-fill picks the tone. */
:is(#root, #root-end) .mk-bar {
  --bar-fill: var(--violet-800);
  flex: 1 1 0;
  min-width: 0;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--ink-100);
  -webkit-appearance: none;
  appearance: none;
}
:is(#root, #root-end) .mk-bar::-webkit-progress-bar {
  background: var(--ink-100);
  border-radius: 999px;
}
:is(#root, #root-end) .mk-bar::-webkit-progress-value {
  background: var(--bar-fill);
  border-radius: 999px;
}
:is(#root, #root-end) .mk-bar::-moz-progress-bar {
  background: var(--bar-fill);
  border-radius: 999px;
}
:is(#root, #root-end) .mk-bar.is-soft {
  --bar-fill: var(--violet-300);
}
:is(#root, #root-end) .mk-bar.is-gold {
  --bar-fill: var(--gold-400);
}
:is(#root, #root-end) .mk-bar.is-green {
  --bar-fill: var(--mk-green);
}
:is(#root, #root-end) .mk-bar.is-red {
  --bar-fill: var(--mk-red);
}

/* Cursor Settings → Tools & MCP */
:is(#root, #root-end) .mk-settings {
  display: flex;
  gap: 16px;
}
:is(#root, #root-end) .mk-settings-nav {
  width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
:is(#root, #root-end) .mk-settings-nav span {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-600);
}
:is(#root, #root-end) .mk-settings-nav .is-active {
  background: var(--ink-100);
  color: var(--violet-800);
  font-weight: 700;
}
:is(#root, #root-end) .mk-settings-panel {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
:is(#root, #root-end) .mk-settings-title {
  font-size: 15px;
  font-weight: 600;
}

/* mcp.json */
:is(#root, #root-end) .mk-file {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-600);
}
:is(#root, #root-end) .mk-code {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--violet-800);
  color: var(--violet-100);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
}

/* Sign in to Churn Solution */
:is(#root, #root-end) .mk-signin-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  text-align: center;
}
:is(#root, #root-end) .mk-signin-head img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}
:is(#root, #root-end) .mk-signin-title {
  font-size: 16px;
  font-weight: 600;
}
:is(#root, #root-end) .mk-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
:is(#root, #root-end) .mk-field-label {
  font-size: 12px;
  font-weight: 700;
}
:is(#root, #root-end) .mk-input {
  padding: 10px 12px;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  color: var(--ink-600);
}

/* ============================================
   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) .offer-table th,
  :is(#root, #root-end) .offer-table td {
    padding: 14px 16px;
  }

  /* Mockups: tighter frames, narrower bar labels, the settings nav becomes
     a row of tabs, and the config wraps rather than scrolling. */
  :is(#root, #root-end) .shot {
    padding: 12px;
    border-radius: var(--r-md);
  }
  :is(#root, #root-end) .mk-card {
    padding: 14px;
  }
  :is(#root, #root-end) .mk-window-head {
    padding: 10px 12px;
  }
  :is(#root, #root-end) .mk-window-body {
    padding: 12px;
  }
  :is(#root, #root-end) .mk-bubble {
    max-width: 90%;
  }
  :is(#root, #root-end) .mk-answer {
    padding: 12px;
  }
  :is(#root, #root-end) .mk-bar-label {
    width: 88px;
  }
  :is(#root, #root-end) .mk-settings {
    flex-direction: column;
    gap: 12px;
  }
  :is(#root, #root-end) .mk-settings-nav {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }
  :is(#root, #root-end) .mk-settings-nav span {
    padding: 6px 10px;
    font-size: 12px;
  }
  :is(#root, #root-end) .mk-code {
    padding: 12px 10px;
    font-size: 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}
