/* MCP Access — Fear & Greed Index widget styles.
   Enqueued lazily by the [mcp_fear_greed_index] shortcode. */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

.crypto-viz-container {
	width: 100%;
	margin: 40px auto;
	padding: 0;
	position: relative;
}
.crypto-viz-header {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 6px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	margin-bottom: 20px;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	border: 1px solid #e5e5e5;
}
.crypto-viz-coin-container {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 50%;
}
.crypto-viz-timeframe-data-container {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 50%;
	gap: 0px;
}
.crypto-viz-coin-wrapper, .crypto-viz-timeframe-wrapper, .crypto-viz-data-range-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}
.crypto-viz-coin-label, .crypto-viz-timeframe-label, .crypto-viz-data-range-label {
	font-family: 'Nunito', sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #333333;
}
#crypto-viz-id-timeframe-select, #crypto-viz-id-data-range-select {
	font-family: 'Nunito', sans-serif;
	padding: 10px 20px;
	font-size: 16px;
	border-radius: 6px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	background: #ffffff;
	color: #333333;
	cursor: pointer;
	transition: border-color 0.3s ease, background-color 0.3s ease;
	background-image: url('data:image/svg+xml;utf8,<svg fill="%23333333" height="16" viewBox="0 0 24 24" width="16" xmlns="https://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
	background-repeat: no-repeat;
	background-position: right 10px center;
	appearance: none;
	width: 180px;
}
#crypto-viz-id-timeframe-select:hover, #crypto-viz-id-data-range-select:hover {
	border-color: #603FD7;
	background-color: #f5f5f5;
}
#crypto-viz-id-timeframe-select:focus, #crypto-viz-id-data-range-select:focus {
	border-color: #603FD7;
	outline: none;
	background-image: url('data:image/svg+xml;utf8,<svg fill="%23603FD7" height="16" viewBox="0 0 24 24" width="16" xmlns="https://www.w3.org/2000/svg"><path d="M7 14l5-5 5 5z"/></svg>');
}
.crypto-viz-logo-price-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}
.crypto-viz-coin-logo {
	width: 30px;
	height: 30px;
	filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}
