/*!
 * OnePageCheckout Pro for WooCommerce — pro front-end styles.
 * Loaded after the core checkout stylesheet (handle 'opcw-checkout') as
 * 'opcw-pro' on the takeover checkout (classic + Block Mode) and thank-you
 * pages, only while pro is licensed. Same --opcw-* tokens as the core file;
 * the generic renderers (offer card, perks panel, summary progress) stay in
 * assets/css/checkout.css.
 */

/* ---------- design presets (body class opcw-skin-*, OPCW_Design) ---------- */
body.opcw-skin-minimal .opcw-section__head .opcw-kicker { display: none; }
body.opcw-skin-minimal .opcw-options, body.opcw-skin-minimal #payment ul.wc_payment_methods { box-shadow: none; }
body.opcw-skin-bold .opcw-h2 { font-size: 22px; letter-spacing: -.02em; }
body.opcw-skin-bold .opcw-btn-primary { height: 62px; font-size: 17px; }
body.opcw-skin-classic { --opcw-bg: #fff; }
body.opcw-skin-classic .opcw-summary { background: #fafafa; }

/* ---------- thank-you: progress tracker (opcw_thankyou_after_hero) ---------- */
.opcw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 30px; }
.opcw-step { border: 1px solid var(--opcw-line); border-radius: var(--opcw-radius-sm); background: var(--opcw-surface);
	padding: 12px 14px; box-shadow: var(--opcw-shadow); }
/* The bar follows the corner radius: 2px at the default radius, square on sharp corners. */
.opcw-step__bar { display: block; height: 3px; border-radius: min(2px, var(--opcw-radius-sm)); background: var(--opcw-line); margin-bottom: 10px; }
.opcw-step.is-done .opcw-step__bar, .opcw-step.is-now .opcw-step__bar { background: var(--opcw-success); }
.opcw-step__k { display: block; font-family: var(--opcw-font-mono); font-size: 10px; letter-spacing: .1em;
	text-transform: uppercase; color: var(--opcw-faint); min-height: 1.2em; }
.opcw-step__t { display: block; font-size: 13px; font-weight: 600; color: var(--opcw-ink); margin-top: 2px; }
/* A later step reads quieter through colour, not opacity: the grey bar already says
   "later", the title takes --opcw-muted (5.1:1 on the card; opacity .55 left the 13px
   title at 4.0:1 and the kicker at 2.2:1, below AA). */
.opcw-step.is-later { box-shadow: none; }
.opcw-step.is-later .opcw-step__t { color: var(--opcw-muted); }
@media (max-width: 560px) { .opcw-steps { grid-template-columns: 1fr; } }

/* ---------- thank-you: "what happens next" (opcw_thankyou_after_hero, after the tracker) ----------
   A section like "Order details" (same .opcw-section__head + .opcw-h2), but open rows instead of
   cards: the tracker above and the details grid below are both boxed, so this one breathes. */
.opcw-ty__next-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.opcw-ty__next-item { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.opcw-ty__next-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--opcw-accent);
	background: var(--opcw-bg-summary); background: color-mix(in srgb, var(--opcw-accent) 8%, var(--opcw-surface)); }
.opcw-ty__next-icon svg { width: 18px; height: 18px; }
.opcw-ty__next-body { min-width: 0; padding-top: 2px; }
.opcw-ty__next-title { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--opcw-ink); }
.opcw-ty__next-text { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--opcw-muted); }
@media (max-width: 560px) { .opcw-ty__next-list { grid-template-columns: minmax(0, 1fr); gap: 14px; } }

/* ---------- legal dialog: terms / privacy / imprint / contact (4.2, OPCW_Legal + legal.js) ----------
   One native <dialog> per kind, appended to <body> (never inside form.checkout).
   Desktop: a centred 760 × 84vh reader card; below 600 px a full-screen reader
   (contact: a bottom sheet). The head buttons share the back-link idiom
   (36 px, line border, muted → ink). The shadow / backdrop literals mirror the
   autocomplete dropdown's rgba(20, 22, 26, …). */
