/*
 * Crista Tigma v5 — Đổi/trả page (/doi-tra-mien-phi/) presentation layer.
 * Loads on top of pdp.css (shared tokens, blurred grassland background, glass nav,
 * off-canvas, footer). Content/presentation only. Scoped to body.ct-v5-doi-tra so
 * cart / checkout / order-received / PDP / shop are untouched.
 *
 * Redesign 2026-07-07 (Sang): minimal monochrome icons, ONE highlighted iOS-style
 * liquid-glass Zalo button (no button-spreading), fee logic as a 2-column Đổi | Trả
 * comparison, compact layout.
 */

body.ct-v5-product-page.ct-v5-doi-tra {
	padding-bottom: 0;
}

.ct-dt-shell {
	width: 100%;
	min-height: 100vh;
	padding: 96px 0 clamp(48px, 7vw, 80px);
	overflow-x: clip;
	color: var(--ct-ink);
}

.ct-dt-shell section {
	margin-bottom: clamp(22px, 3.2vw, 40px);
}

/* ---------------------------------------------------------------- Typography */

/* Quieter, smaller kicker with wider tracking (scoped so other v5 pages keep
   the shared 12px/0.22em kicker). */
body.ct-v5-doi-tra .ct-section-kicker {
	margin-bottom: 12px;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.26em;
	opacity: 0.85;
}

.ct-dt-h1 {
	margin: 6px 0 0;
	color: var(--ct-ink);
	font-size: clamp(26px, 3.8vw, 40px);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.ct-dt-h2 {
	margin: 4px 0 0;
	color: var(--ct-ink);
	font-size: clamp(20px, 2.4vw, 27px);
	font-weight: 600;
	line-height: 1.2;
}

.ct-dt-h3 {
	margin: 0 0 14px;
	color: var(--ct-ink);
	font-size: clamp(17px, 1.9vw, 20px);
	font-weight: 600;
	line-height: 1.25;
}

.ct-dt-sec-head {
	max-width: 720px;
	margin: 0 0 clamp(18px, 2.2vw, 24px);
}

/* -------------------------------------------------------------------- Hero */

.ct-dt-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: clamp(30px, 4vw, 52px) clamp(20px, 3vw, 44px);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 30px;
	background: linear-gradient(150deg, rgba(147, 216, 181, 0.36), rgba(248, 255, 253, 0.5) 55%, rgba(191, 239, 255, 0.38));
	box-shadow: var(--ct-shadow);
	backdrop-filter: blur(22px) saturate(1.3);
	-webkit-backdrop-filter: blur(22px) saturate(1.3);
}

/* --------------------- Cinematic video hero (round 5) — exchange loop IS the hero */

.ct-dt-hero.is-video {
	position: relative;
	overflow: hidden;
	align-items: flex-start;
	text-align: left;
	min-height: clamp(400px, 52vh, 540px);
	justify-content: center;
	padding: clamp(30px, 4vw, 52px) clamp(22px, 3.4vw, 48px);
}

.ct-dt-hero-video {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}

/* Left scrim so ink text + clear-glass button stay readable over the video sky */
.ct-dt-hero.is-video::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, rgba(236, 251, 249, 0.86) 0%, rgba(236, 251, 249, 0.62) 34%, rgba(236, 251, 249, 0.14) 62%, rgba(236, 251, 249, 0) 78%);
	pointer-events: none;
}

.ct-dt-hero-inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-width: 540px;
}

.ct-dt-hero.is-video .ct-dt-hero-line {
	text-align: left;
}

/* Mobile: poster-first for speed — hide the video, paint the still behind the panel */
@media (max-width: 760px) {
	.ct-dt-hero-video {
		display: none;
	}

	.ct-dt-hero.is-video {
		min-height: 0;
		background-image: linear-gradient(180deg, rgba(236, 251, 249, 0.88) 0%, rgba(236, 251, 249, 0.6) 55%, rgba(236, 251, 249, 0.25) 100%), url('ct-dt-loop-exchange-poster.webp');
		background-size: cover;
		background-position: 72% center;
	}

	.ct-dt-hero.is-video::before {
		content: none;
	}
}

.ct-dt-hero-line {
	max-width: 600px;
	margin: 14px 0 0;
	color: var(--ct-muted);
	font-size: clamp(14px, 1.4vw, 15px);
	line-height: 1.7;
}

.ct-dt-hero-line strong {
	color: var(--ct-teal-deep);
	font-weight: 600;
}

.ct-dt-hero-meta {
	margin: 16px 0 0;
	color: var(--ct-muted);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.02em;
	opacity: 0.9;
}

/* --------------------------------- iOS-26 CLEAR/white liquid-glass Zalo CTA */