.crypto-viz-price-display {
	font-family: 'Nunito', sans-serif;
	font-size: 20px;
	font-weight: 600;
	color: #333333;
}
.crypto-viz-chart-section {
	width: 100%;
	margin-bottom: 20px;
	padding: 20px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 6px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
	position: relative;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid #e5e5e5;
	animation: fadeIn 0.5s ease-in-out;
}
.crypto-viz-content-wrapper {
	display: flex;
	width: 100%;
	gap: 20px;
}
.crypto-viz-gauge-container {
	width: 35%;
	padding: 20px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 6px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
	position: relative;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid #e5e5e5;
	animation: fadeIn 0.5s ease-in-out;
}
.crypto-viz-empty-container {
	width: 65%;
	padding: 20px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 6px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
	color: #333333;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid #e5e5e5;
	animation: fadeIn 0.5s ease-in-out;
}
.crypto-viz-indicators-heading { font-family: 'Nunito', sans-serif; font-size: 24px; font-weight: 700; color: #333333; margin-bottom: 5px; }
.crypto-viz-indicators-subtext { font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 400; color: #666666; margin-bottom: 20px; }
.crypto-viz-gauge-heading { font-family: 'Nunito', sans-serif; font-size: 24px; font-weight: 700; color: #333333; margin-bottom: 5px; }
.crypto-viz-gauge-subtext { font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 400; margin-bottom: 20px; color: #333333; }
.crypto-viz-gauge-subtext .crypto-viz-score { font-weight: bold; color: inherit; }
.crypto-viz-score-extreme-fear { color: #D64550; }
.crypto-viz-score-fear { color: #E67E22; }
.crypto-viz-score-neutral { color: #F4D03F; }
.crypto-viz-score-greed { color: #7DCE13; }
.crypto-viz-score-extreme-greed { color: #4DA8DA; }
.crypto-viz-gauge-value-container { display: flex; justify-content: center; align-items: center; margin-top: -100px; margin-bottom: 50px; }
.crypto-viz-gauge-value {
	font-family: 'Nunito', sans-serif;
	font-size: 30px;
	font-weight: bold;
	color: #6E6E6E;
	text-align: center;
	padding: 0px 20px;
	border-radius: 6px;
	background: transparent;
	border: 1px solid transparent;
	transition: background 0.3s ease, border-color 0.3s ease;
}
#crypto-viz-id-price-chart, #crypto-viz-id-gauge-chart { width: 100%; height: 450px; }
#crypto-viz-id-gauge-chart { margin-top: -30%; }
.crypto-viz-spinner {
	display: none;
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	border: 4px solid rgba(0, 0, 0, 0.3);
	border-top: 4px solid #603FD7;
	border-radius: 50%;
	width: 40px; height: 40px;
	animation: spin 1s linear infinite;
}
@keyframes spin {
	0%   { transform: translate(-50%, -50%) rotate(0deg); }
	100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.crypto-viz-gauge-footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.crypto-viz-divider { width: 100%; height: 1px; background-color: rgba(0, 0, 0, 0.1); margin-bottom: 10px; }
.crypto-viz-mcp-link { font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700; color: #333333; text-decoration: none; transition: color 0.3s ease; display: flex; align-items: center; gap: 5px; }
.crypto-viz-mcp-link:hover { color: #603FD7; }
.crypto-viz-gauge-date { font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 400; color: #333333; }
.crypto-viz-indicators-wrapper { display: flex; justify-content: space-between; }
.crypto-viz-indicator-column { width: 48%; }
.crypto-viz-indicator-card {
	display: flex; justify-content: space-between; align-items: center;
	padding: 10px; margin-bottom: 10px;
	background: #f5f5f5; border-radius: 6px; border: 1px solid #ddd;
	position: relative;
	transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.crypto-viz-indicator-card:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.crypto-viz-indicator-name { color: #333333; font-size: 16px; font-family: 'Nunito', sans-serif; }
.crypto-viz-progress-bar { width: 50px; height: 50px; position: relative; }
.crypto-viz-progress-bar .crypto-viz-tooltip {
	visibility: hidden;
	width: 60px;
	background-color: #333333; color: #fff;
	text-align: center; border-radius: 6px; padding: 5px;
	position: absolute; z-index: 1;
	bottom: 125%; left: 50%; margin-left: -30px;
	font-size: 12px; font-family: 'Nunito', sans-serif;
	opacity: 0; transition: opacity 0.2s;
}
.crypto-viz-progress-bar:hover .crypto-viz-tooltip { visibility: visible; opacity: 1; }
.crypto-viz-progress-bar canvas { border-radius: 50%; overflow: hidden; }
.crypto-viz-sentiment-options {
	position: relative; display: flex; flex-wrap: wrap;
	border-radius: 0.5rem; background-color: #eee;
	box-sizing: border-box; box-shadow: 0 0 0px 1px rgba(0, 0, 0, 0.06);
	padding: 0.25rem; width: 300px; font-size: 14px; margin: 20px auto;
}
.crypto-viz-sentiment-options .crypto-viz-option { flex: 1 1 auto; text-align: center; }
.crypto-viz-sentiment-options .crypto-viz-option input { display: none; }
.crypto-viz-sentiment-options .crypto-viz-option .crypto-viz-label-text {
	display: flex; cursor: pointer;
	align-items: center; justify-content: center;
	border-radius: 0.5rem; border: none;
	padding: 0.5rem 1rem; color: #000000;
	transition: all 0.15s ease-in-out;
}
.crypto-viz-sentiment-options .crypto-viz-option input:checked + .crypto-viz-label-text {
	background-image: linear-gradient(90deg, #4e52c1, #a664ec);
	color: #ffffff; font-weight: 600;
	position: relative;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	animation: select 0.3s ease;
}
.crypto-viz-sentiment-options .crypto-viz-option:hover .crypto-viz-label-text { background-color: rgba(255, 255, 255, 0.5); }
@keyframes select {
	0%   { transform: scale(0.95); }
	50%  { transform: scale(1.05); }
	100% { transform: scale(1); }
}
.crypto-viz-tab-content { width: 100%; }
.crypto-viz-sentiment-wrapper { display: flex; gap: 20px; animation: fadeIn 0.5s ease-in-out; }
.crypto-viz-sentiment-left {
	width: 15%; background: rgba(255, 255, 255, 0.5);
	border-radius: 6px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border: 1px solid #e5e5e5; padding: 10px;
	height: 500px; overflow-y: auto;
}
.crypto-viz-sentiment-right {
	width: 85%; background: rgba(255, 255, 255, 0.5);
	border-radius: 6px 6px 6px 0; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border: 1px solid #e5e5e5; height: 500px; padding: 20px;
}
.crypto-viz-sentiment-tabs { display: flex; flex-direction: column; }
.crypto-viz-sentiment-tab {
	padding: 10px; background: #f5f5f5;
	border: 1px solid #ddd; cursor: pointer;
	font-family: 'Nunito', sans-serif; font-size: 14px; color: #333333;
	margin-bottom: 5px; border-radius: 4px;
	font-weight: 700;
	transition: background-color 0.3s ease, color 0.3s ease;
}
.crypto-viz-sentiment-tab:hover { background: #e6e6fa; color: #603FD7; }
.crypto-viz-sentiment-tab.crypto-viz-active { background: #e6e6fa; color: #603FD7; border-left: 2px solid #603FD7; }
.crypto-viz-sentiment-content { height: 100%; display: flex; flex-direction: column; gap: 20px; }
.crypto-viz-sentiment-header { display: flex; align-items: center; width: 100%; gap: 10px; justify-content: space-between; }
.crypto-viz-sentiment-title { font-family: 'Nunito', sans-serif; font-size: 18px; font-weight: 700; color: #333333; }
.crypto-viz-sentiment-progress-value {
	font-family: 'Nunito', sans-serif;
	font-size: 16px; font-weight: 700; color: #6E6E6E;
	padding: 2px 20px; border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	background: transparent; border: 1px solid transparent;
	transition: color 0.3s ease;
}
.crypto-viz-sentiment-progress-container {
	width: 100%; height: 24px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 12px; overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.1);
	position: relative;
	backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.crypto-viz-sentiment-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #F4D03F, #F4D03F);
	transition: width 0.5s ease;
	width: 0%; border-radius: 12px 0 0 12px;
}
.crypto-viz-sentiment-bar-chart { width: 100%; height: 400px; margin-top: 20px; flex-grow: 1; }
.crypto-viz-content-tabs { display: flex; gap: 10px; }
.crypto-viz-content-tab {
	padding: 8px 16px; background: #f5f5f5;
	border: 1px solid #ddd; cursor: pointer;
	font-family: 'Nunito', sans-serif; font-size: 14px; color: #333333;
	border-radius: 4px; font-weight: 600;
	transition: background-color 0.3s ease, color 0.3s ease;
}
.crypto-viz-content-tab:hover { background: #e6e6fa; color: #603FD7; }
.crypto-viz-content-tab.crypto-viz-active { background: #e6e6fa; color: #603FD7; border-bottom: 2px solid #603FD7; }
.crypto-viz-tab-pane { display: none; flex-grow: 1; flex-direction: column; gap: 20px; height: calc(100% - 60px); }
.crypto-viz-tab-pane.crypto-viz-active { display: flex; }
.crypto-viz-description-text {
	font-family: 'Nunito', sans-serif; font-size: 14px;
	color: #666666; line-height: 1.6;
	overflow-y: auto; flex-grow: 1;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.crypto-viz-loading { opacity: 0.5; transition: opacity 0.3s ease; }

@media (max-width: 768px) {
	.crypto-viz-header { flex-direction: column; align-items: flex-start; gap: 20px; }
	.crypto-viz-coin-container, .crypto-viz-timeframe-data-container { width: 100%; justify-content: flex-start; }
	.crypto-viz-timeframe-data-container { margin-top: 10px; }
	#crypto-viz-id-coin-select, #crypto-viz-id-timeframe-select, #crypto-viz-id-data-range-select { width: 100%; max-width: 180px; }
	.crypto-viz-content-wrapper, .crypto-viz-sentiment-wrapper { flex-direction: column; gap: 10px; }
	.crypto-viz-chart-section, .crypto-viz-gauge-container, .crypto-viz-empty-container, .crypto-viz-sentiment-left, .crypto-viz-sentiment-right { width: 100%; margin-bottom: 20px; }
	.crypto-viz-sentiment-right { height: auto; min-height: 500px; }
	.crypto-viz-sentiment-header { flex-direction: column; align-items: flex-start; gap: 10px; }
	.crypto-viz-content-tabs { width: 100%; justify-content: space-between; }
	.crypto-viz-sentiment-bar-chart { height: 300px; }
	.crypto-viz-tab-pane { height: calc(100% - 100px); }
	#crypto-viz-id-price-chart, #crypto-viz-id-gauge-chart { height: 350px; }
	.crypto-viz-container { padding: 20px; margin: 20px; }
	.crypto-viz-indicators-wrapper { flex-direction: column; }
	.crypto-viz-indicator-column { width: 100%; }
	.crypto-viz-sentiment-options { width: 100%; justify-content: center; }
	.crypto-viz-sentiment-tabs { flex-direction: row; flex-wrap: wrap; gap: 5px; }
	.crypto-viz-sentiment-tab { flex: 1 1 45%; margin-bottom: 5px; }
}

/* Dark mode */
html.wp-dark-mode-active .crypto-viz-header,
html.wp-dark-mode-active .crypto-viz-chart-section,
html.wp-dark-mode-active .crypto-viz-gauge-container,
html.wp-dark-mode-active .crypto-viz-empty-container,
html.wp-dark-mode-active .crypto-viz-sentiment-left,
html.wp-dark-mode-active .crypto-viz-sentiment-right { background: rgba(40, 40, 40, 0.7); border: 1px solid #444444; color: #e0e0e0; }
html.wp-dark-mode-active .crypto-viz-header { background: rgba(40, 40, 40, 0.5); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
html.wp-dark-mode-active .crypto-viz-coin-label,
html.wp-dark-mode-active .crypto-viz-timeframe-label,
html.wp-dark-mode-active .crypto-viz-data-range-label,
html.wp-dark-mode-active .crypto-viz-price-display,
html.wp-dark-mode-active .crypto-viz-indicators-heading,
html.wp-dark-mode-active .crypto-viz-gauge-heading,
html.wp-dark-mode-active .crypto-viz-sentiment-title { color: #e0e0e0; }
html.wp-dark-mode-active #crypto-viz-id-timeframe-select,
html.wp-dark-mode-active #crypto-viz-id-data-range-select {
	background: #333333; color: #e0e0e0; border: 1px solid #555555;
	background-image: none; position: relative; padding-right: 30px;
	appearance: none; -webkit-appearance: none; -moz-appearance: none;
}
html.wp-dark-mode-active #crypto-viz-id-timeframe-select:hover,
html.wp-dark-mode-active #crypto-viz-id-data-range-select:hover { background-color: #444444; border-color: #8a6bff; }
html.wp-dark-mode-active #crypto-viz-id-timeframe-select:focus,
html.wp-dark-mode-active #crypto-viz-id-data-range-select:focus { border-color: #8a6bff; }
html.wp-dark-mode-active .crypto-viz-indicators-subtext,
html.wp-dark-mode-active .crypto-viz-gauge-subtext,
html.wp-dark-mode-active .crypto-viz-gauge-date,
html.wp-dark-mode-active .crypto-viz-description-text { color: #b0b0b0; }
html.wp-dark-mode-active .crypto-viz-gauge-value { color: #e0e0e0; }
html.wp-dark-mode-active .crypto-viz-spinner { border: 4px solid rgba(255, 255, 255, 0.3); border-top: 4px solid #8a6bff; }
html.wp-dark-mode-active .crypto-viz-mcp-link { color: #e0e0e0; }
html.wp-dark-mode-active .crypto-viz-mcp-link:hover { color: #8a6bff; }
html.wp-dark-mode-active .crypto-viz-indicator-card { background: #333333; border: 1px solid #555555; color: #e0e0e0; }
html.wp-dark-mode-active .crypto-viz-indicator-name { color: #e0e0e0; }
html.wp-dark-mode-active .crypto-viz-progress-bar canvas { background: #2a2a2a; }
html.wp-dark-mode-active .crypto-viz-progress-bar .crypto-viz-tooltip { background-color: #444444; color: #e0e0e0; }
html.wp-dark-mode-active .crypto-viz-sentiment-options { background-color: #333333; box-shadow: 0 0 0px 1px rgba(255, 255, 255, 0.06); }
html.wp-dark-mode-active .crypto-viz-sentiment-options .crypto-viz-option .crypto-viz-label-text { color: #e0e0e0; }
html.wp-dark-mode-active .crypto-viz-sentiment-options .crypto-viz-option:hover .crypto-viz-label-text { background-color: rgba(255, 255, 255, 0.1); }
html.wp-dark-mode-active .crypto-viz-sentiment-options .crypto-viz-option input:checked + .crypto-viz-label-text { color: #ffffff; }
html.wp-dark-mode-active .crypto-viz-sentiment-tab { background: #333333; border: 1px solid #555555; color: #e0e0e0; transition: all 0.3s ease; }
html.wp-dark-mode-active .crypto-viz-sentiment-tab:hover { background: #444444; color: #a78bfa; }
html.wp-dark-mode-active .crypto-viz-sentiment-tab.crypto-viz-active {
	background: linear-gradient(90deg, #5555aa, #444444);
	color: #ffffff; border-left: 3px solid #8a6bff;
	box-shadow: 0 2px 8px rgba(138, 107, 255, 0.3);
	font-weight: 700;
}
html.wp-dark-mode-active .crypto-viz-content-tab { background: #333333; border: 1px solid #555555; color: #e0e0e0; transition: all 0.3s ease; }
html.wp-dark-mode-active .crypto-viz-content-tab:hover { background: #444444; color: #a78bfa; }
html.wp-dark-mode-active .crypto-viz-content-tab.crypto-viz-active {
	background: linear-gradient(0deg, #5555aa, #444444);
	color: #ffffff; border-bottom: 3px solid #8a6bff;
	box-shadow: 0 2px 8px rgba(138, 107, 255, 0.3);
	font-weight: 700;
}
html.wp-dark-mode-active .crypto-viz-sentiment-progress-container { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
html.wp-dark-mode-active .crypto-viz-sentiment-progress-value { color: #e0e0e0; }
html.wp-dark-mode-active .crypto-viz-divider { background-color: rgba(255, 255, 255, 0.1); }

/* Locked timeframe overlay (shown when free user picks a Pro timeframe) */
.crypto-viz-locked-blur-target {
	transition: filter 200ms ease;
}
.crypto-viz-container.is-pro-locked .crypto-viz-locked-blur-target {
	filter: blur(8px);
	pointer-events: none;
	user-select: none;
}
.crypto-viz-pro-overlay {
	position: absolute;
	left: 0;
	right: 0;
	top: 100px; /* clear the header so the timeframe dropdown stays usable */
	bottom: 0;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 20px;
	z-index: 10;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.85) 60%);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	border-radius: 6px;
	animation: fadeIn 200ms ease;
}
.crypto-viz-pro-overlay[hidden] { display: none; }
.crypto-viz-pro-overlay-inner {
	max-width: 480px;
	width: 100%;
}
html.wp-dark-mode-active .crypto-viz-pro-overlay {
	background: linear-gradient(180deg, rgba(20, 20, 24, 0.55) 0%, rgba(20, 20, 24, 0.85) 60%);
}

/* Locked options in the timeframe / data-range dropdowns */
#crypto-viz-id-timeframe-select option[data-locked="1"],
#crypto-viz-id-data-range-select option[data-locked="1"] {
	color: #8b94a3;
	font-style: italic;
}

/* Sentiment-history note for free users */
.crypto-viz-sentiment-note {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
	padding: 6px 10px;
	background: rgba(45, 108, 223, 0.08);
	border: 1px solid rgba(45, 108, 223, 0.2);
	border-radius: 6px;
	font-family: 'Nunito', sans-serif;
	font-size: 12px;
	color: #2d6cdf;
}
html.wp-dark-mode-active .crypto-viz-sentiment-note {
	background: rgba(138, 107, 255, 0.1);
	border-color: rgba(138, 107, 255, 0.3);
	color: #a78bfa;
}
