/*
 * Custom lightweight checkout + thank-you page. Uses the design tokens
 * already defined in main.css (--accent, --font-display, etc.) so it stays
 * in sync with the rest of the site automatically.
 */

svg[hidden] {
	display: none;
}

.atlas-order-page {
	padding: 60px 20px 100px;
	background: var(--bg);
}

.atlas-order-container {
	max-width: 1040px;
	margin: 0 auto;
}

.atlas-order-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 40px;
	box-shadow: 0 20px 50px rgba(28, 16, 54, 0.08);
}

.atlas-order-card--error {
	text-align: center;
	padding: 60px 40px;
	max-width: 640px;
	margin: 0 auto;
}

.atlas-order-card--error h1 {
	color: var(--text);
}

.atlas-order-card--error a {
	color: var(--accent);
	font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Two-column checkout layout                                          */
/* ------------------------------------------------------------------ */

.atlas-checkout-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: 28px;
	align-items: start;
}

.atlas-checkout-aside {
	background: linear-gradient(160deg, var(--hero-bg) 0%, #171226 55%, #0F0B1A 100%);
	color: #FFFFFF;
	border-radius: var(--radius);
	padding: 36px 32px;
	position: sticky;
	/*
	 * Roughly vertically centered on tall viewports, but never closer to the
	 * top than clears the sticky header (topbar + nav, ~112px) plus a gap.
	 * A percentage `top` on a sticky element resolves against the containing
	 * block's height, which is auto here (grid sized by content) -- that
	 * made the old `top:50%` value undefined/erratic and let the card
	 * overlap the header. `vh` is viewport-relative and always well-defined,
	 * so max() reliably picks whichever constraint is stricter.
	 * ~260px is roughly half this card's height -- it doesn't need to be
	 * exact, just close enough that the card lands near-centered instead of
	 * pixel-perfect centered.
	 */
	top: max(150px, calc(50vh - 260px));
}

.atlas-order-eyebrow {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent-hi);
	margin-bottom: 10px;
}

.atlas-checkout-aside h1 {
	font-family: var(--font-display);
	font-weight: 400;
	text-transform: uppercase;
	font-size: 26px;
	color: #FFFFFF;
	margin: 0 0 16px;
	line-height: 1.15;
}

.atlas-order-price {
	font-family: var(--font-display);
	font-size: 44px;
	color: #FFFFFF;
	margin-bottom: 26px;
	font-variant-numeric: tabular-nums;
}

.atlas-order-currency {
	font-size: 22px;
	vertical-align: top;
	position: relative;
	top: 6px;
	opacity: 0.85;
}

.atlas-order-cents {
	font-size: 26px;
	opacity: 0.85;
}

.atlas-checkout-perks {
	list-style: none;
	margin: 0 0 26px;
	padding: 22px 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	display: flex;
	flex-direction: column;
	gap: 13px;
}

.atlas-checkout-perks li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--hero-text-dim);
}

.atlas-checkout-perks svg {
	flex: none;
	width: 18px;
	height: 18px;
	color: var(--accent-hi);
}

.atlas-checkout-secure {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px 16px;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-sm);
	font-size: 13px;
	color: var(--hero-text-dim);
	line-height: 1.5;
}

.atlas-checkout-secure svg {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--accent-hi);
	margin-top: 1px;
}

/* Form panel */
.atlas-checkout-form-panel {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 36px;
	box-shadow: 0 20px 50px rgba(28, 16, 54, 0.08);
}

.atlas-order-notice {
	background: #FBEDED;
	border-left: 3px solid #b23b3b;
	color: #7a2b2b;
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 14px;
}

/* Form fields */
.atlas-order-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.atlas-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 14px;
	color: var(--text);
}

.atlas-field-input {
	position: relative;
	display: flex;
	align-items: center;
}

.atlas-field-input svg {
	position: absolute;
	left: 14px;
	width: 18px;
	height: 18px;
	color: var(--text-faint);
	pointer-events: none;
}