/* Text color must beat pdp.css `.ct-v5-product-page a{color:inherit}` (0,1,1).
   Clear glass → ink label + muted number (white text won't hold on clear glass
   over the bright grassland). Icon inherits ink via currentColor. */
body.ct-v5-doi-tra .ct-dt-zalo,
body.ct-v5-doi-tra .ct-dt-zalo .ct-dt-zalo-tx {
	color: var(--ct-ink);
}

body.ct-v5-doi-tra .ct-dt-zalo .ct-dt-zalo-num {
	color: var(--ct-muted);
}

.ct-dt-zalo {
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	gap: 11px;
	margin-top: 24px;
	padding: 10px 22px 10px 11px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.2);
	text-decoration: none;
	box-shadow:
		0 18px 44px -20px rgba(20, 58, 64, 0.42),
		0 2px 10px -3px rgba(20, 58, 64, 0.12),
		inset 0 1px 0 rgba(255, 255, 255, 0.65);
	backdrop-filter: blur(22px) saturate(1.4);
	-webkit-backdrop-filter: blur(22px) saturate(1.4);
	overflow: hidden;
	transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

/* barely-there specular top shine */
.ct-dt-zalo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0) 66%);
	pointer-events: none;
}

.ct-dt-zalo:hover,
.ct-dt-zalo:focus-visible {
	transform: translateY(-2px);
	outline: none;
	background: rgba(255, 255, 255, 0.3);
	box-shadow:
		0 24px 52px -20px rgba(20, 58, 64, 0.5),
		0 3px 12px -3px rgba(20, 58, 64, 0.16),
		inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.ct-dt-zalo-ic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.34);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.ct-dt-zalo-ic svg {
	width: 19px;
	height: 19px;
}

.ct-dt-zalo-tx {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
	text-align: left;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.ct-dt-zalo-num {
	font-size: 12.5px;
	font-weight: 400;
	letter-spacing: 0.03em;
	opacity: 0.9;
}

/* --------------------------------------------- Fee logic: 2-column Đổi | Trả */

.ct-dt-grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(16px, 2.2vw, 22px);
}

.ct-dt-col {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: clamp(18px, 2.2vw, 26px);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 24px;
	background: rgba(248, 255, 253, 0.5);
	box-shadow: 0 28px 72px -52px rgba(20, 58, 64, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.55);
	backdrop-filter: blur(18px) saturate(1.22);
	-webkit-backdrop-filter: blur(18px) saturate(1.22);
}

.ct-dt-col-head {
	display: flex;
	align-items: center;
	gap: 13px;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--ct-dark-line);
}

/* Anime guide loops (round 4) — one per column, image-led */
.ct-dt-loop {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border: 0;
	border-radius: 18px;
	background: rgba(232, 250, 248, 0.55);
	box-shadow: 0 22px 55px -44px rgba(20, 58, 64, 0.7);
}

.ct-dt-col-ic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 13px;
	background: rgba(47, 147, 168, 0.1);
	color: var(--ct-teal-deep);
	box-shadow: inset 0 0 0 1px rgba(47, 147, 168, 0.24);
}

.ct-dt-col-ic svg {
	width: 23px;
	height: 23px;
}

.ct-dt-col-tx {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	min-width: 0;
}

