/* Checkout dialog: plan summary on the left, consents on the right.
   Original neutral palette; type is 20% larger than the base dialog, and on
   desktop the whole dialog fits on screen without scrolling. */

.checkout-consent-dialog {
  width: min(1240px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  font-size: 16.8px;
}
.checkout-consent-dialog .fm-dialog-head { align-items: center; padding: 18px 28px 16px; }
.checkout-consent-dialog .fm-dialog-head h2 { font-size: 26px; line-height: 1.25; }
.co-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
/* same accents as .account-pill.plan-accent-* in the header */
.co-plan-basic { color: #00c8ff !important; }
.co-plan-pro { color: #00ff7a !important; }
.co-plan-enterprise { color: #ff2d55 !important; }
.co-title-plan { font: 400 34px/1 "Dela Gothic One", Inter, sans-serif; letter-spacing: -.02em; color: var(--ink); }
.co-sub { display: flex; align-items: center; gap: 9px; margin: 8px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.45; }
.co-lemon-logo { display: inline-block; height: 1.1em; width: auto; margin: 0 .12em 0 .2em; vertical-align: -0.22em; }
.checkout-consent-dialog .fm-dialog-body {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(0, 1.45fr);
  gap: 32px;
  padding: 20px 28px;
}
.checkout-consent-dialog .checkout-order { padding-right: 32px; border-right: 1px solid var(--line); }

/* summary */
.co-summary { display: grid; gap: 16px; align-content: start; }
.co-summary > * { margin: 0; }
.co-panel { display: grid; gap: 12px; }
.co-panel > * { margin: 0; }
.co-change-line { color: var(--muted); font-size: 15.5px; font-weight: 600; }
.co-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.co-price strong { font: 800 46px/1 Inter, system-ui, sans-serif; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.co-price span { color: var(--muted); font-size: 15.5px; font-weight: 600; }
.co-anchor { color: var(--ink-2); font-size: 15.5px; font-weight: 600; }
.co-benefits { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.co-benefits li { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-2); font-size: 16.8px; line-height: 1.4; }
.co-benefits .co-ico { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; color: var(--ink); }
.co-trust { list-style: none; margin: 0; padding: 14px 0 0; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.co-trust li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.co-ico-wrap { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px; color: var(--ink-2); }
.co-ico-wrap svg { width: 18px; height: 18px; }
.co-summary .checkout-breakdown { margin: 0; font-size: 15.5px; }
.co-summary .checkout-breakdown .is-total dt, .co-summary .checkout-breakdown .is-total dd { font-size: 16.8px; }

/* consents */
.checkout-consent-dialog .checkout-consent-heading { font-size: 18px; }
.checkout-consent-dialog .checkout-check { grid-template-columns: 30px minmax(0, 1fr); position: relative; padding: 12px 0; font-size: 16.8px; line-height: 1.55; }
.checkout-consent-dialog .checkout-check.is-optional { font-size: 15.5px; }
.checkout-consent-dialog .checkout-check-title { margin-bottom: 4px; }
.checkout-consent-dialog .checkout-check-title strong { font-size: 16.8px; }
.checkout-consent-dialog .checkout-check-title small { font-size: 13px; }

/* "Wymagane": the same hand-drawn double underline as on the pricing page */
.co-required { position: relative; display: inline-block; color: var(--ink-2) !important; font-weight: 700; }
.co-required::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: -4%;
  top: 100%;
  width: 108%;
  height: 9px;
  background: #ff354f;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 18' preserveAspectRatio='none'%3E%3Cpath d='M8 5 Q98 1 292 6 M24 13 Q148 8 274 12' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 18' preserveAspectRatio='none'%3E%3Cpath d='M8 5 Q98 1 292 6 M24 13 Q148 8 274 12' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* animated checkmark (login-page Lottie). The native box is always visually
   hidden; until the animation is ready a CSS box drawn like its empty frame
   stands in, so nothing changes visibly when it takes over. */
.checkout-consent-dialog .checkout-check input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.checkout-consent-dialog .co-mark { display: block; position: relative; width: 30px; height: 30px; margin-top: -3px; overflow: hidden; border-radius: 8px; }
.checkout-consent-dialog .co-mark::before { content: ""; position: absolute; inset: 3px; border: 2.5px solid #78787f; border-radius: 7px; transition: background-color .2s, border-color .2s; }
.checkout-consent-dialog .checkout-check:not(.has-lottie):has(input:checked) .co-mark::before { background: #3264f0; border-color: #3264f0; }
.checkout-consent-dialog .checkout-check.has-lottie .co-mark::before { display: none; }
.checkout-consent-dialog .co-mark [data-co-check] { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; transform: translate(-50%, -50%); pointer-events: none; }
.checkout-consent-dialog .co-mark svg { width: 100% !important; height: 100% !important; display: block; }
.checkout-consent-dialog .checkout-check:has(input:focus-visible) .co-mark { outline: 2px solid var(--blue); outline-offset: 2px; }

/* footer + pay button (standard blue primary, amount shown, muted until both required consents are ticked) */
.checkout-consent-dialog .fm-dialog-footer { padding: 14px 28px; }
.checkout-consent-dialog .checkout-footer-row { flex-wrap: wrap; }
.checkout-consent-dialog .fm-dialog-hint { display: block; flex: 1 1 200px; max-width: none; font-size: 14.5px; }
.checkout-consent-dialog .btn { font-size: 16.8px; }
.checkout-consent-dialog #checkoutConsentCancel { min-height: 52px; padding-inline: 22px; }
.checkout-consent-dialog #checkoutConsentPay {
  position: relative; isolation: isolate; overflow: hidden; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 10px 24px; white-space: nowrap; font-weight: 700;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s, filter .25s, opacity .25s;
}
.checkout-consent-dialog #checkoutConsentPay > * { position: relative; z-index: 2; }
.checkout-consent-dialog #checkoutConsentPay svg { width: 20px; height: 20px; }
.co-pay-amount { padding: 2px 9px; border-radius: 7px; background: #ffffff1f; font-variant-numeric: tabular-nums; }
.checkout-consent-dialog #checkoutConsentPay:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.checkout-consent-dialog.is-ready #checkoutConsentPay:not([aria-busy]) { animation: co-wake .55s cubic-bezier(.22, 1.4, .36, 1); }
@keyframes co-wake { 0% { transform: scale(.97); } 55% { transform: scale(1.03); } 100% { transform: scale(1); } }
/* hover: the arrow flies out and comes back */
.checkout-consent-dialog #checkoutConsentPay:hover:not(:disabled) svg { animation: co-arrow .7s cubic-bezier(.22, 1, .36, 1); }
@keyframes co-arrow { 0% { transform: translateX(0); opacity: 1; } 45% { transform: translateX(14px); opacity: 0; } 46% { transform: translateX(-14px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }

/* short desktop screens: tighten spacing so nothing needs scrolling */
@media (min-width: 761px) and (max-height: 820px) {
  .checkout-consent-dialog .fm-dialog-head { padding: 12px 28px 10px; }
  .checkout-consent-dialog .fm-dialog-body { padding: 12px 28px; }
  .checkout-consent-dialog .fm-dialog-footer { padding: 10px 28px; }
  .co-panel { gap: 8px; }
  .co-summary { gap: 12px; }
  .co-benefits { gap: 6px; }
  .co-title-plan { font-size: 28px; }
  .co-price strong { font-size: 38px; }
  .checkout-consent-dialog .checkout-check { padding: 8px 0; line-height: 1.45; }
  .co-trust { gap: 4px; padding-top: 10px; }
}

@media (max-width: 760px) {
  .checkout-consent-dialog .fm-dialog-body { display: block; }
  .checkout-consent-dialog .checkout-order { padding: 0 0 18px; border-right: 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
  .checkout-consent-dialog .checkout-footer-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .checkout-consent-dialog .fm-dialog-hint { order: 0; justify-content: center; text-align: center; }
  .checkout-consent-dialog #checkoutConsentPay { order: 1; width: 100%; flex: none; padding-inline: 14px; }
  .checkout-consent-dialog #checkoutConsentCancel { order: 2; width: 100%; flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .checkout-consent-dialog #checkoutConsentPay, .checkout-consent-dialog #checkoutConsentPay svg { animation: none !important; transition: none !important; }
}

.checkout-consent-dialog .fm-dialog-body:focus { outline: none; }
