/**
 * CCD Hub Cloud public SaaS checkout — Vietnam UX
 */

.ccd-checkout {
	max-width: 1100px;
	margin: 1.5rem auto 3rem;
	padding: 0 1rem;
	color: #0f2a4a;
}

.ccd-checkout__eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #3b82c4;
}

.ccd-checkout__title {
	margin: 0 0 0.4rem;
	font-size: 1.85rem;
	line-height: 1.2;
}

.ccd-checkout__subtitle {
	margin: 0 0 1.25rem;
	color: #475569;
	max-width: 40rem;
}

/* —— Step progress —— */
.ccd-checkout__steps {
	margin: 0 0 1.5rem;
	padding: 1rem 1.15rem;
	background: #fff;
	border: 1px solid #dbe4f0;
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(15, 40, 80, 0.04);
}

.ccd-checkout__steps-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ccd-checkout__step {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.4rem 0.65rem;
	border-radius: 999px;
	color: #94a3b8;
	font-weight: 600;
	font-size: 0.88rem;
}

.ccd-checkout__step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.55rem;
	height: 1.55rem;
	border-radius: 999px;
	background: #e2e8f0;
	color: #64748b;
	font-size: 0.78rem;
	font-weight: 800;
}

.ccd-checkout__step.is-done {
	color: #0f766e;
}

.ccd-checkout__step.is-done .ccd-checkout__step-num {
	background: #0f766e;
	color: #fff;
}

.ccd-checkout__step.is-current {
	background: #eff6ff;
	color: #0f2a4a;
}

.ccd-checkout__step.is-current .ccd-checkout__step-num {
	background: #1d4f91;
	color: #fff;
}

.ccd-checkout__step-arrow {
	color: #cbd5e1;
	font-size: 0.85rem;
	line-height: 1;
	padding: 0 0.15rem;
}

.ccd-checkout__steps-current {
	margin: 0.75rem 0 0;
	text-align: center;
	font-size: 0.9rem;
	color: #64748b;
}

.ccd-checkout__steps-current strong {
	color: #1d4f91;
}

/* —— Layout —— */
.ccd-checkout__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
	gap: 1.25rem;
	align-items: start;
}

.ccd-checkout__card {
	background: #fff;
	border: 1px solid #dbe4f0;
	border-radius: 14px;
	padding: 1.2rem 1.25rem;
	margin-bottom: 1rem;
	box-shadow: 0 8px 24px rgba(15, 40, 80, 0.04);
}

.ccd-checkout__card h2,
.ccd-checkout__card legend {
	margin: 0 0 0.9rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: #0f2a4a;
}

.ccd-checkout__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.85rem;
}

.ccd-checkout__field-full {
	grid-column: 1 / -1;
}

.ccd-checkout__fields label {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #334155;
}

.ccd-checkout__fields input,
.ccd-checkout__coupon input {
	min-height: 48px;
	padding: 0.7rem 0.85rem;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 500;
	color: #0f2a4a;
}

.ccd-checkout__help {
	font-size: 0.8rem;
	font-weight: 500;
	color: #64748b;
	line-height: 1.4;
}

/* —— Hosting cards —— */
.ccd-checkout__hosting {
	margin: 1.15rem 0 0;
	padding: 0;
	border: 0;
}

.ccd-checkout__hosting-cards {
	display: grid;
	gap: 0.75rem;
}

.ccd-checkout__hosting-card {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	margin: 0;
	padding: 1rem 1.05rem;
	border: 1.5px solid #dbe4f0;
	border-radius: 12px;
	cursor: pointer;
	background: #f8fafc;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ccd-checkout__hosting-card:hover {
	border-color: #93c5fd;
	background: #fff;
}

.ccd-checkout__hosting-card:has(input:checked) {
	border-color: #1d4f91;
	background: #eff6ff;
	box-shadow: 0 0 0 3px rgba(29, 79, 145, 0.12);
}

.ccd-checkout__hosting-card.is-recommended:has(input:checked) {
	border-color: #0f766e;
	background: #f0fdfa;
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.ccd-checkout__hosting-card input {
	margin-top: 0.2rem;
	width: 1.15rem;
	height: 1.15rem;
	accent-color: #1d4f91;
	flex-shrink: 0;
}

.ccd-checkout__hosting-body {
	flex: 1;
	min-width: 0;
}

.ccd-checkout__hosting-badge {
	display: inline-block;
	margin-bottom: 0.35rem;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	background: #ccfbf1;
	color: #0f766e;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.ccd-checkout__hosting-title {
	display: block;
	font-size: 1rem;
	color: #0f2a4a;
}

.ccd-checkout__hosting-perks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.75rem;
	list-style: none;
	margin: 0.45rem 0 0;
	padding: 0;
	color: #0f766e;
	font-size: 0.85rem;
	font-weight: 600;
}

.ccd-checkout__hosting-perks li::before {
	content: '✓ ';
}

