/* DropKey storefront, checkout and order confirmation.
   Colours and fonts follow the active theme's tokens when it defines them
   (--accent, --text-primary, ...), with neutral fallbacks for other themes. */
.dk2-store,.dk2-checkout,.dk2-order-confirmation,.dk2-account {
	--dk2-accent: var(--accent, #C84B20);
	--dk2-accent-hover: var(--accent-hover, #AF3E17);
	--dk2-accent-subtle: var(--accent-subtle, #FCF4EE);
	--dk2-accent-border: var(--accent-border, #F3D2C2);
	--dk2-text: var(--text-primary, #151618);
	--dk2-text-2: var(--text-secondary, #50545F);
	--dk2-text-3: var(--text-tertiary, #7D818D);
	--dk2-surface: var(--bg-surface, #FFFFFF);
	--dk2-subtle: var(--bg-subtle, #F3F1EC);
	--dk2-surface-muted: var(--bg-surface-muted, #F8F7F3);
	--dk2-border: var(--border-subtle, #E6E4DD);
	--dk2-border-2: var(--border-medium, #D5D2C8);
	--dk2-success: var(--success-text, #166534);
	--dk2-success-bg: var(--success-bg, #DCFCE7);
	--dk2-danger: var(--danger-text, #991B1B);
	--dk2-danger-bg: var(--danger-bg, #FEE2E2);
	--dk2-danger-border: var(--danger-border, #FECACA);
	--dk2-warn: #92400E;
	--dk2-warn-bg: #FEF3C7;
	--dk2-mono: var(--font-mono, SFMono-Regular, Menlo, Consolas, monospace);
	--dk2-radius: 14px;
	--dk2-shadow: 0 1px 2px rgba(21,22,24,.04), 0 8px 24px rgba(21,22,24,.06);
	--dk2-focus: 0 0 0 3px color-mix(in srgb, var(--dk2-accent) 22%, transparent);
	color: var(--dk2-text);
	font-family: inherit;
	box-sizing: border-box;
}
.dk2-store *,.dk2-checkout *,.dk2-order-confirmation *,.dk2-account * { box-sizing: border-box; }
.dk2-icon { flex: none; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.dk2-eyebrow,.dk2-store-eyebrow,.dk2-order-confirmation p.dk2-eyebrow,.dk2-checkout p.dk2-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px !important; color: var(--dk2-accent) !important; font-size: 12px !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dk2-muted,.dk2-order-confirmation p.dk2-muted { margin: 0; color: var(--dk2-text-3); font-size: 15px; line-height: 1.5; }
.dk2-mono { font-family: var(--dk2-mono); font-size: .92em; }
[hidden] { display: none !important; }

/* Buttons */
.dk2-button,.dk2-store-order-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: 10px;
	background: var(--dk2-accent); color: #fff !important; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2;
	text-decoration: none !important; cursor: pointer; transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.dk2-button:hover,.dk2-store-order-button:hover { background: var(--dk2-accent-hover); }
.dk2-button:active { transform: translateY(1px); }
.dk2-button:focus-visible,.dk2-store-order-button:focus-visible { outline: none; box-shadow: var(--dk2-focus); }
.dk2-button:disabled,.dk2-store-order-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.dk2-button-secondary { background: var(--dk2-surface); color: var(--dk2-text) !important; border-color: var(--dk2-border-2); }
.dk2-button-secondary:hover { background: var(--dk2-subtle); }
.dk2-button-lg { width: 100%; min-height: 56px; font-size: 16px; border-radius: 12px; }
.dk2-button.is-busy { opacity: .8; cursor: progress; }

/* Notices */
.dk2-store-notice,.dk2-store-empty { grid-column: 1/-1; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--dk2-border); border-radius: 12px; background: var(--dk2-surface); color: var(--dk2-text-2); line-height: 1.55; }
.dk2-store-notice strong { display: block; margin-bottom: 2px; color: var(--dk2-text); }
.dk2-store-success { background: var(--dk2-success-bg); border-color: color-mix(in srgb, var(--dk2-success) 25%, transparent); }
.dk2-store-error { background: var(--dk2-danger-bg); border-color: var(--dk2-danger-border); color: var(--dk2-danger); }
.dk2-store-error .dk2-icon { margin-top: 2px; }
.dk2-checkout .dk2-store-unavailable { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--dk2-danger-bg); color: var(--dk2-danger) !important; font-size: 14px; }

/* ---------- Store grid ---------- */
.dk2-store { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; margin: 24px 0; }
.dk2-store-card { display: flex; flex-direction: column; gap: 18px; padding: 24px; border: 1px solid var(--dk2-border); border-radius: var(--dk2-radius); background: var(--dk2-surface); box-shadow: var(--dk2-shadow); }
.dk2-store-card h3 { margin: 0 0 8px; color: var(--dk2-text); font-size: 22px; line-height: 1.25; }
.dk2-store .dk2-store-card p { margin: 0; color: var(--dk2-text-2); font-size: 15px; line-height: 1.6; }
.dk2-store-limit { padding-top: 12px; margin-top: 12px !important; border-top: 1px solid var(--dk2-border); color: var(--dk2-text-3) !important; font-size: 13px !important; }
.dk2-store-card .dk2-store-order-button { margin-top: auto; width: 100%; }

/* ---------- Checkout ---------- */
.dk2-checkout {
	display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(20px, 3vw, 40px);
	align-items: start; max-width: 1120px; margin: 8px auto 48px; font-size: 15px; line-height: 1.5;
}
.dk2-checkout-intro { margin-bottom: 20px; }
.dk2-checkout .dk2-checkout-lead { margin: 0; color: var(--dk2-text-2); font-size: 16px; }
.dk2-checkout-main > .dk2-store-notice { margin-bottom: 20px; }
.dk2-checkout-form { display: grid; gap: 16px; margin: 0; }

.dk2-step { margin: 0; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--dk2-border); border-radius: var(--dk2-radius); background: var(--dk2-surface); box-shadow: var(--dk2-shadow); min-width: 0; }
.dk2-step legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 0; color: var(--dk2-text); font-size: 18px; font-weight: 700; line-height: 1.3; }
.dk2-step legend + * { clear: both; }
.dk2-step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--dk2-accent-subtle); border: 1px solid var(--dk2-accent-border); color: var(--dk2-accent); font-size: 14px; font-weight: 800; }

/* Fields */
.dk2-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dk2-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; }
.dk2-field-full { grid-column: 1 / -1; }
.dk2-checkout .dk2-field label { display: block; margin: 0; color: var(--dk2-text); font-size: 14px; font-weight: 600; line-height: 1.3; }
.dk2-checkout .dk2-field input,.dk2-checkout .dk2-field select {
	display: block; width: 100%; max-width: 100%; min-height: 48px; margin: 0; padding: 11px 14px;
	border: 1px solid var(--dk2-border-2); border-radius: 10px; background-color: var(--dk2-surface); color: var(--dk2-text);
	font: inherit; font-size: 16px; /* 16px stops iOS zooming into fields */ font-weight: 400; line-height: 1.4;
	box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; -webkit-appearance: none; appearance: none;
}
.dk2-checkout .dk2-field select {
	padding-right: 42px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237D818D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.dk2-checkout .dk2-field input:hover,.dk2-checkout .dk2-field select:hover { border-color: var(--border-strong, #A8A498); }
.dk2-checkout .dk2-field input:focus,.dk2-checkout .dk2-field select:focus { outline: none; border-color: var(--dk2-accent); box-shadow: var(--dk2-focus); }
.dk2-checkout .dk2-field input:user-invalid,.dk2-checkout .dk2-field select:user-invalid { border-color: var(--dk2-danger); }
.dk2-checkout .dk2-hint { margin: 0; color: var(--dk2-text-3); font-size: 13px; line-height: 1.45; }

/* Plan + payment choice cards */
.dk2-plans,.dk2-payment-options { display: grid; gap: 10px; }
.dk2-plan,.dk2-payment-option { position: relative; display: block; margin: 0; cursor: pointer; }
.dk2-plan > input,.dk2-payment-option > input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.dk2-plan-body,.dk2-payment-option {
	display: flex; align-items: center; gap: 14px; padding: 16px 18px;
	border: 1.5px solid var(--dk2-border); border-radius: 12px; background: var(--dk2-surface);
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.dk2-plan:hover .dk2-plan-body,.dk2-payment-option:hover { border-color: var(--dk2-border-2); }
.dk2-plan > input:checked + .dk2-plan-body,.dk2-payment-option:has(> input:checked) { border-color: var(--dk2-accent); background: var(--dk2-accent-subtle); }
.dk2-plan > input:focus-visible + .dk2-plan-body,.dk2-payment-option:has(> input:focus-visible) { box-shadow: var(--dk2-focus); }
.dk2-plan-radio { flex: none; width: 20px; height: 20px; border: 2px solid var(--dk2-border-2); border-radius: 50%; background: var(--dk2-surface); transition: border .15s ease; }
.dk2-plan > input:checked + .dk2-plan-body .dk2-plan-radio,.dk2-payment-option > input:checked ~ .dk2-plan-radio { border: 6px solid var(--dk2-accent); }
.dk2-plan-text,.dk2-payment-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dk2-plan-text strong,.dk2-payment-text strong { color: var(--dk2-text); font-size: 16px; font-weight: 700; }
.dk2-plan-text small,.dk2-payment-text small { color: var(--dk2-text-2); font-size: 13px; line-height: 1.45; }
.dk2-plan-price { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.dk2-plan-price strong { color: var(--dk2-text); font-size: 18px; font-weight: 800; white-space: nowrap; }
.dk2-plan-price small { color: var(--dk2-text-3); font-size: 12px; white-space: nowrap; }
.dk2-payment-mark { flex: none; padding: 5px 10px; border: 1px solid var(--dk2-border); border-radius: 6px; background: var(--dk2-surface); color: var(--dk2-text-2); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.dk2-payment-mark.dk2-paypal { color: #003087; font-style: italic; }
.dk2-free-note { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--dk2-success-bg); color: var(--dk2-success); font-weight: 600; }

/* Submit */
.dk2-submit-row { display: grid; gap: 12px; margin-top: 4px; }
.dk2-checkout .dk2-checkout-secure { display: flex; gap: 8px; align-items: flex-start; justify-content: center; margin: 0; color: var(--dk2-text-3); font-size: 13px; line-height: 1.5; text-align: left; }
.dk2-checkout-secure .dk2-icon { margin-top: 1px; color: var(--dk2-success); }

/* Order summary */
.dk2-order-summary { position: sticky; top: calc(var(--header-h, 0px) + 24px); padding: 24px; border: 1px solid var(--dk2-border); border-radius: var(--dk2-radius); background: var(--dk2-surface-muted); }
.dk2-order-summary h3 { margin: 0 0 18px; color: var(--dk2-text); font-size: 17px; font-weight: 700; }
.dk2-summary-product { display: flex; gap: 14px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--dk2-border); }
.dk2-summary-logo { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--dk2-accent); color: #fff; font-size: 20px; font-weight: 800; }
.dk2-summary-product strong { display: block; color: var(--dk2-text); font-size: 16px; line-height: 1.3; }
.dk2-summary-product div span { color: var(--dk2-text-2); font-size: 14px; }
.dk2-summary-lines { display: grid; gap: 10px; margin: 18px 0 0; }
.dk2-summary-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.dk2-summary-lines dt { color: var(--dk2-text-2); font-weight: 400; }
.dk2-summary-lines dd { margin: 0; color: var(--dk2-text); font-weight: 600; }
.dk2-summary-total { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--dk2-border); align-items: baseline; }
.dk2-summary-total dt { color: var(--dk2-text) !important; font-weight: 700 !important; }
.dk2-summary-total dd { font-size: 24px; font-weight: 800 !important; }
.dk2-checkout .dk2-summary-renew { margin: 10px 0 0; color: var(--dk2-text-3); font-size: 13px; }
.dk2-summary-perks { display: grid; gap: 10px; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--dk2-border); list-style: none; }
.dk2-summary-perks li { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--dk2-text-2); font-size: 14px; line-height: 1.45; }
.dk2-summary-perks .dk2-icon { margin-top: 1px; color: var(--dk2-accent); }

/* ---------- Order confirmation ---------- */
.dk2-order-confirmation { display: grid; gap: 16px; max-width: 720px; margin: 8px auto 48px; font-size: 15px; line-height: 1.55; }
.dk2-confirm-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: clamp(28px, 5vw, 44px) clamp(20px, 4vw, 40px); border: 1px solid var(--dk2-border); border-radius: var(--dk2-radius); background: var(--dk2-surface); box-shadow: var(--dk2-shadow); text-align: center; }
.dk2-confirm-badge { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 50%; }
.dk2-confirm-badge .dk2-icon { width: 32px; height: 32px; stroke-width: 2.5; }
.dk2-state-success .dk2-confirm-badge { background: var(--dk2-success-bg); color: var(--dk2-success); animation: dk2-pop .45s cubic-bezier(.2,.9,.3,1.3) both; }
.dk2-state-pending .dk2-confirm-badge { background: var(--dk2-warn-bg); color: var(--dk2-warn); }
.dk2-state-error .dk2-confirm-badge { background: var(--dk2-danger-bg); color: var(--dk2-danger); }
.dk2-confirm-hero h2 { margin: 0; color: var(--dk2-text); font-size: clamp(22px, 1.2rem + 1.4vw, 30px); line-height: 1.2; letter-spacing: -.01em; }
.dk2-order-confirmation .dk2-confirm-hero p:not(.dk2-eyebrow) { max-width: 520px; margin: 8px 0 0; color: var(--dk2-text-2); font-size: 16px; }
.dk2-confirm-hero .dk2-button { margin-top: 18px; }
.dk2-confirm-card { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--dk2-border); border-radius: var(--dk2-radius); background: var(--dk2-surface); box-shadow: var(--dk2-shadow); }
.dk2-confirm-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--dk2-text); font-size: 18px; }
.dk2-confirm-card h3 .dk2-icon { color: var(--dk2-accent); }
.dk2-confirm-card > .dk2-button { margin-top: 20px; }
.dk2-confirm-product { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--dk2-border); }
.dk2-order-confirmation .dk2-confirm-product p { margin: 0; }
.dk2-order-confirmation .dk2-confirm-product-name { color: var(--dk2-text); font-size: 18px; font-weight: 700; }
.dk2-order-confirmation .dk2-confirm-amount { flex: none; color: var(--dk2-text); font-size: 22px; font-weight: 800; white-space: nowrap; }
.dk2-confirm-amount span { margin-left: 4px; color: var(--dk2-text-3); font-size: 14px; font-weight: 500; }
.dk2-order-details { display: grid; margin: 0; }
.dk2-order-details > div { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--dk2-border); }
.dk2-order-details > div:last-child { border-bottom: 0; padding-bottom: 0; }
.dk2-order-details dt { color: var(--dk2-text-2); font-size: 14px; font-weight: 400; }
.dk2-order-details dd { margin: 0; min-width: 0; color: var(--dk2-text); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.dk2-order-details-compact { margin-top: 14px; }
.dk2-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.dk2-pill-success { background: var(--dk2-success-bg); color: var(--dk2-success); }
.dk2-pill-pending { background: var(--dk2-warn-bg); color: var(--dk2-warn); }
.dk2-pill-error { background: var(--dk2-danger-bg); color: var(--dk2-danger); }
.dk2-license-key { display: flex; align-items: stretch; gap: 8px; }
.dk2-license-key code { flex: 1; min-width: 0; display: flex; align-items: center; padding: 12px 14px; border: 1px dashed var(--dk2-accent-border); border-radius: 10px; background: var(--dk2-accent-subtle); color: var(--dk2-text); font-family: var(--dk2-mono); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; white-space: normal; }
.dk2-copy { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; min-height: 48px; border: 1px solid var(--dk2-border-2); border-radius: 10px; background: var(--dk2-surface); color: var(--dk2-text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.dk2-copy:hover { background: var(--dk2-subtle); }
.dk2-copy:focus-visible { outline: none; box-shadow: var(--dk2-focus); }
.dk2-steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.dk2-steps li { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.dk2-steps li > .dk2-icon { box-sizing: content-box; padding: 9px; border-radius: 10px; background: var(--dk2-accent-subtle); color: var(--dk2-accent); }
.dk2-steps strong { display: block; color: var(--dk2-text); font-size: 15px; }
.dk2-steps span { display: block; margin-top: 2px; color: var(--dk2-text-2); font-size: 14px; line-height: 1.5; }
@keyframes dk2-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dk2-state-success .dk2-confirm-badge { animation: none; } .dk2-button,.dk2-plan-body,.dk2-payment-option { transition: none; } }

/* ---------- Customer account (shared pieces) ---------- */
.dk2-account { max-width: 980px; margin: 28px auto; }
.dk2-account h2,.dk2-account h3 { color: var(--dk2-text); }
.dk2-account-card { margin: 14px 0; padding: 20px; border: 1px solid var(--dk2-border); border-radius: 12px; background: var(--dk2-surface); }
.dk2-account-card h4 { margin: 0 0 12px; color: var(--dk2-text); font-size: 17px; }
.dk2-account-card p { line-height: 1.65; overflow-wrap: anywhere; }
.dk2-account-card code { overflow-wrap: anywhere; white-space: normal; }
.dk2-account-table { overflow-x: auto; }
.dk2-account-table table { width: 100%; border-collapse: collapse; background: var(--dk2-surface); }
.dk2-account-table th,.dk2-account-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--dk2-border); font-size: 13px; }
.dk2-account-table th { color: var(--dk2-text-2); background: var(--dk2-surface-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.dk2-checkout { grid-template-columns: minmax(0, 1fr); max-width: 680px; }
	/* Summary first on tablets/phones so buyers see what they pay before filling the form. */
	.dk2-order-summary { position: static; order: -1; padding: 18px; }
	.dk2-order-summary h3 { display: none; }
	.dk2-summary-perks { display: none; }
	.dk2-summary-lines > div:first-child { display: none; }
	.dk2-summary-total { margin-top: 0; padding-top: 0; border-top: 0; }
	.dk2-summary-lines { margin-top: 14px; }
}
@media (max-width: 560px) {
	.dk2-checkout { font-size: 15px; margin-bottom: 32px; }
	.dk2-field-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.dk2-step { border-radius: 12px; }
	.dk2-step legend { font-size: 17px; margin-bottom: 14px; }
	.dk2-plan-body,.dk2-payment-option { padding: 14px; gap: 12px; }
	.dk2-plan-price strong { font-size: 16px; }
	.dk2-payment-mark { display: none; }
	.dk2-store-card { padding: 18px; }
	.dk2-confirm-product { flex-direction: column; align-items: flex-start; gap: 6px; }
	.dk2-order-details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.dk2-license-key { flex-direction: column; }
	.dk2-copy { justify-content: center; }
	.dk2-account-card { padding: 16px; }
}

/* ---------- Order confirmation: wide-screen layout ---------- */
.dk2-confirm-main,.dk2-confirm-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 900px) {
	.dk2-confirm-hero { flex-direction: row; align-items: center; gap: 24px; text-align: left; }
	.dk2-confirm-badge { margin-bottom: 0; flex: none; }
	.dk2-confirm-hero-text { flex: 1; min-width: 0; }
	.dk2-order-confirmation .dk2-confirm-hero p:not(.dk2-eyebrow) { max-width: 640px; }
	.dk2-order-confirmation.dk2-has-side { max-width: 1160px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
	.dk2-order-confirmation.dk2-has-side .dk2-confirm-hero { grid-column: 1 / -1; }
}
