/* ── CTA buttons ─────────────────────────────────────── */

.th-cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 14px 22px;
	border: 2px solid #1d4422;
	border-radius: 8px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.15;
	cursor: pointer;
	text-decoration: none;
	transition: all .18s ease;
	background: #9bd01d;
	color: #1d4422;
}

.th-cta-btn:hover {
	background: #1d4422;
	color: #9bd01d;
	transform: translateY(-1px);
}

.th-cta-btn:disabled {
	cursor: not-allowed;
	opacity: 1;
}

.th-cta-btn--scan { background: #9bd01d; color: #1d4422; }
.th-cta-btn--scan:hover { background: #1d4422; color: #fff; }

.th-cta-btn--done {
	background: #1d4422;
	color: #fff;
	cursor: default;
}
.th-cta-btn--done:hover { transform: none; background: #1d4422; color: #fff; }

.th-cta-btn--login {
	background: #fff;
	color: #1d4422;
}
.th-cta-btn--login:hover { background: #1d4422; color: #fff; }

.th-cta-icon { display: inline-flex; }

/* ── Verify landing card ─────────────────────────────── */

.th-verify-card {
	max-width: 480px;
	margin: 24px auto;
	background: #fff;
	border: 1px solid #e1e4e8;
	border-radius: 16px;
	padding: 28px 28px 32px;
	text-align: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
	transition: border-color .25s ease, background-color .25s ease;
}

.th-verify-card h2 {
	margin: 0 0 10px;
	color: #1d4422;
	font-size: 22px;
}

.th-verify-island {
	margin: 0 0 20px;
	color: #555;
	font-size: 15px;
}

.th-verify-status {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 16px;
	background: #f7f8f9;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 500;
	color: #1d4422;
	min-height: 64px;
	transition: background-color .25s ease, color .25s ease;
}

.th-verify-card--ok    { border-color: #9bd01d; background: #f3faea; }
.th-verify-card--ok    .th-verify-status { background: #fff; color: #1d4422; }
.th-verify-card--error { border-color: #fecaca; background: #fef2f2; }
.th-verify-card--error .th-verify-status { background: #fff; color: #7f1d1d; }

.th-verify-card .th-cta-btn {
	margin-top: 16px;
}

.th-check, .th-x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-weight: 800;
	font-size: 16px;
	color: #fff;
}
.th-check { background: #1d4422; }
.th-x     { background: #dc2626; }

.th-spinner {
	width: 22px;
	height: 22px;
	border: 3px solid rgba(29, 68, 34, .18);
	border-top-color: #1d4422;
	border-radius: 50%;
	animation: th-spin .9s linear infinite;
	display: inline-block;
}

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

/* ── Progress widget ─────────────────────────────────── */

/* ── Progres ─────────────────────────────────────────── */
.th-progress {
	background: linear-gradient(180deg, #fafbfa 0%, #ffffff 100%);
	border: 1px solid #e1e4e8;
	border-radius: 16px;
	padding: 28px 32px;
}

.th-progress-header {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 18px;
}
.th-progress-count {
	font-size: 56px;
	font-weight: 800;
	color: #1d4422;
	line-height: 1;
	letter-spacing: -.03em;
}
.th-progress-of {
	color: #6a6a6a;
	font-size: 15px;
	line-height: 1.4;
}

.th-progress-bar {
	background: #e9ecef;
	border-radius: 999px;
	height: 14px;
	overflow: hidden;
	position: relative;
}
.th-progress-fill {
	background: linear-gradient(90deg, #9bd01d, #1d4422);
	height: 100%;
	border-radius: 999px;
	transition: width .5s ease;
	box-shadow: 0 1px 3px rgba(29, 68, 34, .25) inset;
}

.th-progress-prize, .th-progress-remaining {
	margin: 22px 0 0;
	padding: 14px 18px;
	font-size: 15px;
	color: #1d4422;
	font-weight: 600;
	background: rgba(155, 208, 29, .12);
	border-left: 3px solid #9bd01d;
	border-radius: 8px;
}
.th-progress-prize {
	background: linear-gradient(135deg, rgba(155, 208, 29, .25) 0%, rgba(155, 208, 29, .1) 100%);
	border-left-color: #1d4422;
	font-size: 16px;
}

/* ── Prize banner (afișat la 8/10) ─────────────────────── */
.th-prize-banner {
	margin: 28px 0 0;
	padding: 28px;
	background: linear-gradient(135deg, #1d4422 0%, #14321a 100%);
	color: #fff;
	border-radius: 16px;
	box-shadow: 0 16px 40px rgba(29, 68, 34, .25);
	display: flex;
	gap: 24px;
	align-items: flex-start;
	position: relative;
	overflow: hidden;
}
.th-prize-banner::before {
	content: '';
	position: absolute;
	right: -60px; top: -60px;
	width: 240px; height: 240px;
	background: radial-gradient(circle, rgba(155, 208, 29, .25) 0%, transparent 70%);
	pointer-events: none;
}
.th-prize-banner-icon {
	flex-shrink: 0;
	width: 72px; height: 72px;
	border-radius: 50%;
	background: #9bd01d;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	box-shadow: 0 8px 20px rgba(155, 208, 29, .35);
	position: relative;
	z-index: 1;
}
.th-prize-banner-body {
	flex: 1;
	min-width: 0;
	position: relative;
	z-index: 1;
}
.th-prize-banner-title {
	margin: 0 0 10px;
	font-size: 22px;
	font-weight: 800;
	color: #fff;
	letter-spacing: -.01em;
	line-height: 1.25;
}
.th-prize-banner-lead {
	margin: 0 0 18px;
	color: #d8e8c5;
	font-size: 15px;
	line-height: 1.5;
}
.th-prize-banner-meta {
	margin: 0 0 18px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px 24px;
}
.th-prize-banner-meta div { min-width: 0; }
.th-prize-banner-meta dt {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #9bd01d;
	margin: 0 0 4px;
}
.th-prize-banner-meta dd {
	margin: 0;
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
}
.th-prize-banner-note {
	margin: 0 0 16px;
	padding: 10px 14px;
	background: rgba(255, 255, 255, .08);
	border-radius: 8px;
	color: #d8e8c5;
	font-size: 13px;
}
.th-prize-banner-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.th-prize-banner-actions .th-cta-btn {
	background: #9bd01d;
	color: #1d4422;
	border-color: #9bd01d;
}
.th-prize-banner-actions .th-cta-btn:hover {
	background: #fff;
	color: #1d4422;
	border-color: #fff;
}

@media (max-width: 600px) {
	.th-prize-banner { flex-direction: column; padding: 22px; gap: 14px; }
	.th-prize-banner-icon { width: 56px; height: 56px; font-size: 28px; }
	.th-prize-banner-title { font-size: 19px; }
}

/* ── Grid de insule sub progress ───────────────────────── */
.th-progress-grid {
	list-style: none !important;
	margin: 24px 0 0 !important;
	padding: 0 !important;
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}
.th-progress-grid-item {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
}
.th-progress-grid-item::before,
.th-progress-grid-item::marker {
	content: none !important;
	display: none !important;
}
.th-progress-grid-item a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid #e1e4e8;
	border-radius: 10px;
	text-decoration: none;
	transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
	height: 100%;
	position: relative;
}
.th-progress-grid-item a:hover {
	border-color: #1d4422;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(29, 68, 34, .08);
}
.th-progress-grid-num {
	flex-shrink: 0;
	width: 28px; height: 28px;
	border-radius: 50%;
	background: #f0f3ed;
	color: #6a6a6a;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}
.th-progress-grid-label {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	font-weight: 600;
	color: #3a4a3f;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.th-progress-grid-check {
	flex-shrink: 0;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: #9bd01d;
	color: #1d4422;
	font-size: 13px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}
.th-progress-grid-item.is-visited a {
	background: linear-gradient(135deg, rgba(155, 208, 29, .14) 0%, rgba(155, 208, 29, .04) 100%);
	border-color: #9bd01d;
}
.th-progress-grid-item.is-visited .th-progress-grid-num {
	background: #1d4422;
	color: #9bd01d;
}
.th-progress-grid-item.is-visited .th-progress-grid-label {
	color: #1d4422;
}

.th-progress-history { margin-top: 14px; font-size: 14px; }
.th-progress-history summary { cursor: pointer; color: #1d4422; font-weight: 600; }
.th-progress-history ul { margin: 10px 0 0; padding: 0; list-style: none; }
.th-progress-history li { padding: 6px 0; border-top: 1px solid #f0f0f0; }
.th-progress-history li:first-child { border-top: 0; }
.th-progress-date { color: #888; margin-left: 8px; font-size: 12px; }

.th-progress-empty { color: #6a6a6a; font-style: italic; }

/* ── Leaderboard ─────────────────────────────────────── */

.th-leaderboard {
	max-width: 540px;
	background: #fff;
	border: 1px solid #e1e4e8;
	border-radius: 12px;
	padding: 12px 8px;
}
.th-leaderboard ol {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: rank;
}
.th-leaderboard li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-radius: 8px;
}
.th-leaderboard li:nth-child(odd) { background: #f7f8f9; }
.th-rank { font-weight: 800; color: #6a6a6a; min-width: 36px; }
.th-leaderboard li:nth-child(1) .th-rank { color: #b8860b; }
.th-leaderboard li:nth-child(2) .th-rank { color: #999; }
.th-leaderboard li:nth-child(3) .th-rank { color: #cd7f32; }
.th-name { flex: 1; color: #1d4422; font-weight: 600; }
.th-score {
	background: #1d4422;
	color: #fff;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
}

.th-leaderboard-empty { color: #6a6a6a; font-style: italic; }

@media (max-width: 600px) {
	.th-cta-btn { padding: 12px 18px; font-size: 15px; }
	.th-verify-card { margin: 16px; padding: 22px; }
}

/* ── Auth cards & forms ──────────────────────────────── */

.th-auth-card {
	max-width: 460px;
	margin: 32px auto;
	background: #fff;
	border: 1px solid #e1e4e8;
	border-radius: 16px;
	padding: 32px 32px 28px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
}
.th-auth-card h2 { margin: 0 0 18px; color: #1d4422; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.th-auth-card p  { color: #555; margin: 0 0 16px; }

.th-auth-form { display: flex; flex-direction: column; gap: 14px; }
.th-auth-form .th-field { margin: 0 !important; }
.th-auth-form input { margin: 0 !important; }

/* ── Consimțăminte obligatorii la înregistrare ─────────── */
.th-consent {
	display: flex !important;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px;
	background: #fafbfa;
	border: 1px solid #e1e4e8;
	border-radius: 10px;
}
.th-consent .th-field--inline {
	margin: 0 !important;
	gap: 10px !important;
	align-items: flex-start !important;
}
.th-consent .th-field--inline input[type="checkbox"] {
	margin: 3px 0 0 !important;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	accent-color: #1d4422;
}
.th-consent .th-field--inline span {
	font-size: 13px;
	line-height: 1.45;
	color: #3a4a3f;
	font-weight: 500;
}
.th-consent a {
	color: #1d4422;
	font-weight: 600;
	text-decoration: underline;
}
.th-consent a:hover { color: #14321a; }
.th-field { display: flex; flex-direction: column; gap: 6px; }
.th-field > span { font-size: 13px; font-weight: 600; color: #1d4422; }
.th-field input[type="text"],
.th-field input[type="email"],
.th-field input[type="password"] {
	padding: 12px 14px;
	border: 2px solid #e1e4e8;
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
	width: 100%;
	box-sizing: border-box;
}
.th-field input:focus {
	outline: none;
	border-color: #1d4422;
	box-shadow: 0 0 0 3px rgba(155, 208, 29, .25);
}
.th-field small { color: #6a6a6a; font-size: 12px; }
.th-field--inline { flex-direction: row; align-items: center; gap: 8px; }
.th-field--inline input { width: auto; }

.th-auth-form .th-cta-btn { margin-top: 8px; justify-content: center; width: 100%; }

.th-auth-links {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #f0f0f0;
	font-size: 14px;
	text-align: center;
	color: #6a6a6a;
}
.th-auth-links a { color: #1d4422; font-weight: 600; text-decoration: none; }
.th-auth-links a:hover { text-decoration: underline; }

/* Flash messages */
.th-flash {
	max-width: 460px;
	margin: 16px auto;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
	border-left: 4px solid;
}
.th-flash--success { background: #f0fdf4; color: #14532d; border-color: #1d4422; }
.th-flash--error   { background: #fef2f2; color: #7f1d1d; border-color: #dc2626; }
.th-flash--info    { background: #eff6ff; color: #1e3a8a; border-color: #1d76d8; }
.th-flash--warning { background: #fffbeb; color: #78350f; border-color: #d97706; }

/* ── Account dashboard ───────────────────────────────── */

.th-account {
	max-width: 1080px;
	margin: 40px auto;
	background: #fff;
	border: 1px solid #e1e4e8;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(29, 68, 34, .06), 0 1px 3px rgba(29, 68, 34, .04);
}

/* ── Header ─────────────────────────────────────────── */
.th-account-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 32px 40px;
	background: linear-gradient(135deg, #eaf5db 0%, #f7fcef 60%, #ffffff 100%);
	border-bottom: 1px solid #e1e4e8;
	gap: 24px;
	flex-wrap: wrap;
	position: relative;
}
.th-account-header::before {
	content: '';
	position: absolute;
	right: -40px; top: -40px;
	width: 220px; height: 220px;
	background: radial-gradient(circle, rgba(155, 208, 29, .18) 0%, transparent 70%);
	pointer-events: none;
}
.th-account-identity {
	display: flex;
	align-items: center;
	gap: 18px;
	min-width: 0;
	position: relative;
}
.th-account-avatar {
	flex-shrink: 0;
	width: 64px; height: 64px;
	border-radius: 50%;
	background: #1d4422;
	color: #9bd01d;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -.02em;
	box-shadow: 0 4px 12px rgba(29, 68, 34, .25);
	border: 3px solid #fff;
}
.th-account-info { min-width: 0; }
.th-account-info h2 {
	margin: 0 0 4px;
	color: #1d4422;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.2;
}
.th-account-email { margin: 0 0 8px; color: #6a6a6a; font-size: 14px; word-break: break-all; }
.th-account-badge {
	display: inline-block;
	padding: 4px 12px;
	background: rgba(29, 68, 34, .08);
	color: #1d4422;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	border-radius: 999px;
}
.th-logout-inline { position: relative; }

/* ── Tabs ──────────────────────────────────────────── */
.th-account-tabs {
	display: flex;
	gap: 4px;
	padding: 8px 20px 0;
	border-bottom: 1px solid #e1e4e8;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	background: #fafbfa;
}
.th-account-tabs::-webkit-scrollbar { display: none; }
.th-account-tabs a {
	padding: 14px 22px;
	color: #6a6a6a;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	white-space: nowrap;
	transition: color .15s ease, border-color .15s ease;
}
.th-account-tabs a:hover { color: #1d4422; }
.th-account-tabs a.is-active { color: #1d4422; border-color: #9bd01d; }

.th-account-tab { padding: 36px 40px 40px; }

.th-account-cta-wrap { margin-top: 28px; text-align: center; }
.th-account-cta-wrap .th-cta-btn {
	padding: 16px 32px;
	font-size: 16px;
	box-shadow: 0 6px 18px rgba(29, 68, 34, .18);
}
.th-account-cta-wrap .th-cta-btn:hover {
	box-shadow: 0 10px 24px rgba(29, 68, 34, .25);
}

.th-link-btn {
	background: transparent;
	border: 0;
	color: #6a6a6a;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
	padding: 4px 8px;
	text-decoration: underline;
}
.th-link-btn:hover { color: #1d4422; }

.th-menu-logout-btn {
	background: transparent;
	border: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	padding: 0;
}

@media (max-width: 768px) {
	.th-auth-card, .th-account { margin: 16px; }
	.th-auth-card { padding: 24px 22px; }
	.th-account-header { flex-direction: column; align-items: flex-start; padding: 24px 24px 20px; }
	.th-account-identity { gap: 14px; }
	.th-account-avatar { width: 52px; height: 52px; font-size: 22px; }
	.th-account-info h2 { font-size: 22px; }
	.th-account-tab { padding: 24px 22px 28px; }
	.th-progress { padding: 22px 22px; }
	.th-progress-count { font-size: 44px; }
	.th-progress-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
	.th-progress-grid { grid-template-columns: 1fr; }
}

/* ── Treasure Hunt Menu (înlocuiește eael-advanced-menu) ────────── */

.th-menu { position: relative; }
.th-menu .th-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0;
}
.th-menu .th-menu-list li { padding: 0; margin: 0; }
.th-menu .th-menu-list a,
.th-menu .th-menu-list .th-menu-logout-btn {
	display: block;
	padding: 10px 0;
	color: #277353;
	text-decoration: none;
	font-family: "Poppins", system-ui, sans-serif;
	font-size: 18px;
	font-weight: 500;
	line-height: 30px;
	transition: color .15s ease;
	background: transparent;
	border: 0;
	cursor: pointer;
	text-align: inherit;
	width: 100%;
}
.th-menu .th-menu-list a:hover,
.th-menu .th-menu-list .th-menu-logout-btn:hover,
.th-menu .th-menu-list li.current-menu-item > a {
	color: #9BD01D;
}

/* Vertical layout — replicat cu separatoare între item-uri */
.th-menu--vertical .th-menu-list {
	flex-direction: column;
	gap: 0;
}
.th-menu--vertical .th-menu-list li + li {
	border-top: 1px solid #277353;
}
.th-menu--vertical .th-menu-list a,
.th-menu--vertical .th-menu-list .th-menu-logout-btn {
	padding: 14px 12px;
}

/* Horizontal layout */
.th-menu--horizontal .th-menu-list {
	flex-direction: row;
	gap: 24px;
	align-items: center;
}

/* Alignment */
.th-menu--align-left   { text-align: left;   }
.th-menu--align-center { text-align: center; }
.th-menu--align-right  { text-align: right;  }
.th-menu--align-right  .th-menu-list a,
.th-menu--align-right  .th-menu-list .th-menu-logout-btn { text-align: right; }
.th-menu--align-center .th-menu-list a,
.th-menu--align-center .th-menu-list .th-menu-logout-btn { text-align: center; }

/* Sub-menu (dropdown) */
.th-menu .th-menu-list .sub-menu {
	list-style: none;
	margin: 8px 0 0;
	padding: 0 0 0 16px;
	font-size: 15px;
}
.th-menu--horizontal .th-menu-list > li { position: relative; }
.th-menu--horizontal .th-menu-list .sub-menu {
	position: absolute;
	top: 100%;
	right: 0;
	min-width: 220px;
	background: #fff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
	padding: 8px;
	border-radius: 8px;
	display: none;
	z-index: 10;
	margin: 0;
}
.th-menu--horizontal .th-menu-list li:hover > .sub-menu,
.th-menu--horizontal .th-menu-list li:focus-within > .sub-menu {
	display: block;
}

/* Hamburger toggle (ascuns desktop, vizibil când .is-open / mobile) */
.th-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 0;
	margin-left: auto;
}
.th-menu-burger {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	width: 24px;
}
.th-menu-burger span {
	display: block;
	width: 100%;
	height: 3px;
	background: #277353;
	border-radius: 2px;
	transition: transform .2s ease, opacity .2s ease;
}
.th-menu.is-open .th-menu-burger span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.th-menu.is-open .th-menu-burger span:nth-child(2) { opacity: 0; }
.th-menu.is-open .th-menu-burger span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Default: pe ecran mic (≤991px), media query custom inline din shortcode preia.
   În rest, breakpoint-ul de fallback aici e 992px. */
@media (max-width: 991px) {
	.th-menu--responsive .th-menu-toggle { display: inline-flex; }
	.th-menu--responsive > ul { display: none; }
	.th-menu--responsive.is-open > ul {
		display: flex !important;
		flex-direction: column;
		position: absolute;
		top: 100%;
		right: 0;
		min-width: 240px;
		background: #fff;
		box-shadow: 0 8px 30px rgba(0, 0, 0, .14);
		padding: 8px 16px;
		border-radius: 8px;
		z-index: 100;
	}
}
