/* AI Today Audio 2.1.2 — slim article reel bar + fullscreen reels */

:root {
	--aita-accent: #2563eb;
	--aita-ink: #172238;
	--aita-muted: #66748b;
	--aita-line: #e3e9f2;
}

/* ---------- slim article player ---------- */
.aita-article {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	margin: 20px 0 24px;
	padding: 8px 12px;
	background: linear-gradient(180deg, #fff 0%, #f7f9fd 100%);
	border: 1px solid var(--aita-line);
	border-radius: 14px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
	color: var(--aita-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aita-article-video,
.aita-reel-mini {
	width: 34px;
	height: 54px;
	display: block;
	object-fit: cover;
	border-radius: 7px;
	background: #101a2d;
	overflow: hidden;
}

.aita-reel-mini video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.aita-article-badge {
	width: 34px;
	height: 54px;
	display: grid;
	place-items: center;
	border-radius: 7px;
	background: #eff6ff;
	color: var(--aita-accent);
	font-size: 18px;
}

.aita-article-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.aita-article-copy strong {
	font-size: 13px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--aita-ink);
}

.aita-article-copy span {
	font-size: 11px;
	line-height: 1.35;
	color: var(--aita-muted);
}

.aita-article-copy a,
.aita-article-feed {
	font-size: 11px;
	line-height: 1.35;
	font-weight: 600;
	color: var(--aita-accent);
	text-decoration: none;
}

.aita-article-copy a:hover,
.aita-article-feed:hover { text-decoration: underline; }

.aita-article-tools {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 6px;
	padding-top: 6px;
	border-top: 1px solid #eef2f7;
}

.aita-article-tool {
	flex: 1 1 0;
	min-width: 0;
	min-height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 0 6px;
	border: 1px solid var(--aita-line);
	border-radius: 999px;
	background: #fff;
	color: #334155;
	font: 600 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.aita-article-tool:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.aita-article-tool:focus-visible { outline: 2px solid var(--aita-accent); outline-offset: 2px; }
.aita-article-tool[hidden] { display: none; }
.aita-article-tool .aita-tool-icon { flex: 0 0 auto; font-size: 12px; line-height: 1; }
.aita-article-tool .aita-tool-label { overflow: hidden; text-overflow: ellipsis; }

.aita-article-btn,
.aita-article-btn:focus {
	min-height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 0 12px;
	border: 1px solid #bfdbfe;
	border-radius: 999px;
	background: #eff6ff;
	color: #1d4ed8;
	font: 700 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
}

.aita-article-btn.is-playing { background: #fff; }
.aita-article-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* ---------- floating link ---------- */
.aita-float {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 17px;
	border-radius: 999px;
	background: rgba(9, 14, 24, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(10px);
	color: #fff !important;
	text-decoration: none !important;
	font: 700 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.aita-float-icon { color: #67c3ff; font-size: 13px; }

/* ---------- fullscreen reels shell ---------- */
body.aita-reels-page { overflow: hidden; }

.aita-reels-shell {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: #000;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	overflow: hidden;
}

.aita-reels-top {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 12;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 62px;
	padding: 0 16px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	pointer-events: none;
}

.aita-reels-top b { color: #67c3ff; }
.aita-reels-top span { pointer-events: auto; }

.aita-reels-home {
	position: absolute;
	left: 16px;
	top: 15px;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	text-decoration: none;
	font-size: 18px;
	pointer-events: auto;
}

.aita-reels-count {
	position: absolute;
	right: 18px;
	top: 22px;
	font-size: 11px;
	letter-spacing: 0.06em;
	color: #a9b6c9;
}

.aita-reels-track {
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.aita-reels-track::-webkit-scrollbar { display: none; }

.aita-reels-loading {
	height: 100%;
	display: grid;
	place-items: center;
	color: #a9b6c9;
	font-size: 14px;
	letter-spacing: 0.04em;
}

.aita-reels-loading button {
	margin-left: 8px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: transparent;
	color: #fff;
	border-radius: 999px;
	padding: 6px 14px;
	cursor: pointer;
}

.aita-reel {
	position: relative;
	height: 100vh;
	height: 100dvh;
	width: min(100vw, calc(100dvh * 9 / 16));
	margin: 0 auto;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: #05080f;
	overflow: hidden;
}

.aita-reel video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	background: #05080f;
}

.aita-reel::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 46%;
	background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.82));
	pointer-events: none;
}

.aita-reel-sound {
	position: absolute;
	top: 70px;
	right: 14px;
	z-index: 6;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(8px);
	color: #fff;
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
}

.aita-reel-sound[hidden] { display: none; }

.aita-reel-info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 5;
	padding: 20px 22px 30px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aita-reel-section {
	align-self: flex-start;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid rgba(103, 195, 255, 0.6);
	background: rgba(8, 16, 30, 0.5);
	color: #cfeaff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.aita-reel-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	font-size: 11px;
	line-height: 1.5;
	letter-spacing: 0.02em;
	color: rgba(255, 255, 255, 0.78);
}

.aita-reel-meta a {
	color: #9fd8ff;
	text-decoration: none;
	font-weight: 700;
}

.aita-reel-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 2px;
}

.aita-reel-action {
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(0, 0, 0, 0.42);
	backdrop-filter: blur(8px);
	color: #fff;
	text-decoration: none;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.aita-reel-action[data-saved="1"] { color: #67c3ff; border-color: rgba(103, 195, 255, 0.7); }
.aita-reel-action:disabled { opacity: 0.55; cursor: default; }

.aita-reels-hint {
	position: absolute;
	left: 50%;
	bottom: 10px;
	transform: translateX(-50%);
	z-index: 10;
	color: rgba(255, 255, 255, 0.45);
	font-size: 10px;
	letter-spacing: 0.06em;
	pointer-events: none;
	white-space: nowrap;
}

.aita-empty,
.aita-locked {
	max-width: 560px;
	margin: 60px auto;
	padding: 24px;
	border-radius: 14px;
	background: #101724;
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #cfd8e5;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 900px) {
	.aita-article-tool { position: relative; min-height: 32px; padding: 0 4px; }
	.aita-article-tool .aita-tool-icon { font-size: 14px; }
	.aita-article-tool .aita-tool-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

@media (max-width: 600px) {
	.aita-reels-top { font-size: 10px; letter-spacing: 0.08em; }
	.aita-reel-info { padding: 16px 16px 26px; }
	.aita-reel-action { min-width: 36px; height: 36px; padding: 0 8px; font-size: 16px; }
	.aita-float { right: 12px; bottom: 12px; }
	.aita-article { padding: 8px 10px; margin: 16px 0 20px; gap: 8px; }
	.aita-article-video,
	.aita-reel-mini,
	.aita-article-badge { width: 30px; height: 48px; }
	.aita-article-actions { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.aita-reels-track { scroll-behavior: auto; }
}
