/**
 * WoW: Forever Talent Calculator Stylesheet
 *
 * @package N3TW Core
 */

.n3tw-talent-calculator-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #e2e8f0;
	user-select: none;
}

/* Header & Intro */
.n3tw-tc-header {
	margin-bottom: 1.5rem;
	text-align: center;
}

.n3tw-tc-title {
	font-size: 2.2rem;
	font-weight: 800;
	color: #f7fafc;
	margin: 0 0 0.5rem;
	letter-spacing: -0.02em;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.n3tw-tc-subtitle {
	font-size: 1rem;
	color: #94a3b8;
	margin: 0;
}

/* Class Selection Bar */
.n3tw-tc-classes {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	margin: 1.5rem 0;
}

.n3tw-tc-class-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.85rem;
	background: #151b26;
	border: 1px solid #283347;
	border-radius: 8px;
	color: #cbd5e1;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.18s ease-in-out;
}

.n3tw-tc-class-btn:hover {
	background: #1c2433;
	border-color: #3b4961;
	transform: translateY(-1px);
	color: #fff;
}

.n3tw-tc-class-btn.is-active {
	background: #1e293b;
	border-color: var(--class-color, #f59e0b);
	box-shadow: 0 0 14px var(--class-glow, rgba(245, 158, 11, 0.35));
	color: #fff;
}

.n3tw-tc-class-icon {
	width: 24px;
	height: 24px;
	border-radius: 5px;
	object-fit: cover;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Status Bar & Controls */
.n3tw-tc-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: #121824;
	border: 1px solid #253043;
	border-radius: 10px;
	padding: 0.85rem 1.25rem;
	margin-bottom: 1.5rem;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.n3tw-tc-stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem;
	font-size: 0.95rem;
}

.n3tw-tc-stat-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	color: #94a3b8;
}

.n3tw-tc-stat-value {
	font-weight: 700;
	color: #f1f5f9;
}

.n3tw-tc-stat-value.pts-left {
	color: #ffd100;
	font-size: 1.15rem;
}

.n3tw-tc-dist-badge {
	background: #1e293b;
	border: 1px solid #334155;
	padding: 0.2rem 0.6rem;
	border-radius: 6px;
	font-family: monospace;
	font-weight: 700;
	color: #38bdf8;
	font-size: 1rem;
}

.n3tw-tc-actions {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.n3tw-tc-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.9rem;
	font-size: 0.88rem;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s ease-in-out;
	border: 1px solid transparent;
}

.n3tw-tc-btn-reset {
	background: #242c3d;
	border-color: #334155;
	color: #cbd5e1;
}

.n3tw-tc-btn-reset:hover {
	background: #334155;
	color: #ef4444;
	border-color: #ef4444;
}

.n3tw-tc-btn-share {
	background: #0284c7;
	border-color: #38bdf8;
	color: #fff;
}

.n3tw-tc-btn-share:hover {
	background: #0369a1;
	box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* Tree Navigation Tabs (Mobile/Tablet) */
.n3tw-tc-tabs {
	display: none;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.n3tw-tc-tab-btn {
	flex: 1;
	max-width: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.5rem 0.8rem;
	background: #151b26;
	border: 1px solid #283347;
	border-radius: 8px;
	color: #94a3b8;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
}

.n3tw-tc-tab-btn.is-active {
	background: #1e293b;
	border-color: #38bdf8;
	color: #fff;
}

.n3tw-tc-tab-pts {
	background: #0f172a;
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
	font-size: 0.8rem;
	color: #ffd100;
}

/* Trees Container */
.n3tw-tc-trees {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	justify-content: center;
}

/* Single Tree Card */
.n3tw-tc-tree-card {
	background: #0f141d;
	border: 1px solid #222b3b;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	display: flex;
	flex-direction: column;
}

.n3tw-tc-tree-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	background: #171f2c;
	border-bottom: 1px solid #253043;
}

.n3tw-tc-tree-identity {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.n3tw-tc-tree-icon {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	border: 1px solid #334155;
}

.n3tw-tc-tree-name {
	font-size: 1.05rem;
	font-weight: 700;
	color: #f8fafc;
	margin: 0;
}

.n3tw-tc-tree-points {
	font-size: 1.05rem;
	font-weight: 800;
	color: #ffd100;
}

.n3tw-tc-tree-reset {
	background: none;
	border: none;
	color: #64748b;
	font-size: 0.8rem;
	cursor: pointer;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	transition: color 0.15s;
}

.n3tw-tc-tree-reset:hover {
	color: #ef4444;
	background: rgba(239, 68, 68, 0.1);
}

/* Tree Canvas & Talent Grid */
.n3tw-tc-tree-canvas {
	position: relative;
	width: 100%;
	aspect-ratio: 300 / 460;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

.n3tw-tc-tree-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(8, 12, 19, 0.4) 0%, rgba(8, 12, 19, 0.7) 100%);
	pointer-events: none;
	z-index: 1;
}

.n3tw-tc-svg-layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 2;
}

