/*
  youtube-modern.css
  UI polish mirrored from the tt-tools subdomain:
  - Hero title block under the horus icon
  - Terms & Conditions toggle switch styling
  - Invalid state highlight on the switch
*/

/* Hero */
.tt-hero{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.25rem 0 0.75rem;
}

.tt-hero-kicker{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
  margin-top: 0.5rem;
}

.tt-hero-title{
  margin: 0.2rem 0 0;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  font-weight: 650;
  color: #111;
  text-align: center !important;
}

.tt-hero-sub{
  font-size: 13px;
  color: #4b5563;
}

.tt-hero-highlight{
  margin-top: 0.5rem;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  /* YouTube-leaning gradient */
  background: linear-gradient(90deg, #ff0033 0%, #2c2c2c 55%, #ff0033 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Search card (used mainly as an "invalid" state wrapper) */
.tt-search-card.tt-invalid .tt-slider{
  border-color: #f26d6d;
  box-shadow: 0 0 0 3px rgba(242, 109, 109, 0.22);
}

/* Terms switch */
.tos-field{
  margin: 0;
  padding: 0;
  gap: 10px;
}

.tt-switch{
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}

.tt-switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

.tt-slider{
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid #d6d6d6;
  background: #efefef;
  transition: background 160ms ease, border-color 160ms ease;
}

.tt-slider::before{
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.16);
  transition: transform 160ms ease;
}

.tt-switch input:checked + .tt-slider{
  background: #1d9bf0;
  border-color: #1d9bf0;
}

.tt-switch input:checked + .tt-slider::before{
  transform: translate(18px, -50%);
}

.accept-tos{
  margin: 0 !important;
  font-size: 12px;
  color: #374151;
  text-decoration: none;
}

.accept-tos a{
  color: #1d4ed8;
}


/* Dataset stats (compact rounded cards) — matched to the Twitter subdomain look */

/*
	Dataset stats scroller
	- Single row (no wrapping)
	- Max width + horizontal scroll bar
	- Edge fades + jump-to-start/end buttons (auto-hidden at edges)
*/

.yt-stats-wrap{
	margin-top: 0.75rem;
	width: 100%;
	max-width: 860px;
	margin-left: auto;
	margin-right: auto;
	position: relative;
	overflow: visible;
}

.yt-stats{
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
	gap: 0.6rem;
	padding: 0 0 0.35rem;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-gutter: stable;
}

.yt-stats::-webkit-scrollbar{ height: 8px; }

.yt-stats::-webkit-scrollbar-thumb{
	background: rgba(151, 153, 156, 0.18);
	border-radius: 999px;
}

.yt-stats::-webkit-scrollbar-track{
	background: rgba(128, 129, 133, 0.06);
	border-radius: 999px;
}

.yt-stats-wrap::before,
.yt-stats-wrap::after{
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 44px;
	pointer-events: none;
	opacity: 1;
	transition: opacity 140ms ease;
	z-index: 1;
}

.yt-stats-wrap::before{
	left: 0;
	background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.yt-stats-wrap::after{
	right: 0;
	background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.yt-stats-wrap.yt-at-start::before{ opacity: 0; }
.yt-stats-wrap.yt-at-end::after{ opacity: 0; }

.yt-stats-nav{
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	border-radius: 999px;
	border: 1px solid rgba(17, 24, 39, 0.12);
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
	color: rgba(17, 24, 39, 0.78);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	cursor: pointer;
	backdrop-filter: blur(6px);
}

.yt-stats-nav:hover{
	background: rgba(255, 255, 255, 0.98);
	color: rgba(17, 24, 39, 0.92);
}

.yt-stats-nav:active{
	transform: translateY(-50%) scale(0.98);
}

.yt-stats-nav-left{ left: 8px; }
.yt-stats-nav-right{ right: 8px; }

.yt-stats-wrap.yt-at-start .yt-stats-nav-left,
.yt-stats-wrap.yt-at-end .yt-stats-nav-right{
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.yt-stat{
	position: relative;
	padding: 0.55rem 0.85rem 0.6rem;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid rgba(255, 46, 106, 0.20);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
	min-width: 137px;
	max-width: 193px;
	flex: 0 0 auto;
	text-align: center;
}

.yt-stat-top{
	position: relative;
	min-height: 1rem;
}

.yt-stat-label{
	font-size: 12px;
	color: #4b5563;
	letter-spacing: 0.02em;
	display: block;
	width: 100%;
	text-align: center;
	padding: 0 0.8rem;
}

.yt-stat-value{
	margin-top: 0.15rem;
	font-size: 12px;
	font-weight: 700;
	color: #111827;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

/* Beacon dot (red-pink accent) */
.yt-beacon{
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: rgb(255 46 106 / 70%);
	box-shadow: 0 0 0 0 rgba(255, 46, 106, 0.55);
	position: absolute;
	left: 0.1rem;
	top: 0.35rem;
}

@keyframes ytPulse{
  0%   { box-shadow: 0 0 0 0 rgba(255, 46, 106, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(255, 46, 106, 0.0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 46, 106, 0.0); }
}

@media (max-width: 520px){
  .yt-stat{ min-width: 165px; }
}