body.opcw-dialog-open { overflow: hidden; }
.opcw-dialog { width: min(760px, calc(100vw - 48px)); height: min(84vh, 900px); max-width: none; max-height: none; margin: auto; padding: 0;
	border: 1px solid var(--opcw-line); border-radius: var(--opcw-radius); background: var(--opcw-surface); color: var(--opcw-text);
	box-shadow: 0 24px 64px rgba(20, 22, 26, .22); display: flex; flex-direction: column; overflow: hidden;
	opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease, overlay .18s allow-discrete, display .18s allow-discrete; }
.opcw-dialog:not([open]) { display: none; }
.opcw-dialog[open] { opacity: 1; transform: none; }
@starting-style { .opcw-dialog[open] { opacity: 0; transform: translateY(8px); } }
.opcw-dialog::backdrop { background: rgba(20, 22, 26, .45); }
.opcw-dialog__head { display: flex; align-items: center; gap: 10px; height: 56px; flex: none; padding-block: 0; padding-inline: 20px 12px;
	border-bottom: 1px solid var(--opcw-line); }
.opcw-dialog__title { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--opcw-font-display); font-weight: var(--opcw-fw-display); font-size: 15px;
	line-height: 1.3; letter-spacing: -.01em; color: var(--opcw-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opcw-dialog__title:focus { outline: none; }
.opcw-dialog__actions { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.opcw .opcw-dialog__btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; min-width: 36px; margin: 0; padding: 0 12px;
	border: 1px solid var(--opcw-line); border-radius: var(--opcw-radius-sm); background: var(--opcw-surface); color: var(--opcw-muted);
	font-size: 13px; font-weight: 600; line-height: 1; text-decoration: none; box-shadow: none; cursor: pointer; transition: color .12s, border-color .12s; }
.opcw .opcw-dialog__btn:hover { color: var(--opcw-ink); border-color: var(--opcw-line-strong); }
.opcw .opcw-dialog__btn--icon { width: 36px; padding: 0; }
.opcw .opcw-dialog__btn svg { width: 15px; height: 15px; flex: none; }
.opcw-dialog__body { flex: 1 1 auto; min-height: 0; background: var(--opcw-surface); }
.opcw-dialog__frame { display: block; width: 100%; height: 100%; border: 0; background: var(--opcw-surface); }
/* Contact: fit-content, not auto — a modal dialog has the UA's inset: 0, and an
   absolutely positioned box with height: auto would stretch to fill it. */
.opcw-dialog--contact { width: min(440px, calc(100vw - 48px)); height: fit-content; max-height: min(84vh, 900px); } /* a compact card: three short rows, not the reader's 760px */
.opcw-contact { display: grid; gap: 16px; padding: 22px 20px 24px; overflow: auto; }
.opcw-contact__intro { margin: 0 0 2px; font-size: 14px; line-height: 1.55; color: var(--opcw-text); }
.opcw-contact__row { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; line-height: 1.4; }
.opcw-contact__row svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--opcw-accent); }
.opcw-contact__k { display: block; margin-bottom: 1px; font-size: 12px; color: var(--opcw-muted); }
.opcw-contact__v { color: var(--opcw-ink); font-weight: 500; overflow-wrap: anywhere; }
.opcw .opcw-contact__row a { color: var(--opcw-ink); }
@media (max-width: 599px) {
	.opcw-dialog, .opcw-dialog--contact { width: 100%; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; transform: translateY(12px); }
	.opcw-dialog--contact { inset: auto 0 0 0; height: fit-content; max-height: 100vh; max-height: 100dvh; margin: 0;
		border-radius: var(--opcw-radius) var(--opcw-radius) 0 0; }
	.opcw-dialog__head { padding-inline: 20px 10px; }
	.opcw .opcw-dialog__btn span { display: none; }
	.opcw .opcw-dialog__btn { width: 36px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.opcw-dialog, .opcw .opcw-dialog__btn { transition: none; }
	.opcw-dialog, .opcw-dialog[open] { transform: none; }
}