.n3tw-tc-svg-line {
	stroke: #475569;
	stroke-width: 3;
	fill: none;
	transition: stroke 0.2s;
}

.n3tw-tc-svg-line.is-active {
	stroke: #ffd100;
}

.n3tw-tc-grid {
	position: relative;
	z-index: 3;
	width: 100%;
	height: 100%;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(7, 1fr);
	padding: 14px 18px;
	box-sizing: border-box;
}

/* Talent Node */
.n3tw-talent-node {
	position: relative;
	width: 44px;
	height: 44px;
	margin: auto;
	border-radius: 6px;
	cursor: pointer;
	box-sizing: border-box;
	transition: transform 0.12s, box-shadow 0.12s;
}

.n3tw-talent-node:hover {
	transform: scale(1.06);
}

.n3tw-talent-node.is-locked {
	filter: grayscale(85%) opacity(0.5);
	cursor: not-allowed;
}

.n3tw-talent-node.is-available {
	filter: none;
	box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}

.n3tw-talent-node.has-points {
	filter: none;
	box-shadow: 0 0 8px rgba(74, 222, 128, 0.9);
}

.n3tw-talent-node.is-maxed {
	filter: none;
	box-shadow: 0 0 10px rgba(255, 209, 0, 0.85);
}

.n3tw-talent-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 5px;
	display: block;
	border: 2px solid #2d3748;
}

.n3tw-talent-node.is-available .n3tw-talent-img {
	border-color: #22c55e;
}

.n3tw-talent-node.has-points .n3tw-talent-img {
	border-color: #4ade80;
}

.n3tw-talent-node.is-maxed .n3tw-talent-img {
	border-color: #ffd100;
}

/* Rank Badge */
.n3tw-talent-rank {
	position: absolute;
	bottom: -6px;
	right: -6px;
	background: #090d14;
	border: 1px solid #334155;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 800;
	color: #64748b;
	padding: 1px 4px;
	line-height: 1.2;
	pointer-events: none;
	z-index: 5;
}

.n3tw-talent-node.is-available .n3tw-talent-rank {
	color: #94a3b8;
	border-color: #475569;
}

.n3tw-talent-node.has-points .n3tw-talent-rank {
	color: #4ade80;
	border-color: #22c55e;
}

.n3tw-talent-node.is-maxed .n3tw-talent-rank {
	color: #ffd100;
	border-color: #ffd100;
}

/* Floating Tooltip */
.n3tw-tc-tooltip {
	position: fixed;
	z-index: 99999;
	pointer-events: none;
	background: rgba(10, 14, 23, 0.96);
	border: 1px solid #d4af37;
	border-radius: 6px;
	padding: 10px 14px;
	max-width: 320px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), inset 0 0 12px rgba(212, 175, 55, 0.15);
	font-size: 13px;
	line-height: 1.45;
	color: #f1f5f9;
	display: none;
	opacity: 0;
	transition: opacity 0.1s;
}

.n3tw-tc-tooltip.is-visible {
	display: block;
	opacity: 1;
}

.n3tw-tt-title {
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 2px;
}

.n3tw-tt-rank {
	font-size: 12px;
	color: #cbd5e1;
	margin-bottom: 6px;
}

.n3tw-tt-desc {
	color: #ffd100;
	margin-bottom: 8px;
}

.n3tw-tt-next-header {
	font-weight: 600;
	color: #38bdf8;
	margin-top: 6px;
}

.n3tw-tt-next-desc {
	color: #ffd100;
	margin-bottom: 6px;
}

.n3tw-tt-req-error {
	color: #ef4444;
	font-weight: 600;
	margin-top: 6px;
}

.n3tw-tt-hint {
	font-size: 11px;
	color: #64748b;
	margin-top: 8px;
	border-top: 1px solid #1e293b;
	padding-top: 4px;
}

/* Toast Notification */
.n3tw-tc-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: #10b981;
	color: #fff;
	padding: 10px 18px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
	z-index: 100000;
	opacity: 0;
	transform: translateY(10px);
	transition: all 0.25s ease-out;
	pointer-events: none;
}

.n3tw-tc-toast.is-show {
	opacity: 1;
	transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
	.n3tw-tc-trees {
		grid-template-columns: repeat(3, 1fr);
		gap: 1rem;
	}
	.n3tw-talent-node {
		width: 38px;
		height: 38px;
	}
}

@media (max-width: 860px) {
	.n3tw-tc-tabs {
		display: flex;
	}
	.n3tw-tc-trees {
		grid-template-columns: 1fr;
		max-width: 360px;
		margin: 0 auto;
	}
	.n3tw-tc-tree-card {
		display: none;
	}
	.n3tw-tc-tree-card.is-active-tab {
		display: flex;
	}
	.n3tw-talent-node {
		width: 44px;
		height: 44px;
	}
}
