/* ── FINAL BOSS KILL SWITCH ── */
#analyze-modal a,
#analyze-modal a:link,
#analyze-modal a:visited,
#analyze-modal a:hover,
#analyze-modal a:active,
.analyze-ext-link,
.analyze-news-source {
	color: #ffffff !important;
	text-decoration: none !important;
}

.analyze-corp-link {
	color: var(--text-muted) !important;
}

.analyze-corp-link:hover {
	color: var(--accent) !important;
}

/* Stock Analyzer */

.analyze-modal-header {
	padding: var(--space-xs) var(--space-sm);
	background: var(--bg-elevated);
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	gap: var(--space-xs);
}

.analyze-clear-header-btn,
.analyze-watchlist-btn,
.modal-close-btn {
	background: none;
	border: none;
	font-size: var(--font-md);
	color: var(--text-muted);
	cursor: pointer;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color var(--transition-fast);
}

.analyze-clear-header-btn:hover,
.modal-close-btn:hover {
	color: var(--text-primary);
}

.analyze-watchlist-btn {
	font-size: var(--font-lg);
	color: var(--text-muted);
}

.analyze-watchlist-btn:hover {
	color: var(--accent);
}

.analyze-watchlist-btn.added {
	color: var(--accent);
}

.analyze-modal-tabs {
	background: var(--bg-elevated);
	padding: 4px var(--space-sm);
	border-bottom: 1px solid var(--border);
	display: flex;
	gap: 4px;
	overflow-x: auto;
}

.analyze-tab {
	padding: 4px 8px;
	font-weight: 700;
	font-size: var(--font-xs);
	color: var(--text-muted);
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	transition: all var(--transition-fast);
	display: flex;
	align-items: center;
	gap: 4px;
}

.analyze-tab:hover {
	background: var(--bg-elevated);
	color: var(--text-secondary);
}

.analyze-tab.active {
	color: var(--accent);
	background: rgba(var(--accent-rgb), 0.1);
	border-color: rgba(var(--accent-rgb), 0.3);
}

.analyze-tab-close {
	width: 14px;
	height: 14px;
	font-size: 12px;
}

.analyze-symbol-content {
	display: none;
	padding: var(--space-md);
}

.analyze-symbol-content.active {
	display: block;
	padding: var(--space-sm);
}

/* Chart Section */
.analyze-chart-section {
	margin: var(--space-md) 0;
}

/* Company Description */
.analyze-company-desc {
	color: var(--text-secondary);
	line-height: 1.5;
	font-size: var(--font-md);
	margin-top: 4px;
}

.analyze-company-sector {
	font-size: var(--font-lg);
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: 0.3px;
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}

.analyze-company-sector .sector-divider {
	color: var(--accent);
	margin: 0 6px;
	font-weight: 600;
	font-size: var(--font-sm);
}

.sector-item {
	color: var(--text-primary);
	font-weight: 600;
}

.sector-country {
	color: var(--text-primary);
	font-weight: 600;
}

/* Metrics Grid - Compact */
.analyze-metrics-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 4px;
	margin-bottom: var(--space-sm);
}

.analyze-metric-card {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 4px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 40px;
}

.analyze-metric-card.highlight {
	background: rgba(var(--accent-rgb), 0.05);
	border-color: rgba(var(--accent-rgb), 0.3);
}

.analyze-metric-label {
	font-size: var(--font-sm);
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-bottom: 2px;
	font-weight: 600;
}

.analyze-metric-value {
	font-size: var(--font-lg);
	font-weight: 800;
	color: var(--text-primary);
	line-height: 1.2;
}

/* Catalyst Section - Compact */
.analyze-catalyst-section {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-left: 3px solid var(--secondary);
	border-radius: var(--radius-sm);
	padding: var(--space-sm);
	margin-bottom: var(--space-sm);
}

.analyze-catalyst-section.positive {
	border-left-color: var(--positive);
}

.analyze-catalyst-section.negative {
	border-left-color: var(--negative);
}

.analyze-catalyst-headline {
	font-size: var(--font-md);
	font-weight: 700;
	color: var(--text-primary);
	line-height: 1.4;
	margin-bottom: 4px;
}

.analyze-catalyst-toggle {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	color: inherit;
	gap: var(--space-sm);
}

.analyze-catalyst-toggle .analyze-catalyst-headline {
	margin-bottom: 0;
}

.analyze-catalyst-chevron {
	flex: 0 0 auto;
	color: var(--text-muted);
	font-size: var(--font-md);
	line-height: 1;
	transform: rotate(0deg);
	transition: transform var(--transition-fast);
}

.analyze-catalyst-summary {
	color: var(--text-secondary);
	line-height: 1.5;
	font-size: var(--font-md);
	margin-top: 6px;
	display: none;
}

.analyze-catalyst-section.expanded .analyze-catalyst-summary {
	display: block;
}

.analyze-catalyst-section.expanded .analyze-catalyst-chevron {
	transform: rotate(180deg);
}

.analyze-catalyst-meta {
	font-size: var(--font-sm);
	color: var(--text-muted);
	margin-top: 6px;
}