.atlas-field-input input {
	width: 100%;
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 15px;
	padding: 12px 14px 12px 42px;
	border: 1px solid var(--border-strong);
	border-radius: 8px;
	color: var(--text);
	box-sizing: border-box;
}

.atlas-field-input input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(124, 79, 224, 0.15);
}

.atlas-field-input input:focus ~ svg,
.atlas-field-input:focus-within svg {
	color: var(--accent);
}

/* Payment method cards */
.atlas-payment-methods {
	border: none;
	padding: 0;
	margin: 4px 0 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.atlas-payment-methods legend {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 14px;
	color: var(--text);
	padding: 0 0 8px;
}

.atlas-payment-option {
	display: block;
	border: 1px solid var(--border-strong);
	border-radius: 10px;
	padding: 14px 16px;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.atlas-payment-option:has(input:checked) {
	border-color: var(--accent);
	background: var(--accent-soft);
	box-shadow: 0 0 0 3px rgba(124, 79, 224, 0.12);
}

.atlas-payment-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.atlas-payment-option-inner {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.atlas-payment-icons {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 108px;
}

.atlas-payment-icons--card img {
	height: 22px;
	width: auto;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.atlas-payment-icons--bank svg {
	width: 28px;
	height: 28px;
	color: var(--accent);
}

.atlas-payment-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
}

.atlas-payment-name {
	font-weight: 700;
	color: var(--text);
	font-size: 15px;
}

.atlas-payment-note {
	font-size: 13px;
	color: var(--text-dim);
}

/* Submit button */
.atlas-order-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin-top: 8px;
	padding: 16px 24px;
	border: none;
	border-radius: 11px;
	background: linear-gradient(135deg, var(--accent-hi), var(--accent-lo));
	color: #FFFFFF;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
	cursor: pointer;
	transition: transform .25s ease, box-shadow .3s ease;
}

.atlas-order-submit svg {
	width: 18px;
	height: 18px;
}

.atlas-order-submit:hover {
	color: #FFFFFF;
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(124, 79, 224, 0.35);
}

.atlas-order-submit-arrow {
	font-size: 17px;
}

.atlas-order-guarantee {
	text-align: center;
	font-size: 13px;
	color: var(--text-dim);
	margin: 4px 0 0;
}

/* ------------------------------------------------------------------ */
/* Thank-you page                                                       */
/* ------------------------------------------------------------------ */

.atlas-thankyou-card {
	max-width: 640px;
	margin: 0 auto;
}

.atlas-thankyou-header {
	text-align: center;
	padding-bottom: 24px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--border);
}

.atlas-thankyou-check {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--accent);
	margin: 0 auto 16px;
}

.atlas-thankyou-check svg {
	width: 26px;
	height: 26px;
	color: #FFFFFF;
}

.atlas-thankyou-header h1 {
	font-family: var(--font-display);
	font-weight: 400;
	text-transform: uppercase;
	font-size: 26px;
	color: var(--text);
	margin: 0 0 8px;
}

.atlas-thankyou-ref {
	color: var(--text-dim);
	font-size: 14px;
	margin: 0 0 14px;
}

.atlas-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 50px;
	background: #FDF3E4;
	color: #9A6B14;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.atlas-status-pill svg {
	width: 8px;
	height: 8px;
	color: #E0A030;
}

.atlas-status-pill--paid {
	background: #E4F6EC;
	color: #1E7E4B;
}

.atlas-status-pill--paid svg {
	color: #2FAF6C;
}

.atlas-instructions-head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 20px;
}

.atlas-instructions-icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
}

.atlas-instructions-icon svg {
	width: 24px;
	height: 24px;
}

.atlas-instructions-icon--bank {
	background: var(--accent-soft);
	color: var(--accent);
}

.atlas-instructions-icon--whatsapp {
	background: #E7F8EF;
	color: #22A559;
}

.atlas-instructions-icon--paid {
	background: #E4F6EC;
	color: #1E7E4B;
}

