/* AnyDress Try-On — widget styles (slate design system).
   Palette: navy #0f172a · text #475569 · muted #64748b · hairline #e2e8f0
   accent #2271b1 · page tint #f8fafc. Scoped under .adt-app. */

/* Fluid width: breaks out of the theme's constrained content column. */
.adt-app.adt-app {
	box-sizing: border-box;
	width: min(1100px, 94vw) !important;
	max-width: none !important;
	margin-left: calc((100% - min(1100px, 94vw)) / 2) !important;
	margin-right: 0 !important;
}

/* Our display rules must never override the HTML hidden attribute. */
.adt-app [hidden],
.adt-modal-overlay [hidden] { display: none !important; }

/* ---------- card ---------- */

.adt-card {
	background: #fff;
	color: #0f172a;
	border-radius: 24px;
	padding: clamp(24px, 4vw, 56px);
	margin: 16px 0;
}
.adt-card h2, .adt-title {
	margin: 0 0 8px;
	color: #0f172a;
	font-weight: 800;
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	line-height: 1.15;
}
.adt-card p { color: #475569; }

/* ---------- step rows (two-column) ---------- */

.adt-step {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 20px 40px;
	margin-top: 28px;
	padding-top: 32px;
	border-top: 1px solid #e2e8f0;
}
.adt-step-side h3 { margin: 6px 0 0; font-size: 1.35rem; font-weight: 800; color: #0f172a; line-height: 1.25; }
.adt-step-kicker {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: #2271b1;
}
.adt-step-body { min-width: 0; }
.adt-step-desc { color: #475569; margin: 0 0 18px; font-size: 1rem; line-height: 1.55; }

@media (max-width: 781px) {
	.adt-step { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- URL row ---------- */

.adt-url-row { display: flex; gap: 12px; }
.adt-url-box {
	flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0;
	border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; padding: 0 20px;
}
.adt-url-box:focus-within { border-color: #2271b1; }
.adt-url-prefix { font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px; color: #94a3b8; flex: none; }
.adt-app .adt-url-box input[type="url"] { flex: 1; min-width: 0; border: none; background: transparent; padding: 14px 0; font-size: 1rem; color: #0f172a; }
.adt-app .adt-url-box input[type="url"]:focus { outline: none; }

.adt-or-divider { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: #94a3b8; font-size: 0.8rem; }
.adt-or-divider::before, .adt-or-divider::after { content: ""; height: 1px; background: #e2e8f0; flex: 1; }

/* ---------- dropzone ---------- */

.adt-dropzone {
	display: block; border: 2px dashed #d7dee8; border-radius: 16px;
	padding: 30px 20px; text-align: center; cursor: pointer; color: #0f172a;
	background: #fbfcfe;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.adt-dropzone:hover { border-color: #94a3b8; }
.adt-dropzone.adt-dragover { border-color: #2271b1; background: #f0f6fb; }
.adt-drop-hint { color: #94a3b8; font-weight: 400; }

.adt-gstatus { margin-top: 12px; font-size: 0.9rem; color: #64748b; }
.adt-gstatus::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid #e2e8f0; border-top-color: #2271b1; border-radius: 50%; animation: adt-spin 0.8s linear infinite; vertical-align: -1px; }
@keyframes adt-spin { to { transform: rotate(360deg); } }

/* ---------- sample garments ---------- */

.adt-samples-wrap { margin-top: 22px; }
.adt-samples-label { font-size: 0.95rem; font-weight: 700; color: #0f172a; margin: 0 0 12px; }
.adt-samples {
	display: flex;
	flex-wrap: nowrap;
	gap: 14px;
	overflow-x: auto;
	padding: 4px 4px 10px;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
	scrollbar-color: #d1d5db transparent;
}
.adt-samples::-webkit-scrollbar { height: 6px; }
.adt-samples::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }
.adt-samples::-webkit-scrollbar-track { background: transparent; }

.adt-sample {
	flex: none; scroll-snap-align: start; position: relative;
	padding: 0; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff;
	cursor: pointer; overflow: hidden; line-height: 0;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.adt-sample:hover { border-color: #94a3b8; transform: translateY(-1px); }
.adt-sample img { width: 128px; height: 160px; object-fit: cover; display: block; }
.adt-sample.adt-sample-active {
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.18);
}
.adt-sample.adt-sample-active::after {
	content: "✓";
	position: absolute; top: 8px; right: 8px;
	width: 24px; height: 24px; border-radius: 50%;
	background: #2271b1; color: #fff;
	font-size: 14px; font-weight: 700; line-height: 24px; text-align: center;
}

/* ---------- step 2: selected garment chip + note ---------- */

.adt-selected { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.adt-selected-thumb {
	width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex: none;
	border: 1px solid #e2e8f0; background: #fff; line-height: 0;
}
.adt-selected-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adt-selected-label { font-weight: 700; color: #0f172a; font-size: 1rem; }
.adt-selected.adt-empty .adt-selected-thumb { border-style: dashed; border-color: #d7dee8; }
.adt-selected.adt-empty .adt-selected-label { color: #94a3b8; font-weight: 500; }

.adt-note { position: relative; margin-top: 18px; padding-left: 18px; color: #64748b; font-size: 0.92rem; line-height: 1.55; }
.adt-note::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 7px; height: 7px; border-radius: 50%; background: #2271b1; }

/* ---------- buttons ---------- */

.adt-btn {
	display: inline-block; padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
	font-size: 1rem; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none;
	background: #eef2f6; color: #0f172a; transition: transform 0.1s ease, opacity 0.15s ease;
}
.adt-btn:hover { transform: translateY(-1px); }
.adt-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.adt-btn.adt-primary { background: #0f172a; color: #fff; }
.adt-btn.adt-secondary { background: #fff; border-color: #e2e8f0; color: #0f172a; }

.adt-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- auth ---------- */

/* Auth card: everything centered. */
.adt-auth { text-align: center; }
.adt-auth .adt-tabs, .adt-auth .adt-form { margin-left: auto; margin-right: auto; }
.adt-auth .adt-checkline { justify-content: center; }
.adt-auth .adt-forgot { align-self: center; }
.adt-auth .cf-turnstile { margin: 4px auto; }

.adt-tabs { display: flex; gap: 8px; margin: 20px 0 16px; max-width: 480px; }
.adt-tab { flex: 1; padding: 11px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #0f172a; cursor: pointer; font-weight: 600; }
.adt-tab.adt-active { background: #0f172a; color: #fff; border-color: #0f172a; }

.adt-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.adt-form input {
	padding: 13px 18px; border-radius: 999px; border: 1px solid #e2e8f0;
	background: #fff; color: #0f172a; font-size: 1rem;
}
.adt-form input:focus { outline: none; border-color: #2271b1; }

.adt-link { background: none; border: none; color: #64748b; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; padding: 0; }
.adt-forgot { align-self: flex-start; font-size: 0.85rem; }
.adt-checkline { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #475569; }
.adt-checkline input { width: auto; }

.adt-fineprint { font-size: 0.8rem; color: #94a3b8; margin-top: 14px; line-height: 1.5; }

/* ---------- live view ---------- */

.adt-video-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #0f172a; display: flex; justify-content: center; }
.adt-video-wrap video { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; }
.adt-overlay {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	background: rgba(15, 23, 42, 0.65); color: #fff; font-weight: 600; text-align: center; padding: 20px;
}
.adt-countdown {
	position: absolute; top: 12px; right: 12px; background: rgba(15, 23, 42, 0.75); color: #fff;
	font-weight: 700; font-size: 1.15rem; padding: 6px 14px; border-radius: 999px;
}
.adt-live .adt-btn { margin-top: 16px; }

/* ---------- result ---------- */

.adt-snapshot { display: block; max-width: 100%; max-height: 70vh; width: auto; border-radius: 16px; margin: 16px auto; }
.adt-result-video { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; border-radius: 16px; margin: 16px auto; background: #0f172a; }

.adt-share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; width: 100%; }
.adt-share-row input { flex: 1; min-width: 200px; padding: 11px 16px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fbfcfe; color: #0f172a; font-size: 0.9rem; }

/* ---------- packs modal ---------- */

.adt-modal-overlay {
	position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
	display: flex; align-items: center; justify-content: center; z-index: 9998; padding: 16px;
}
.adt-modal {
	background: #fff; color: #0f172a; border-radius: 20px; padding: 32px;
	width: min(560px, 100%); box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3); position: relative;
}
.adt-modal h2 { margin: 0 0 6px; font-size: 1.5rem; }
.adt-modal-close {
	position: absolute; top: 14px; right: 18px; background: none; border: none;
	font-size: 1.4rem; line-height: 1; cursor: pointer; color: #64748b;
}
.adt-packs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.adt-pack {
	flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 4px;
	padding: 18px 16px; border-radius: 16px; border: 1px solid #e2e8f0;
	background: #fff; color: #0f172a; cursor: pointer; text-align: center;
}
.adt-pack:hover { border-color: #2271b1; }
.adt-pack-label { font-weight: 700; }
.adt-pack-credits { color: #64748b; font-size: 0.9rem; }
.adt-pack-price { font-size: 1.2rem; font-weight: 800; }

/* ---------- toast / misc ---------- */

.adt-toast {
	position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
	background: #0f172a; color: #fff; padding: 12px 22px; border-radius: 12px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3); z-index: 9999; max-width: 90vw;
}
.adt-toast-err { background: #991b1b; }

.adt-loading { text-align: center; padding: 40px; color: #64748b; }
