/* ---------- Sidebar widget ---------- */
.tp-nino-widget {
	--tp-nino-color: #16a34a;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 14px 16px;
	background: #fff;
	font-size: 14px;
	line-height: 1.4;
}

.tp-nino-status {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.tp-nino-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--tp-nino-color);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--tp-nino-color) 20%, transparent);
}

.tp-nino-phase {
	font-weight: 700;
	font-size: 16px;
	color: var(--tp-nino-color);
}

.tp-nino-intensity {
	font-size: 12px;
	background: color-mix(in srgb, var(--tp-nino-color) 14%, #fff);
	color: var(--tp-nino-color);
	padding: 2px 8px;
	border-radius: 999px;
}

.tp-nino-metrics {
	list-style: none;
	margin: 12px 0;
	padding: 0;
}

.tp-nino-metrics li {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px solid #f1f1f1;
}

.tp-nino-metrics li:last-child {
	border-bottom: none;
}

.tp-nino-metric-label {
	color: #6b7280;
}

.tp-nino-metric-value {
	font-weight: 600;
}

.tp-nino-link {
	display: inline-block;
	margin-top: 4px;
	font-weight: 600;
	color: var(--tp-nino-color);
	text-decoration: none;
}

.tp-nino-updated {
	margin-top: 10px;
	font-size: 11px;
	color: #9ca3af;
}

.tp-nino-empty {
	color: #6b7280;
	font-size: 14px;
}

/* ---------- Full page ---------- */
.tp-nino-page {
	--tp-nino-color: #16a34a;
	max-width: 920px;
	margin: 0 auto;
	font-size: 16px;
}

.tp-nino-hero {
	background: linear-gradient(135deg, color-mix(in srgb, var(--tp-nino-color) 12%, #fff), #fff);
	border: 1px solid #e5e7eb;
	border-left: 6px solid var(--tp-nino-color);
	border-radius: 14px;
	padding: 24px;
	margin-bottom: 24px;
}

.tp-nino-hero-status {
	display: flex;
	align-items: center;
	gap: 14px;
}

.tp-nino-dot-lg {
	width: 22px;
	height: 22px;
}

.tp-nino-hero-label {
	font-size: 28px;
	font-weight: 800;
	color: var(--tp-nino-color);
	line-height: 1.1;
}

.tp-nino-hero-intensity {
	font-size: 15px;
	color: #4b5563;
}

.tp-nino-hero-desc {
	margin: 14px 0 0;
	color: #374151;
}

/* ---------- Event Timeline ---------- */
.tp-nino-timeline {
	margin-bottom: 28px;
}
.tp-nino-timeline h2 {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 16px;
	color: #111827;
}
.tp-nino-timeline-track {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	position: relative;
}
.tp-nino-timeline-track::before {
	content: '';
	position: absolute;
	top: 20px;
	left: 24px;
	right: 24px;
	height: 3px;
	background: linear-gradient(to right, #22c55e, var(--tp-nino-color, #f97316), #ef4444);
	border-radius: 2px;
	z-index: 0;
}
.tp-tl-step {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 14px 16px;
	position: relative;
	z-index: 1;
}
.tp-tl-icon {
	font-size: 18px;
	line-height: 1;
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #f3f4f6;
}
.tp-tl-start .tp-tl-icon { background: #dcfce7; color: #16a34a; }
.tp-tl-peak .tp-tl-icon { background: #fee2e2; color: #dc2626; }
.tp-tl-duration .tp-tl-icon { background: #dbeafe; color: #2563eb; }
.tp-tl-end .tp-tl-icon { background: #fef3c7; color: #d97706; }
.tp-tl-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6b7280;
	margin-bottom: 2px;
}
.tp-tl-value {
	font-size: 15px;
	font-weight: 700;
	color: #111827;
}
.tp-tl-value small {
	font-weight: 500;
	color: #6b7280;
	font-size: 13px;
}
.tp-tl-alert {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #fef9c3;
	border: 1px solid #fde047;
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 16px;
	color: #713f12;
	font-size: 14px;
	line-height: 1.5;
}
.tp-tl-alert-icon {
	font-size: 22px;
	flex-shrink: 0;
}
.tp-tl-alert p {
	margin: 0;
}
.tp-nino-timeline-neutral {
	margin-bottom: 28px;
}
.tp-tl-neutral-msg {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 10px;
	padding: 16px 20px;
	color: #166534;
	font-size: 15px;
	line-height: 1.5;
}

@media (max-width: 600px) {
	.tp-nino-timeline-track {
		grid-template-columns: 1fr;
	}
	.tp-nino-timeline-track::before {
		display: none;
	}
}

.tp-nino-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}

.tp-nino-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 18px;
}

.tp-nino-card-label {
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 6px;
}

.tp-nino-card-value {
	font-size: 30px;
	font-weight: 800;
	color: #111827;
}

.tp-nino-card-value small {
	font-size: 14px;
	font-weight: 600;
	color: #6b7280;
}

.tp-nino-card-sub {
	margin-top: 4px;
	font-size: 13px;
	color: #6b7280;
}

.tp-nino-section {
	margin-bottom: 32px;
}

.tp-nino-section h2 {
	font-size: 20px;
	margin-bottom: 14px;
}

.tp-nino-table-wrap {
	overflow-x: auto;
}

.tp-nino-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
}

.tp-nino-table th,
.tp-nino-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid #f1f1f1;
}

.tp-nino-table th {
	background: #f9fafb;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6b7280;
}

.tp-nino-table .tp-pos {
	color: #b91c1c;
	font-weight: 700;
}

.tp-nino-table .tp-neg {
	color: #1d4ed8;
	font-weight: 700;
}

.tp-nino-note {
	font-size: 13px;
	color: #6b7280;
	margin-top: 8px;
}

.tp-nino-chart {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	height: 220px;
	padding: 16px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow-x: auto;
}

/* Interactive map (Leaflet) */
.tp-nino-leaflet {
	height: 380px;
	width: 100%;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	z-index: 0;
}

.tp-nino-leaflet .leaflet-container {
	border-radius: 12px;
}

/* Interactive ONI chart (Chart.js) */
.tp-nino-chart-wrap {
	position: relative;
	height: 340px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 14px;
}

.tp-nino-bar-col {
	flex: 1 1 0;
	min-width: 44px;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	justify-content: flex-end;
}

.tp-nino-bar-track {
	flex: 1 1 auto;
	width: 100%;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.tp-nino-bar {
	width: 60%;
	border-radius: 6px 6px 0 0;
	min-height: 4px;
}

.tp-bar-warm {
	background: #ea580c;
}

.tp-bar-cold {
	background: #1d4ed8;
}

.tp-bar-neutral {
	background: #16a34a;
}

.tp-nino-bar-val {
	font-size: 11px;
	font-weight: 600;
	margin-top: 4px;
	color: #374151;
}

.tp-nino-bar-lbl {
	font-size: 10px;
	color: #9ca3af;
}

.tp-nino-footer {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	border-top: 1px solid #e5e7eb;
	padding-top: 14px;
	font-size: 13px;
	color: #6b7280;
}

/* ---------- Trend card ---------- */
.tp-nino-card-value.tp-trend-up small,
.tp-nino-card-value.tp-trend-down small,
.tp-nino-card-value.tp-trend-stable small {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #374151;
}

.tp-trend-icon {
	font-size: 26px;
	line-height: 1;
}

.tp-trend-up .tp-trend-icon {
	color: #dc2626;
}

.tp-trend-down .tp-trend-icon {
	color: #2563eb;
}

.tp-trend-stable .tp-trend-icon {
	color: #6b7280;
}

/* ---------- Map ---------- */
.tp-nino-map svg {
	width: 100%;
	height: auto;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #eaf3fb;
	display: block;
}

.tp-map-land-txt {
	font-size: 12px;
	fill: #4b5563;
	font-weight: 600;
}

.tp-map-eq {
	font-size: 11px;
	fill: #64748b;
}

.tp-map-name {
	font-size: 15px;
	font-weight: 700;
	fill: #fff;
	paint-order: stroke;
	stroke: rgba(0, 0, 0, 0.25);
	stroke-width: 0.6px;
}

.tp-map-val {
	font-size: 15px;
	font-weight: 800;
	fill: #fff;
	paint-order: stroke;
	stroke: rgba(0, 0, 0, 0.25);
	stroke-width: 0.6px;
}

.tp-nino-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin-top: 12px;
	font-size: 12px;
	color: #4b5563;
}

.tp-leg-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tp-leg-item i {
	width: 14px;
	height: 14px;
	border-radius: 3px;
	display: inline-block;
}

/* ---------- Forecast ---------- */
.tp-nino-forecast {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 16px;
}

.tp-fc-card {
	--tp-nino-color: #16a34a;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-top: 4px solid var(--tp-nino-color);
	border-radius: 12px;
	padding: 16px;
	text-align: center;
}

.tp-fc-season {
	font-size: 13px;
	color: #6b7280;
	font-weight: 600;
}

.tp-fc-value {
	font-size: 28px;
	font-weight: 800;
	color: #111827;
	margin: 6px 0;
}

.tp-fc-value small {
	font-size: 13px;
	color: #6b7280;
	font-weight: 600;
}

.tp-fc-phase {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-weight: 600;
	color: var(--tp-nino-color);
	flex-wrap: wrap;
}

.tp-fc-phase small {
	color: #6b7280;
	font-weight: 500;
}

.tp-fc-note {
	font-style: italic;
}

/* ---------- Widget trend ---------- */
.tp-nino-trend {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
}

.tp-nino-trend.up {
	color: #dc2626;
}

.tp-nino-trend.down {
	color: #2563eb;
}

.tp-nino-trend.stable {
	color: #6b7280;
}

/* ---------- Block ---------- */
.tp-nino-block-title {
	margin: 0 0 10px;
	font-size: 18px;
}

.tp-nino-block-editor {
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	padding: 14px 16px;
	background: #f8fafc;
}

.tp-nino-block-title-input {
	font-size: 18px;
	font-weight: 700;
	width: 100%;
	background: transparent;
	border: none;
}

.tp-nino-block-note {
	margin-top: 10px;
	color: #475569;
	font-size: 13px;
	border-left: 4px solid #38bdf8;
	padding: 8px 12px;
	background: #fff;
	border-radius: 0 8px 8px 0;
}

.tp-nino-block-note p {
	margin: 6px 0 0;
}

@media (max-width: 600px) {
	.tp-nino-hero-label {
		font-size: 24px;
	}
}