.atlas-thankyou-instructions h2 {
	font-family: var(--font-body);
	text-transform: none;
	font-weight: 700;
	font-size: 17px;
	color: var(--text);
	margin: 0 0 6px;
}

.atlas-instructions-sub {
	color: var(--text-dim);
	font-size: 14px;
	line-height: 1.55;
	margin: 0;
}

.atlas-thankyou-instructions p {
	color: var(--text);
	line-height: 1.6;
}

/* Bank detail rows, each with its own copy button */
.atlas-bank-details {
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 14px;
}

.atlas-bank-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 16px;
	background: var(--surface);
}

.atlas-bank-row:nth-child(odd) {
	background: var(--surface-2);
}

.atlas-bank-row + .atlas-bank-row {
	border-top: 1px solid var(--border);
}

.atlas-bank-row-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.atlas-bank-label {
	font-size: 12px;
	color: var(--text-dim);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.atlas-bank-value {
	font-size: 14px;
	color: var(--text);
	font-weight: 700;
	word-break: break-word;
}

.atlas-copy-btn {
	flex: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	min-height: 38px !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 9px !important;
	border: 1px solid var(--border-strong) !important;
	background: var(--surface) !important;
	color: var(--accent) !important;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease, transform .15s ease;
}

.atlas-copy-btn svg {
	flex: none !important;
	width: 17px !important;
	height: 17px !important;
	min-width: 17px !important;
	min-height: 17px !important;
}

.atlas-copy-btn:hover {
	background: var(--accent-soft) !important;
	border-color: var(--accent) !important;
}

.atlas-copy-btn:active {
	transform: scale(0.94);
}

.atlas-copy-btn.is-copied {
	background: #E7F8EF !important;
	border-color: #22A559 !important;
	color: #22A559 !important;
}

.atlas-copy-btn:focus-visible,
.atlas-copy-all-btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.atlas-copy-all-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px;
	width: 100% !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 44px !important;
	padding: 12px 16px !important;
	margin: 0 0 18px !important;
	border: 1px dashed var(--accent) !important;
	border-radius: 10px !important;
	background: var(--surface-2) !important;
	color: var(--accent) !important;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease;
}

.atlas-copy-all-btn svg {
	flex: none !important;
	width: 17px !important;
	height: 17px !important;
	min-width: 17px !important;
	min-height: 17px !important;
}

.atlas-copy-all-btn:hover {
	background: var(--accent-soft) !important;
}

.atlas-copy-all-btn.is-copied {
	border-style: solid;
	border-color: #22A559 !important;
	color: #22A559 !important;
	background: #E7F8EF !important;
}

.atlas-instructions-footnote {
	font-size: 13px;
	color: var(--text-dim);
	line-height: 1.6;
	margin: 0;
}

.atlas-thankyou-confirmation {
	text-align: center;
	font-size: 14px;
	color: var(--text-dim);
	margin: 24px 0 20px;
}

.atlas-thankyou-home {
	display: inline-flex;
	width: auto;
	margin: 0 auto;
	padding-left: 32px;
	padding-right: 32px;
}

.atlas-copy-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translate(-50%, 12px);
	background: var(--text);
	color: #FFFFFF;
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(28, 16, 54, 0.25);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
	z-index: 100;
}

.atlas-copy-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
	.atlas-copy-btn,
	.atlas-copy-all-btn,
	.atlas-copy-toast {
		transition: none;
	}
}

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */

@media (max-width: 860px) {
	.atlas-checkout-grid {
		grid-template-columns: 1fr;
	}

	.atlas-checkout-aside {
		position: static;
	}
}

@media (max-width: 600px) {
	.atlas-checkout-aside,
	.atlas-checkout-form-panel {
		padding: 28px 22px;
	}

	.atlas-order-card {
		padding: 28px 22px;
	}

	.atlas-bank-value {
		font-size: 13px;
	}

	.atlas-instructions-head {
		gap: 12px;
	}
}
