/* DiaperTok — immersive vertical feed */
:root {
	--dbdt-bg: #181818;
	--dbdt-accent: #ff3565;
	--dbdt-fg: #f5f5f5;
	--dbdt-muted: rgba(245, 245, 245, 0.72);
	--dbdt-safe-b: env(safe-area-inset-bottom, 0px);
	--dbdt-safe-t: env(safe-area-inset-top, 0px);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body.dbdt-body {
	margin: 0;
	padding: 0;
	height: 100%;
	background: var(--dbdt-bg);
	color: var(--dbdt-fg);
	font-family: "Outfit", system-ui, -apple-system, sans-serif;
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
}

.dbdt-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--dbdt-accent);
	color: #fff;
	padding: 0.5rem 0.75rem;
	text-decoration: none;
}

.dbdt-skip:focus {
	left: 0.75rem;
	top: 0.75rem;
}

.dbdt-top {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: calc(0.65rem + var(--dbdt-safe-t)) 1rem 0.65rem;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(24, 24, 24, 0.75) 0%, transparent 100%);
}

.dbdt-brand,
.dbdt-mark {
	pointer-events: auto;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	color: var(--dbdt-fg);
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.dbdt-brand:hover {
	color: var(--dbdt-accent);
}

.dbdt-mark {
	color: var(--dbdt-accent);
	font-weight: 700;
	pointer-events: none;
}

.dbdt-feed {
	height: 100dvh;
	height: 100vh;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-y: contain;
	outline: none;
}

.dbdt-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100dvh;
	padding: 2rem;
	text-align: center;
	color: var(--dbdt-muted);
}

.dbdt-empty[hidden] {
	display: none !important;
}

.dbdt-slide {
	position: relative;
	height: 100dvh;
	height: 100vh;
	width: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dbdt-slide video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
	display: block;
}

.dbdt-meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 3.5rem 1rem calc(1.25rem + var(--dbdt-safe-b));
	background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
	pointer-events: none;
}

.dbdt-title {
	margin: 0 0 0.35rem;
	font-size: clamp(0.95rem, 2.8vw, 1.15rem);
	font-weight: 500;
	line-height: 1.35;
	color: var(--dbdt-fg);
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-width: 42rem;
}

.dbdt-stats {
	font-size: 0.75rem;
	color: var(--dbdt-muted);
	letter-spacing: 0.01em;
}

.dbdt-stats a {
	pointer-events: auto;
	color: var(--dbdt-muted);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.dbdt-stats a:hover {
	color: var(--dbdt-accent);
	border-bottom-color: var(--dbdt-accent);
}

.dbdt-mute {
	position: fixed;
	right: 1rem;
	bottom: calc(5.5rem + var(--dbdt-safe-b));
	z-index: 45;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 50%;
	background: rgba(24, 24, 24, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.2s ease, transform 0.15s ease;
}

.dbdt-mute:hover {
	background: rgba(255, 53, 101, 0.85);
}

.dbdt-mute:active {
	transform: scale(0.94);
}

.dbdt-mute-icon {
	width: 1.15rem;
	height: 1.15rem;
	background: currentColor;
	/* muted = crossed speaker via mask-like CSS shapes */
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dbdt-mute[aria-pressed="false"] .dbdt-mute-icon {
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dbdt-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.dbdt-slide.is-loading .dbdt-loader {
	opacity: 1;
}

.dbdt-spinner {
	width: 2rem;
	height: 2rem;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-top-color: var(--dbdt-accent);
	border-radius: 50%;
	animation: dbdt-spin 0.7s linear infinite;
}

@keyframes dbdt-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (min-width: 900px) {
	.dbdt-slide video {
		max-width: min(100%, 56vh);
		margin: 0 auto;
	}

	.dbdt-meta {
		left: 50%;
		transform: translateX(-50%);
		width: min(100%, 56vh);
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}
