/* ============================================================
   iClick — Policy Cancellation Flow
   Two full-page screens (reason picker + confirmation) plus
   success/error states, all wrapped in `.cxp-flow` so the
   design tokens don't leak.

   Design tokens are duplicated locally (not from dashboard scope)
   because the cancel route renders outside `.dashboard-cards-v2`.
   ============================================================ */

.cxp-flow {
  --cxp-brand: #2540ff;
  --cxp-brand-600: #1d33d6;
  --cxp-brand-50: #eef0ff;
  --cxp-ink-900: #0b1330;
  --cxp-ink-700: #1f2747;
  --cxp-ink-500: #5a6079;
  --cxp-ink-300: #b9bdcd;
  --cxp-ink-200: #e3e6ef;
  --cxp-ok: #16a34a;
  --cxp-ok-50: #e8f6ed;
  --cxp-danger: #b42318;
  --cxp-danger-50: #fdecea;
  --cxp-sad-bg: #d6def7;

  font-family: var(--font-body);
  color: var(--cxp-ink-900);
  -webkit-font-smoothing: antialiased;
}

.cxp-flow .cxp-page {
  min-height: calc(100vh - 240px);
  background: white;
  padding: 64px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Step 1 — Hello + reason */
.cxp-flow .cxp-hello {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  color: var(--cxp-ink-900);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.cxp-flow .cxp-sub {
  font-family: var(--font-subhead);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--cxp-ink-700);
  margin: 0 0 56px;
}

.cxp-flow .cxp-field {
  width: 100%;
  max-width: 540px;
  text-align: left;
  margin-bottom: 80px;
}
.cxp-flow .cxp-field-label {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cxp-ink-900);
  margin-bottom: 10px;
}
.cxp-flow .cxp-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: white;
  border: 1.5px solid var(--cxp-ink-200);
  border-radius: 10px;
  padding: 14px 44px 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--cxp-ink-900);
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235a6079' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cxp-flow .cxp-select:hover { border-color: var(--cxp-ink-300); }
.cxp-flow .cxp-select:focus {
  outline: none;
  border-color: var(--cxp-brand);
  box-shadow: 0 0 0 4px var(--cxp-brand-50);
}

/* Step 2 — sad-face disc + summary + question */
.cxp-flow .cxp-sadwrap {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: var(--cxp-sad-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
}
.cxp-flow .cxp-sadwrap svg {
  width: 96px;
  height: 96px;
  color: var(--cxp-ink-900);
}

.cxp-flow .cxp-summary {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.5;
  color: var(--cxp-ink-900);
  max-width: 900px;
  margin: 0 0 36px;
}
.cxp-flow .cxp-summary b { font-weight: 700; }

.cxp-flow .cxp-question {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  color: var(--cxp-ink-900);
  margin: 0 0 56px;
}

/* Action row — outlined BACK + filled NEXT */
.cxp-flow .cxp-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.cxp-flow .cxp-btn {
  font-family: var(--font-button);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  border: 1.5px solid var(--cxp-brand);
  transition: all 0.15s;
  min-width: 110px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cxp-flow .cxp-btn-ghost {
  background: white;
  color: var(--cxp-brand);
}
.cxp-flow .cxp-btn-ghost:hover {
  background: var(--cxp-brand-50);
  color: var(--cxp-brand);
}
.cxp-flow .cxp-btn-primary {
  background: var(--cxp-brand);
  color: white;
}
.cxp-flow .cxp-btn-primary:hover {
  background: var(--cxp-brand-600);
  color: white !important;
}
.cxp-flow .cxp-btn-primary:disabled,
.cxp-flow .cxp-btn-primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--cxp-brand);
  color: white;
}

/* Result states (success / error) — share the page shell with a
   centered icon disc, headline, message, and a single CTA. */
.cxp-flow .cxp-result-disc {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.cxp-flow .cxp-result-disc.success {
  background: var(--cxp-ok-50);
  color: #15803d;
}
.cxp-flow .cxp-result-disc.danger {
  background: var(--cxp-danger-50);
  color: var(--cxp-danger);
}
.cxp-flow .cxp-result-disc svg {
  width: 48px;
  height: 48px;
}
.cxp-flow .cxp-result-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cxp-ink-900);
  margin: 0 0 14px;
}
.cxp-flow .cxp-result-message {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: var(--cxp-ink-700);
  max-width: 540px;
  margin: 0 0 40px;
}

/* Responsive */
@media (max-width: 600px) {
  .cxp-flow .cxp-page { padding: 48px 16px 64px; }
  .cxp-flow .cxp-hello { font-size: 32px; }
  .cxp-flow .cxp-sub { font-size: 18px; margin-bottom: 40px; }
  .cxp-flow .cxp-field { max-width: 100%; margin-bottom: 56px; }
  .cxp-flow .cxp-summary { font-size: 18px; }
  .cxp-flow .cxp-question { font-size: 20px; margin-bottom: 40px; }
  .cxp-flow .cxp-result-title { font-size: 26px; }
  .cxp-flow .cxp-result-message { font-size: 16px; }
  .cxp-flow .cxp-btn { min-width: 0; flex: 1; }
}

/* ================================================================
   Typography map — explicit font-family for every text-bearing
   class in the cancellation flow. Each rule above sets its own
   font-family; this block backstops anything that doesn't.
   ================================================================ */

/* Heading-style: field label (acts as an eyebrow), confirmation
   summary's bolded policy number — these need the Heavy face. */
.cxp-flow .cxp-field-label,
.cxp-flow .cxp-summary b {
  font-family: var(--font-heading);
}