/* External Links - Compact */
.analyze-external-links {
	display: flex;
	gap: 4px;
	margin-top: var(--space-sm);
	padding-top: 4px;
	border-top: 1px solid var(--border);
}

.analyze-qa-btn {
	min-width: 36px;
	height: 28px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg-elevated);
	color: var(--text-secondary);
	font-weight: 700;
	font-size: var(--font-xs);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.analyze-qa-btn:hover {
	background: var(--border);
	color: var(--text-primary);
}

.analyze-qa-btn.active {
	background: var(--accent);
	color: var(--bg);
	border-color: var(--accent);
}

.analyze-qa-btn.active {
	color: var(--accent);
}

.analyze-news-section {
	margin-top: var(--space-sm);
}

.analyze-news-item {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: var(--space-sm);
	margin-bottom: 4px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: var(--space-xs);
}

.analyze-news-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.analyze-news-link:hover .analyze-news-headline {
	color: var(--accent);
}

.analyze-news-headline {
	font-size: var(--font-sm);
	font-weight: 500;
	color: var(--text-primary);
	line-height: 1.4;
}

.analyze-no-news {
	font-size: var(--font-sm);
	color: var(--text-muted);
	text-align: center;
	padding: var(--space-sm);
}

.analyze-section-title {
	font-weight: 800;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin: 8px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.analyze-last-news {
	color: var(--text-muted);
	margin-bottom: 4px;
}

.analyze-corp-grid {
	display: grid;
	gap: 4px;
	margin-bottom: 12px;
}

.analyze-corp-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
}

.analyze-corp-icon {
	font-size: 1rem;
}

.analyze-corp-label {
	color: var(--text-muted);
}

.analyze-corp-value {
	color: var(--text-primary);
}

.analyze-skeleton {
	background: linear-gradient(
		90deg,
		var(--bg-elevated) 25%,
		var(--border) 50%,
		var(--bg-elevated) 75%
	);
	background-size: 200% 100%;
	animation: shimmer 1.5s infinite;
	border-radius: 4px;
}

@keyframes shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.analyze-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	color: var(--text-muted);
}

.analyze-error {
	background: rgba(var(--negative-rgb), 0.1);
	border: 1px solid var(--negative);
	border-radius: var(--radius-md);
	padding: 10px;
	margin-bottom: 12px;
	color: var(--negative);
}

.analyze-no-news {
	color: var(--text-muted);
	text-align: center;
	padding: 12px;
}

.analyze-input {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 8px 12px;
	color: var(--text-primary);
	font-family: inherit;
	width: 100%;
}

.analyze-input:focus {
	outline: none;
	border-color: var(--accent);
}

.analyze-close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	color: var(--text-muted);
	font-size: 1.5rem;
	cursor: pointer;
	padding: 4px 8px;
}

.analyze-close:hover {
	color: var(--text-primary);
}

/* Empty State - Compact */
.analyze-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: var(--space-md);
	text-align: center;
	min-height: 150px;
}

.analyze-empty-icon {
	font-size: 2rem;
	margin-bottom: var(--space-sm);
}

.analyze-empty-title {
	font-size: var(--font-md);
	font-weight: 700;
	color: var(--text-primary);
	margin-bottom: var(--space-xs);
}

.analyze-empty-text {
	color: var(--text-muted);
	font-size: var(--font-sm);
}

/* Footer with shortcuts hint - Compact */
.analyze-modal-footer {
	padding: var(--space-xs) var(--space-sm);
	background: var(--bg);
	border-top: 1px solid var(--border);
	font-size: var(--font-xs);
	color: var(--text-muted);
}

.analyze-shortcuts-hint {
	display: flex;
	gap: var(--space-md);
	justify-content: center;
	flex-wrap: wrap;
}

.analyze-shortcut-link {
	display: inline-flex;
	align-items: center;
	color: var(--text-muted);
	text-decoration: none;
	font-weight: 600;
	font-size: var(--font-xs);
	cursor: pointer;
	transition: color var(--transition-fast);
}

.analyze-shortcut-link:hover {
	color: var(--accent);
}

.analyze-shortcut {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	background: var(--border);
	border-radius: 3px;
	font-weight: 700;
	font-size: 10px;
	margin-right: 4px;
	color: var(--text-secondary);
}

/* Loading text */
.analyze-modal-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	padding: var(--space-lg);
}

.analyze-loading-text {
	font-size: var(--font-sm);
	color: var(--text-muted);
}

/* Larger tab close button */
.analyze-tab-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-left: 4px;
	border-radius: 50%;
	font-size: 14px;
	line-height: 1;
	color: var(--text-muted);
	transition: all var(--transition-fast);
}

.analyze-tab-close:hover {
	background: var(--negative);
	color: white;
}

/* Focus visible for accessibility */
#analyze-modal input:focus,
#analyze-modal button:focus {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

#analyze-modal input:focus:not(:focus-visible),
#analyze-modal button:focus:not(:focus-visible) {
	outline: none;
}