.ccd-checkout__hosting-desc {
	margin: 0.35rem 0 0;
	color: #64748b;
	font-size: 0.88rem;
	font-weight: 500;
	line-height: 1.4;
}

/* —— Payment methods —— */
.ccd-checkout__payment-note {
	margin: -0.35rem 0 0.85rem;
	padding: 0.55rem 0.7rem;
	border-radius: 8px;
	background: #fff7ed;
	color: #9a3412;
	font-size: 0.88rem;
	font-weight: 600;
}

.ccd-checkout__payment-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
}

.ccd-checkout__payment-option {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0;
	min-height: 52px;
	padding: 0.75rem 0.9rem;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #f8fafc;
	color: #64748b;
	font-weight: 600;
	cursor: not-allowed;
	opacity: 0.85;
}

.ccd-checkout__payment-option input {
	width: 1.1rem;
	height: 1.1rem;
}

.ccd-checkout__coupon {
	display: flex;
	gap: 0.5rem;
}

.ccd-checkout__coupon input {
	flex: 1;
}

.ccd-checkout__terms {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	font-weight: 500;
	color: #334155;
	line-height: 1.45;
}

.ccd-checkout__terms input {
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.15rem;
	flex-shrink: 0;
	accent-color: #1d4f91;
}

.ccd-checkout__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	border: 1px solid transparent;
	padding: 0.8rem 1.15rem;
	min-height: 48px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	box-sizing: border-box;
}

.ccd-checkout__btn--primary {
	background: #1d4f91;
	color: #fff;
	width: 100%;
	font-size: 1.05rem;
}

.ccd-checkout__btn--primary:hover {
	background: #163f75;
	color: #fff;
}

.ccd-checkout__btn--ghost {
	background: #eff6ff;
	color: #1d4f91;
	border-color: #bfdbfe;
}

.ccd-checkout__btn--outline {
	background: #fff;
	color: #1d4f91;
	border-color: #93c5fd;
}

.ccd-checkout__btn--sm {
	min-height: 40px;
	padding: 0.45rem 0.75rem;
	font-size: 0.85rem;
	flex: 1;
}

.ccd-checkout__btn.is-disabled {
	opacity: 0.45;
	pointer-events: none;
}

/* —— Trust —— */
.ccd-checkout__trust {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.45rem;
}

.ccd-checkout__trust li {
	display: flex;
	align-items: flex-start;
	gap: 0.45rem;
	color: #0f766e;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.35;
}

.ccd-checkout__trust li::before {
	content: '✓';
	flex-shrink: 0;
	font-weight: 800;
}

/* —— Sticky summary —— */
.ccd-checkout__summary {
	position: sticky;
	top: 1.25rem;
	align-self: start;
	z-index: 2;
}

.ccd-checkout__pack {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 0.85rem;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #eef2f7;
}

.ccd-checkout__thumb {
	width: 96px;
	height: 72px;
	border-radius: 10px;
	overflow: hidden;
	background: #e2e8f0;
}

.ccd-checkout__thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ccd-checkout__thumb-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #dbeafe 0%, #e2e8f0 100%);
}

.ccd-checkout__pack-name {
	margin: 0 0 0.5rem;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
}

.ccd-checkout__pack-facts {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0;
	display: grid;
	gap: 0.3rem;
}

.ccd-checkout__pack-facts li {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	font-size: 0.82rem;
}

.ccd-checkout__pack-facts span {
	color: #64748b;
	font-weight: 600;
}

.ccd-checkout__pack-facts strong {
	color: #0f2a4a;
	font-weight: 700;
	text-align: right;
}

.ccd-checkout__pack-actions {
	display: flex;
	gap: 0.4rem;
}

.ccd-checkout__totals {
	margin: 0;
}

.ccd-checkout__totals > div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.45rem 0;
	border-bottom: 1px solid #eef2f7;
}

.ccd-checkout__totals dt {
	margin: 0;
	color: #64748b;
	font-weight: 600;
}

.ccd-checkout__totals dd {
	margin: 0;
	font-weight: 700;
}

.ccd-checkout__totals-total {
	border-bottom: 0 !important;
	padding-top: 0.75rem !important;
	font-size: 1.1rem;
}

.ccd-checkout__error {
	margin: 0 0 0.75rem;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	background: #fee2e2;
	color: #991b1b;
	font-weight: 600;
}

.ccd-checkout__success {
	margin: 1rem 0 0;
	padding: 0.75rem 0.85rem;
	border-radius: 8px;
	background: #d1fae5;
	color: #065f46;
	font-weight: 600;
}

.ccd-checkout__hint {
	color: #64748b;
	margin: 0 0 1rem;
}

.ccd-checkout__coupon-msg {
	margin: 0.55rem 0 0;
	font-size: 0.88rem;
	font-weight: 600;
	color: #0f766e;
}