.ct-dt-col-tx strong {
	color: var(--ct-ink);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.ct-dt-col-tx span {
	color: var(--ct-muted);
	font-size: 12.5px;
	font-weight: 500;
}

.ct-dt-case {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.ct-dt-case + .ct-dt-case {
	padding-top: 16px;
	border-top: 1px solid var(--ct-dark-line);
}

.ct-dt-case-t {
	margin: 0;
	color: var(--ct-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.ct-dt-case-d {
	margin: 0;
	color: var(--ct-muted);
	font-size: 13px;
	line-height: 1.45;
}

/* monochromatic teal-intensity fee chips */
.ct-dt-fee {
	display: inline-flex;
	align-self: flex-start;
	margin-top: 3px;
	padding: 9px 16px;
	border-radius: 13px;
	font-size: 13.5px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 0.005em;
}

.ct-dt-fee.is-free {
	background: linear-gradient(135deg, var(--ct-teal), var(--ct-teal-deep));
	color: #fff;
	box-shadow: 0 12px 26px -14px rgba(21, 108, 126, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ct-dt-fee.is-half {
	background: rgba(47, 147, 168, 0.12);
	color: var(--ct-teal-deep);
	box-shadow: inset 0 0 0 1px rgba(47, 147, 168, 0.36);
}

.ct-dt-fee.is-talk {
	background: transparent;
	color: var(--ct-muted);
	box-shadow: inset 0 0 0 1px rgba(84, 114, 121, 0.34);
}

/* ------------------------------------------------------ How-it-works stepper */

.ct-dt-steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ct-dt-step {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: clamp(16px, 1.8vw, 22px);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 20px;
	background: rgba(248, 255, 253, 0.46);
	box-shadow: 0 24px 60px -50px rgba(20, 58, 64, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.52);
	backdrop-filter: blur(16px) saturate(1.2);
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.ct-dt-step-no {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(47, 147, 168, 0.12);
	color: var(--ct-teal-deep);
	font-size: 15px;
	font-weight: 800;
	box-shadow: inset 0 0 0 1px rgba(47, 147, 168, 0.3);
}

.ct-dt-step-t {
	margin: 0;
	color: var(--ct-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.ct-dt-step-d {
	margin: 0;
	color: var(--ct-muted);
	font-size: 13px;
	line-height: 1.5;
}

/* ------------------------------------------------- Conditions + FAQ (bottom) */

.ct-dt-bottom {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	gap: clamp(16px, 2.2vw, 22px);
	align-items: start;
	margin-bottom: 0;
}

.ct-dt-conditions {
	margin: 0 !important;
	padding: clamp(20px, 2.4vw, 28px);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 24px;
	background: rgba(248, 255, 253, 0.5);
	box-shadow: 0 28px 72px -52px rgba(20, 58, 64, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.55);
	backdrop-filter: blur(18px) saturate(1.22);
	-webkit-backdrop-filter: blur(18px) saturate(1.22);
}

.ct-dt-faq {
	margin: 0 !important;
}

.ct-dt-cond-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ct-dt-cond-list li {
	position: relative;
	padding-left: 26px;
	color: var(--ct-ink);
	font-size: 14px;
	line-height: 1.5;
}

.ct-dt-cond-list li::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 5px;
	width: 11px;
	height: 6px;
	border-left: 2px solid var(--ct-teal);
	border-bottom: 2px solid var(--ct-teal);
	transform: rotate(-45deg);
}

.ct-dt-cond-list strong {
	color: var(--ct-teal-deep);
	font-weight: 700;
}

.ct-dt-cond-note {
	margin: 16px 0 0;
	padding-top: 15px;
	border-top: 1px solid var(--ct-dark-line);
	color: var(--ct-muted);
	font-size: 12.5px;
	line-height: 1.55;
}

/* FAQ accordion */
.ct-dt-faq-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ct-dt-faq-item {
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 18px;
	background: rgba(248, 255, 253, 0.5);
	box-shadow: 0 22px 56px -50px rgba(20, 58, 64, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.52);
	backdrop-filter: blur(16px) saturate(1.2);
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
	overflow: hidden;
}

.ct-dt-faq-item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 15px 20px;
	color: var(--ct-ink);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
	list-style: none;
}

.ct-dt-faq-item summary::-webkit-details-marker {
	display: none;
}

.ct-dt-faq-item summary::after {
	content: "";
	flex: none;
	width: 9px;
	height: 9px;
	margin-right: 4px;
	border-right: 2px solid var(--ct-teal-deep);
	border-bottom: 2px solid var(--ct-teal-deep);
	transform: rotate(45deg);
	transition: transform 0.22s ease;
}

.ct-dt-faq-item[open] summary::after {
	transform: rotate(-135deg);
}

.ct-dt-faq-a {
	padding: 0 20px 17px;
}

.ct-dt-faq-a p {
	margin: 0;
	color: var(--ct-muted);
	font-size: 13.5px;
	line-height: 1.65;
}

.ct-dt-faq-a strong {
	color: var(--ct-teal-deep);
	font-weight: 700;
}

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

@media (max-width: 860px) {
	.ct-dt-steps {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 760px) {
	.ct-dt-grid2,
	.ct-dt-bottom {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.ct-dt-steps {
		grid-template-columns: 1fr;
	}

	.ct-dt-step {
		flex-direction: row;
		align-items: flex-start;
		gap: 14px;
	}

	.ct-dt-step-no {
		flex: none;
	}
}

@media (max-width: 480px) {
	.ct-dt-hero,
	.ct-dt-col,
	.ct-dt-conditions {
		border-radius: 22px;
	}

	.ct-dt-zalo {
		width: 100%;
		justify-content: center;
	}

	.ct-dt-fee {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 360px) {
	.ct-dt-hero,
	.ct-dt-col,
	.ct-dt-step,
	.ct-dt-conditions {
		padding-left: 16px;
		padding-right: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ct-dt-zalo,
	.ct-dt-faq-item summary::after {
		transition: none;
	}
}
