/**
 * THNEA Core — monetisation hub styles (v3.4.0)
 * In-feed sponsor rows, richer broker cards, download-page sponsored card
 * and the unlock animation. Loaded on top of thnea-core.css.
 */

/* -----------------------------------------------------------------
 * 1. In-feed sponsor / ad rows (homepage & archive grids)
 * ----------------------------------------------------------------- */
.thnea-ad-slot--home_feed,
.thnea-ad-slot--archive_feed,
.thnea-ad-slot--single_feed {
	grid-column: 1 / -1;
	margin: 6px 0 18px;
	padding: 18px;
	border: 1px solid rgba(37, 99, 235, .16);
	border-radius: 18px;
	background: linear-gradient(180deg, rgba(37, 99, 235, .04), rgba(37, 99, 235, .01));
	text-align: center;
	overflow: hidden;
}

.thnea-ad-slot--home_feed::before,
.thnea-ad-slot--archive_feed::before,
.thnea-ad-slot--single_feed::before {
	content: "Sponsored";
	display: block;
	margin-bottom: 10px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #64748b;
}

.thnea-ad-slot--home_feed img,
.thnea-ad-slot--archive_feed img,
.thnea-ad-slot--single_feed img {
	max-width: 100%;
	height: auto;
}

/* -----------------------------------------------------------------
 * 2. Empty-slot ghost is dashed for admins
 * ----------------------------------------------------------------- */
.thnea-ad-slot--empty {
	border: 1px dashed #cbd5e1;
	border-radius: 16px;
	padding: 16px;
	text-align: center;
	font-size: 12px;
	color: #64748b;
	background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 10px, #f1f5f9 10px, #f1f5f9 20px);
}

/* -----------------------------------------------------------------
 * 3. Sticky sidebar panel
 * ----------------------------------------------------------------- */
.thnea-ad-slot--sidebar_sticky {
	position: relative;
}

@media (min-width: 1024px) {
	.thnea-sidebar-panel.thnea-ad-slot--sidebar_sticky,
	.thnea-ad-slot--sidebar_sticky {
		position: sticky;
		top: 96px;
		z-index: 2;
	}
}

/* -----------------------------------------------------------------
 * 4. Richer broker cards (rating, regulation, spread chips)
 * ----------------------------------------------------------------- */
.thnea-broker-top {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.thnea-broker-stars {
	display: inline-flex;
	gap: 1px;
	color: #f59e0b;
	line-height: 1;
}

.thnea-broker-stars svg {
	width: 13px;
	height: 13px;
	fill: currentColor;
	stroke: currentColor;
}

.thnea-broker-stars .is-off {
	color: #cbd5e1;
}

.thnea-broker-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.thnea-broker-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .01em;
	background: rgba(37, 99, 235, .08);
	color: #1d4ed8;
}

.thnea-broker-chip.is-reg {
	background: rgba(16, 185, 129, .10);
	color: #047857;
}

.thnea-broker-chip svg {
	width: 12px;
	height: 12px;
}

/* -----------------------------------------------------------------
 * 5. Download page — dedicated sponsored card
 * ----------------------------------------------------------------- */
.thnea-dl-sponsor {
	position: relative;
	margin: 18px 0;
	padding: 18px 18px 16px;
	border: 1px solid rgba(245, 158, 11, .28);
	border-radius: 18px;
	background: linear-gradient(180deg, rgba(245, 158, 11, .06), rgba(245, 158, 11, .015));
	overflow: hidden;
}

.thnea-dl-sponsor-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.thnea-dl-sponsor-head svg {
	width: 16px;
	height: 16px;
	color: #b45309;
}

.thnea-dl-sponsor-head strong {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #b45309;
}

.thnea-dl-sponsor-head span {
	margin-left: auto;
	font-size: 10px;
	font-weight: 600;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: .1em;
}

.thnea-dl-sponsor-body {
	text-align: center;
}

.thnea-dl-sponsor-body img {
	max-width: 100%;
	height: auto;
}

/* -----------------------------------------------------------------
 * 6. Countdown flourish / unlock animation
 * ----------------------------------------------------------------- */
.thnea-dl-ring-bar {
	transition: stroke-dashoffset .9s cubic-bezier(.22, 1, .36, 1);
}

.thnea-dl-ring.is-running .thnea-dl-ring-pulse,
.thnea-dl-ring.is-ticking .thnea-dl-ring-pulse {
	animation: thneaRingPulse 1.4s ease-out infinite;
}

@keyframes thneaRingPulse {
	0%   { transform: scale(.9); opacity: .7; }
	70%  { transform: scale(1.35); opacity: 0; }
	100% { transform: scale(1.35); opacity: 0; }
}

.thnea-dl-ready-zone.is-ready .thnea-smart-dl-btn {
	animation: thneaBtnGlow 1.6s ease-in-out infinite;
}

@keyframes thneaBtnGlow {
	0%, 100% { box-shadow: 0 10px 30px rgba(16, 185, 129, .28); }
	50%      { box-shadow: 0 14px 44px rgba(16, 185, 129, .55); }
}

.thnea-dl-box.is-unlocked {
	animation: thneaUnlockPop .5s cubic-bezier(.22, 1.4, .36, 1) both;
}

@keyframes thneaUnlockPop {
	0%   { transform: scale(.985); }
	60%  { transform: scale(1.006); }
	100% { transform: scale(1); }
}

.thnea-dl-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin-right: 6px;
	border-radius: 50%;
	background: #10b981;
	color: #fff;
	vertical-align: middle;
	animation: thneaCheckIn .4s cubic-bezier(.22, 1.4, .36, 1) both;
}

.thnea-dl-check svg {
	width: 15px;
	height: 15px;
}

@keyframes thneaCheckIn {
	0%   { transform: scale(0); }
	100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.thnea-dl-ring-bar,
	.thnea-dl-ready-zone.is-ready .thnea-smart-dl-btn,
	.thnea-dl-box.is-unlocked,
	.thnea-dl-check,
	.thnea-dl-ring.is-ticking .thnea-dl-ring-pulse {
		animation: none !important;
		transition: none !important;
	}
}

/* -----------------------------------------------------------------
 * 7. Admin — THNEA Hub dashboard
 * ----------------------------------------------------------------- */
.thnea-hub-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	max-width: 900px;
	margin: 16px 0 24px;
}

.thnea-hub-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.thnea-hub-card-icon svg {
	width: 20px;
	height: 20px;
	color: #2563eb;
}

.thnea-hub-card-num {
	font-size: 26px;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.1;
}

.thnea-hub-card-label {
	font-size: 12px;
	color: #64748b;
}

.thnea-hub-goal {
	max-width: 900px;
	margin-bottom: 22px;
}

.thnea-hub-goal-head {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	margin-bottom: 6px;
}

.thnea-hub-goal-bar {
	height: 10px;
	border-radius: 999px;
	background: #e2e8f0;
	overflow: hidden;
}

.thnea-hub-goal-bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #2563eb, #10b981);
}

.thnea-hub-ico svg {
	width: 15px;
	height: 15px;
	vertical-align: -3px;
	margin-right: 6px;
	color: #2563eb;
}

.thnea-hub-guide {
	display: grid;
	gap: 10px;
	max-width: 900px;
}

.thnea-hub-guide-row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
}

.thnea-hub-guide-row p {
	margin: 3px 0 0;
	color: #64748b;
	font-size: 13px;
}

.thnea-hub-guide-rank {
	flex: 0 0 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #2563eb;
	color: #fff;
	font-weight: 800;
	font-size: 13px;
}