.ccd-checkout__receipt > div {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 0.75rem;
	padding: 0.55rem 0;
	border-bottom: 1px solid #eef2f7;
}

.ccd-checkout__receipt dt {
	margin: 0;
	color: #64748b;
	font-weight: 700;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ccd-checkout__receipt dd {
	margin: 0;
	font-weight: 600;
}

@media (max-width: 900px) {
	.ccd-checkout__grid {
		grid-template-columns: 1fr;
	}

	.ccd-checkout__summary {
		position: static;
		order: -1;
	}

	.ccd-checkout__step-arrow {
		display: none;
	}

	.ccd-checkout__steps-list {
		justify-content: flex-start;
		gap: 0.35rem;
	}
}

@media (max-width: 782px) {
	.ccd-checkout__title {
		font-size: 1.55rem;
	}

	.ccd-checkout__fields {
		grid-template-columns: 1fr;
	}

	.ccd-checkout__payment-list {
		grid-template-columns: 1fr;
	}

	.ccd-checkout__pack {
		grid-template-columns: 80px 1fr;
	}

	.ccd-checkout__thumb {
		width: 80px;
		height: 60px;
	}

	.ccd-checkout__coupon {
		flex-direction: column;
	}

	.ccd-checkout__coupon .ccd-checkout__btn {
		width: 100%;
	}

	.ccd-checkout__pack-actions {
		flex-direction: column;
	}

	.ccd-checkout__btn--sm {
		width: 100%;
	}

	.ccd-checkout__step-label {
		font-size: 0.78rem;
	}
}

/* Fallback when :has() unsupported — still usable via native radio */
@supports not selector(:has(*)) {
	.ccd-checkout__hosting-card {
		background: #fff;
	}
}

/* -------------------------------------------------------------------------- */
/* Order success / thank-you                                                  */
/* -------------------------------------------------------------------------- */

.ccd-success__hero {
	text-align: center;
	margin-bottom: 1.5rem;
}

.ccd-success__illustration {
	display: flex;
	justify-content: center;
	margin-bottom: 1rem;
	animation: ccd-success-pop 0.55s ease-out;
}

.ccd-success__illustration svg {
	filter: drop-shadow(0 12px 24px rgba(5, 150, 105, 0.18));
}

@keyframes ccd-success-pop {
	0% { transform: scale(0.72); opacity: 0; }
	70% { transform: scale(1.06); opacity: 1; }
	100% { transform: scale(1); }
}

.ccd-success__layout {
	display: grid;
	grid-template-columns: 1.2fr 0.9fr;
	gap: 1.25rem;
	align-items: start;
}

.ccd-success__section-title {
	margin: 0 0 1rem;
	font-size: 1.05rem;
	color: #0f2a4a;
}

.ccd-success__muted {
	color: #64748b;
	font-size: 0.9rem;
	font-weight: 500;
}

.ccd-success__total-row {
	border-bottom: 0 !important;
	padding-top: 0.85rem !important;
}

.ccd-success__total-row dt,
.ccd-success__total-row dd {
	font-size: 1.05rem;
	color: #0f2a4a;
}

.ccd-success__pay-box {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px dashed #e2e8f0;
}

.ccd-success__timeline {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.ccd-success__timeline::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 8px;
	bottom: 8px;
	width: 2px;
	background: #e2e8f0;
}

.ccd-success__timeline-item {
	display: grid;
	grid-template-columns: 18px 1fr;
	gap: 0.75rem;
	position: relative;
	padding-bottom: 1.1rem;
}

.ccd-success__timeline-item:last-child {
	padding-bottom: 0;
}

.ccd-success__dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #cbd5e1;
	margin-top: 2px;
	z-index: 1;
}

.ccd-success__timeline-item.is-done .ccd-success__dot {
	background: #059669;
	border-color: #059669;
}

.ccd-success__timeline-item.is-current .ccd-success__dot {
	background: #fff;
	border-color: #1d4f91;
	box-shadow: 0 0 0 4px rgba(29, 79, 145, 0.15);
}

.ccd-success__timeline-item strong {
	display: block;
	color: #0f2a4a;
	font-size: 0.95rem;
}

.ccd-success__timeline-item p {
	margin: 0.2rem 0 0;
	color: #64748b;
	font-size: 0.85rem;
}

.ccd-success__eta {
	margin: 0 0 0.5rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: #1d4f91;
}

.ccd-success__next {
	margin: 0;
	padding-left: 1.15rem;
	color: #334155;
	line-height: 1.55;
}

.ccd-success__next li {
	margin-bottom: 0.45rem;
}

.ccd-success__portal {
	margin: 1rem 0 0;
}

.ccd-success__portal .ccd-checkout__btn {
	display: inline-flex;
	text-decoration: none;
}

@media (max-width: 900px) {
	.ccd-success__layout {
		grid-template-columns: 1fr;
	}
}
