/* ==========================================================================
   Cancel Subscription Modal — 3-step retention flow
   SkrivSikkert Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Overlay + Modal
   -------------------------------------------------------------------------- */

.cancel-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
}

.cancel-overlay.is-open {
  display: flex;
  animation: cancel-overlay-in 0.2s ease forwards;
}

.cancel-overlay.is-closing {
  animation: cancel-overlay-out 0.2s ease forwards;
}

.cancel-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: 90vh;
  background: var(--color-card, #fff);
  border-radius: 16px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: scale(0.95);
  animation: cancel-modal-in 0.25s ease 0.05s forwards;
}

.cancel-overlay.is-closing .cancel-modal {
  animation: cancel-modal-out 0.2s ease forwards;
}

@keyframes cancel-overlay-in {
  to { opacity: 1; }
}

@keyframes cancel-overlay-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes cancel-modal-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cancel-modal-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* --------------------------------------------------------------------------
   2. Header — step dots + close button
   -------------------------------------------------------------------------- */

.cancel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px 24px 0;
}

/* Step indicator dots */
.cancel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cancel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border, #e5e7eb);
  transition: background 0.25s ease, transform 0.25s ease;
}

.cancel-dot.is-active {
  background: var(--color-primary, #696cff);
}

.cancel-dot.is-completed {
  background: var(--color-primary, #696cff);
  transform: scale(0.75);
}

/* Close button */
.cancel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-secondary, #6c757d);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cancel-close:hover {
  background: var(--color-bg, #FAFAF8);
  color: var(--color-text-primary, #384551);
}

.cancel-close:focus-visible {
  outline: 2px solid var(--color-primary, #696cff);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. Body — step container with transitions
   -------------------------------------------------------------------------- */

.cancel-body {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
  flex: 1 1 auto;
  overflow-y: auto;
}

/* Step panels */
.cancel-step {
  display: none;
}

.cancel-step.is-active {
  display: block;
  animation: cancel-step-enter 0.3s ease forwards;
}

/* Exiting panels are position:absolute so they don't stack with the
   incoming panel and cause the container to jump in height. */
.cancel-step.is-exiting-left,
.cancel-step.is-exiting-right {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

/* Slide left — current step exiting to the left (going forward) */
.cancel-step.is-exiting-left {
  animation: cancel-step-exit-left 0.3s ease forwards;
}

/* Slide right — current step exiting to the right (going backward) */
.cancel-step.is-exiting-right {
  animation: cancel-step-exit-right 0.3s ease forwards;
}

/* Enter from left — step entering from the left (going backward) */
.cancel-step.is-entering-left {
  display: block;
  animation: cancel-step-enter-left 0.3s ease forwards;
}

@keyframes cancel-step-enter {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes cancel-step-exit-left {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-40px);
  }
}

@keyframes cancel-step-exit-right {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

@keyframes cancel-step-enter-left {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Step titles */
.cancel-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text-primary, #384551);
  line-height: 1.3;
}

.cancel-subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--color-text-secondary, #6c757d);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   4. Reason cards
   -------------------------------------------------------------------------- */

.reason-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reason-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  background: var(--color-card, #fff);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  /* Staggered entrance — overridden per child */
  opacity: 0;
  animation: reason-card-in 0.3s ease forwards;
}

.reason-card:nth-child(1) { animation-delay: 0.05s; }
.reason-card:nth-child(2) { animation-delay: 0.10s; }
.reason-card:nth-child(3) { animation-delay: 0.15s; }
.reason-card:nth-child(4) { animation-delay: 0.20s; }
.reason-card:nth-child(5) { animation-delay: 0.25s; }
.reason-card:nth-child(6) { animation-delay: 0.30s; }

@keyframes reason-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reason-card:hover {
  border-color: var(--color-primary, #696cff);
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb, 105, 108, 255), 0.1);
}

.reason-card.is-selected {
  border-color: var(--color-primary, #696cff);
  border-left-width: 3px;
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.06);
}

.reason-card:focus-visible {
  outline: 2px solid var(--color-primary, #696cff);
  outline-offset: 2px;
}

/* Icon area */
.reason-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  font-size: 20px;
}

/* Text content */
.reason-card__text {
  flex: 1;
  min-width: 0;
}

.reason-card__title {
  display: block;
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary, #384551);
  line-height: 1.4;
}

.reason-card__desc {
  display: block;
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary, #6c757d);
  line-height: 1.45;
}

/* Radio indicator */
.reason-card__radio {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border, #e5e7eb);
  border-radius: 50%;
  margin-top: 2px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.reason-card.is-selected .reason-card__radio {
  border-color: var(--color-primary, #696cff);
}

.reason-card.is-selected .reason-card__radio::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary, #696cff);
}

/* --------------------------------------------------------------------------
   5. "Andet" textarea — slide-down reveal
   -------------------------------------------------------------------------- */

.reason-other {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.reason-other.is-visible {
  max-height: 200px;
  opacity: 1;
}

.reason-other__textarea {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1.5px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  background: var(--color-card, #fff);
  color: var(--color-text-primary, #384551);
  font-family: "Nunito Sans", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.reason-other__textarea::placeholder {
  color: var(--color-text-secondary, #6c757d);
  opacity: 0.7;
}

.reason-other__textarea:focus {
  outline: none;
  border-color: var(--color-primary, #696cff);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 105, 108, 255), 0.12);
}

.reason-other__counter {
  display: block;
  margin-top: 4px;
  text-align: right;
  font-size: 12px;
  color: var(--color-text-secondary, #6c757d);
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   6. Offer card — retention / discount / pause
   -------------------------------------------------------------------------- */

.offer-card {
  text-align: center;
  padding: 8px 4px 4px;
}

.offer-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.1);
  font-size: 24px;
  color: var(--color-primary, #696cff);
}

.offer-card__title {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 800;
  color: var(--color-text-primary, #384551);
  line-height: 1.25;
}

.offer-card__body {
  margin: 0 auto 24px;
  max-width: 360px;
  font-size: 14.5px;
  color: var(--color-text-secondary, #6c757d);
  line-height: 1.6;
}

/* Price comparison */
.offer-prices {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
}

.offer-price {
  padding: 16px 24px;
  border-radius: 12px;
  text-align: center;
}

.offer-price-box {
  flex: 1;
  max-width: 180px;
  padding: 16px 20px;
  border-radius: 12px;
  text-align: center;
}

.offer-price-box--old {
  background: var(--color-bg, #FAFAF8);
  border: 1px solid var(--color-border, #e5e7eb);
}

.offer-price-box--old .offer-price-box__label {
  margin-bottom: 6px;
}

.offer-price-box--old .offer-price-box__amount {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-secondary, #6c757d);
  text-decoration: line-through;
  opacity: 0.5;
}

.offer-price-box--new {
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.06);
  border: 2px solid var(--color-primary, #696cff);
}

.offer-price-box--new .offer-price-box__label {
  margin-bottom: 6px;
  color: var(--color-primary, #696cff);
  font-weight: 600;
}

.offer-price-box--new .offer-price-box__amount {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary, #696cff);
}

.offer-price-box__label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--color-text-secondary, #6c757d);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.offer-price-box__badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 12px;
  border-radius: 20px;
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.12);
  color: var(--color-primary, #696cff);
  font-size: 12px;
  font-weight: 700;
}

/* Detail line (discount summary text) */
.offer-card__detail {
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary, #696cff);
  text-align: center;
}

/* Buttons inside offer card — spacing between them */
.offer-card .cancel-btn--primary {
  margin-bottom: 8px;
}

.offer-card .cancel-btn--text {
  margin-top: 4px;
}

/* Pause duration picker */
.offer-pause-opts {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 8px 0 24px;
}

.offer-pause-opt {
  flex: 1;
  max-width: 130px;
  padding: 14px 10px;
  border: 1.5px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  background: var(--color-card, #fff);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.offer-pause-opt:hover {
  border-color: var(--color-primary, #696cff);
}

.offer-pause-opt.is-selected {
  border-color: var(--color-primary, #696cff);
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.06);
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb, 105, 108, 255), 0.12);
}

.offer-pause-opt:focus-visible {
  outline: 2px solid var(--color-primary, #696cff);
  outline-offset: 2px;
}

.offer-pause-opt__num {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text-primary, #384551);
  line-height: 1.2;
}

.offer-pause-opt__label {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--color-text-secondary, #6c757d);
}

/* --------------------------------------------------------------------------
   7. Stats grid — "what you'll lose"
   -------------------------------------------------------------------------- */

.cancel-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.cancel-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  background: var(--color-card, #fff);
  text-align: center;
}

.cancel-stat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.08);
  font-size: 20px;
  color: var(--color-primary, #696cff);
}

.cancel-stat__number {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary, #696cff);
  line-height: 1.1;
}

.cancel-stat__label {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-secondary, #6c757d);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   8. Warning box
   -------------------------------------------------------------------------- */

.cancel-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 171, 0, 0.08);
  border: 1px solid rgba(255, 171, 0, 0.2);
  margin: 16px 0;
}

.cancel-warning__icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1.4;
}

.cancel-warning__text {
  margin: 0;
  font-size: 13px;
  color: #a67200;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   9. Result states — canceled + saved
   -------------------------------------------------------------------------- */

/* Canceled — muted, neutral */
.cancel-result--canceled {
  text-align: center;
  padding: 32px 16px;
}

.cancel-result--canceled .cancel-result__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-bg, #FAFAF8);
  font-size: 24px;
  color: var(--color-text-secondary, #6c757d);
}

.cancel-result--canceled .cancel-result__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary, #384551);
}

.cancel-result--canceled .cancel-result__body {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--color-text-secondary, #6c757d);
  line-height: 1.6;
}

.cancel-result__note {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--color-text-secondary, #6c757d);
  opacity: 0.8;
  line-height: 1.5;
}

/* Saved — celebratory, purple */
.cancel-result--saved {
  text-align: center;
  padding: 32px 16px;
}

.cancel-result--saved .cancel-result__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.1);
  animation: cancel-saved-pop 0.4s ease 0.1s both;
}

.cancel-result__checkmark svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-primary, #696cff);
  stroke-width: 2.5;
  fill: none;
}

/* Checkmark draw-in animation */
.cancel-result__checkmark svg .checkmark-path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: cancel-checkmark-draw 0.5s ease 0.3s forwards;
}

@keyframes cancel-saved-pop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cancel-checkmark-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.cancel-result--saved .cancel-result__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text-primary, #384551);
}

.cancel-result--saved .cancel-result__body {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-secondary, #6c757d);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   10. Buttons
   -------------------------------------------------------------------------- */

.cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.cancel-btn:active {
  transform: scale(0.98);
}

.cancel-btn:focus-visible {
  outline: 2px solid var(--color-primary, #696cff);
  outline-offset: 2px;
}

/* Primary — edition-colored solid */
.cancel-btn--primary {
  background: var(--color-primary, #696cff);
  color: #fff;
}

.cancel-btn--primary:hover {
  background: var(--color-primary-hover, #5a5ee0);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb, 105, 108, 255), 0.3);
}

/* Ensure hidden attribute works even with explicit display */
.cancel-btn[hidden] {
  display: none;
}

/* Ghost — transparent, muted text */
.cancel-btn--ghost {
  background: transparent;
  color: var(--color-text-secondary, #6c757d);
}

.cancel-btn--ghost:hover {
  background: var(--color-bg, #FAFAF8);
  color: var(--color-text-primary, #384551);
}

/* Destructive — red text, fills red on hover */
.cancel-btn--destructive {
  background: transparent;
  color: #dc3545;
}

.cancel-btn--destructive:hover {
  background: #dc3545;
  color: #fff;
}

/* Text button — minimal, underline on hover */
.cancel-btn--text {
  background: none;
  border: none;
  color: var(--color-text-secondary, #6c757d);
  font-size: 14px;
  font-weight: 600;
  min-height: auto;
  padding: 4px 8px;
  width: auto;
}

.cancel-btn--text:hover {
  text-decoration: underline;
  color: var(--color-text-primary, #384551);
}

/* Loading spinner state */
.cancel-btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.cancel-btn.is-loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: cancel-btn-spin 0.6s linear infinite;
}

@keyframes cancel-btn-spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.cancel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--color-border, #e5e7eb);
}

/* When only one button, push it to the right */
.cancel-footer--end {
  justify-content: flex-end;
}

/* Footer buttons should not be full-width */
.cancel-footer .cancel-btn {
  width: auto;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   12. Dark mode
   -------------------------------------------------------------------------- */

[data-theme="dark"] .cancel-overlay {
  background: rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .cancel-modal {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .cancel-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Reason cards in dark mode */
[data-theme="dark"] .reason-card {
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .reason-card:hover {
  border-color: var(--color-primary, #696cff);
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb, 105, 108, 255), 0.15);
}

[data-theme="dark"] .reason-card.is-selected {
  border-color: var(--color-primary, #696cff);
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.1);
}

[data-theme="dark"] .reason-card__radio {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Textarea dark mode */
[data-theme="dark"] .reason-other__textarea {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .reason-other__textarea:focus {
  border-color: var(--color-primary, #696cff);
}

/* Stat cards dark mode */
[data-theme="dark"] .cancel-stat {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .cancel-stat__icon {
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.15);
}

/* Offer cards dark mode */
[data-theme="dark"] .offer-price-box--old {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .offer-price-box--new {
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.1);
}

[data-theme="dark"] .offer-pause-opt {
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .offer-pause-opt.is-selected {
  border-color: var(--color-primary, #696cff);
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.1);
}

/* Warning box dark mode — deeper amber tones */
[data-theme="dark"] .cancel-warning {
  background: rgba(255, 171, 0, 0.12);
  border-color: rgba(255, 171, 0, 0.25);
}

[data-theme="dark"] .cancel-warning__text {
  color: #f0c040;
}

/* Result states dark mode */
[data-theme="dark"] .cancel-result--canceled .cancel-result__icon {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .cancel-result--saved .cancel-result__icon {
  background: rgba(var(--color-primary-rgb, 105, 108, 255), 0.15);
}

/* Button dark mode tweaks */
[data-theme="dark"] .cancel-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .cancel-btn--destructive:hover {
  background: #dc3545;
  color: #fff;
}

/* Footer border dark mode */
[data-theme="dark"] .cancel-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   13. Responsive — under 480px
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  .cancel-modal {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }

  .cancel-overlay {
    align-items: flex-end;
  }

  .cancel-body {
    padding: 16px;
  }

  .cancel-header {
    padding: 16px 16px 0;
  }

  .cancel-footer {
    padding: 16px;
  }

  /* Stats grid stacks to 1 column */
  .cancel-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Pause options stack vertically */
  .offer-pause-opts {
    flex-direction: column;
    align-items: stretch;
  }

  .offer-pause-opt {
    max-width: none;
  }

  /* Offer card reduced padding */
  .offer-card {
    padding: 4px 0 0;
  }

  .offer-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
  }

  .offer-card__title {
    font-size: 19px;
  }

  .offer-card__body {
    font-size: 14px;
    margin-bottom: 20px;
  }

  /* Price boxes stack vertically on small screens */
  .offer-prices {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .offer-price-box {
    max-width: 200px;
    width: 100%;
  }

  .offer-price {
    padding: 12px 16px;
  }

  /* Step titles scale down slightly */
  .cancel-title {
    font-size: 18px;
  }

  /* Result states tighter padding */
  .cancel-result--canceled,
  .cancel-result--saved {
    padding: 24px 12px;
  }
}

/* --------------------------------------------------------------------------
   14. prefers-reduced-motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .cancel-overlay,
  .cancel-modal,
  .cancel-step,
  .cancel-step.is-active,
  .cancel-step.is-exiting-left,
  .cancel-step.is-exiting-right,
  .cancel-step.is-entering-left,
  .reason-card,
  .cancel-result--saved .cancel-result__icon,
  .cancel-result__checkmark svg .checkmark-path,
  .cancel-btn,
  .cancel-dot,
  .reason-other,
  .reason-card,
  .offer-pause-opt,
  .cancel-close {
    animation: none;
    transition: none;
  }

  /* Ensure elements are visible without animation */
  .cancel-overlay {
    opacity: 1;
  }

  .cancel-modal {
    opacity: 1;
    transform: none;
  }

  .reason-card {
    opacity: 1;
    transform: none;
  }

  .cancel-result--saved .cancel-result__icon {
    opacity: 1;
    transform: none;
  }

  .cancel-result__checkmark svg .checkmark-path {
    stroke-dashoffset: 0;
  }

  .reason-other.is-visible {
    max-height: 200px;
    opacity: 1;
  }
}
