/*
 * Weather Map IFSC — Stylesheet
 * Mapa fullscreen como background, todos os dados sobrepostos em painéis transparentes
 * Paleta IFSC: Verde #5B9F54, Vermelho #BB3531
 */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

/* ── Reset & Base ──────────────────────────── */
.wmifsc-root *,
.wmifsc-root *::before,
.wmifsc-root *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.wmifsc-root {
	--ifsc-green: #5B9F54;
	--ifsc-red: #BB3531;
	--bg-card: rgba(17, 24, 32, 0.7);
	--text-primary: #f0f4f8;
	--text-secondary: #8899aa;
	--text-accent: #5B9F54;
	--border-subtle: rgba(91, 159, 84, 0.25);
	--glow-green: 0 0 20px rgba(91, 159, 84, 0.2);

	font-family: 'Open Sans', Arial, sans-serif;
	color: var(--text-primary);
	width: 100vw;
	height: 100vh;
	margin: 0;
	overflow: hidden;
	position: fixed;
	top: 0;
	left: 0;
	background: #0a0e14;
	z-index: 9999;
}

/* ── Map: fullscreen background ─────────────────── */
.wmifsc-main {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
}

.wmifsc-map-container {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.leaflet-control-attribution { display: none !important; }
.leaflet-control-zoom { display: none !important; }

/* ── All overlays: absolute positioned over map ─── */
.wmifsc-header,
.wmifsc-current-overlay,
.wmifsc-wind-overlay,
.wmifsc-databar,
.wmifsc-hourly,
.wmifsc-daily,
.wmifsc-footer {
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	position: absolute;
	left: 0;
	right: 0;
	z-index: 10;
}

/* ── Header (top bar) ─────────────────────────── */
.wmifsc-header {
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	background: linear-gradient(180deg, rgba(10,14,20,0.9) 0%, rgba(10,14,20,0.3) 100%);
}

.wmifsc-logo-wrap {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
}

.wmifsc-logo-wrap svg {
	width: 100%;
	height: 100%;
}

.wmifsc-location {
	text-align: center;
	flex: 1;
}

.wmifsc-location-name {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: 0.5px;
	text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.wmifsc-location-coords {
	display: block;
	font-size: 0.65rem;
	color: var(--text-secondary);
	letter-spacing: 0.3px;
	text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.wmifsc-datetime {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--text-accent);
	white-space: nowrap;
	text-align: right;
	min-width: 110px;
	text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ── Current Conditions (top-left overlay on map) ── */
.wmifsc-current-overlay {
	top: 50px;
	left: 12px;
	right: auto;
	background: var(--bg-card);
	border: 1px solid var(--border-subtle);
	border-radius: 14px;
	padding: 14px;
	min-width: 160px;
	box-shadow: var(--glow-green);
	animation: wmifsc-fade-in 0.8s ease-out;
}

.wmifsc-temp-block {
	display: flex;
	align-items: baseline;
	gap: 2px;
}

.wmifsc-temp-value {
	font-size: 3rem;
	font-weight: 700;
	line-height: 1;
	color: var(--text-primary);
	text-shadow: 0 0 20px rgba(91, 159, 84, 0.15);
}

.wmifsc-temp-unit {
	font-size: 1.2rem;
	font-weight: 300;
	color: var(--text-secondary);
}

.wmifsc-weather-icon {
	margin: 4px 0;
}

.wmifsc-weather-icon svg {
	width: 40px;
	height: 40px;
}

.wmifsc-weather-desc {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 3px;
}

.wmifsc-feels-like {
	font-size: 0.7rem;
	color: var(--text-secondary);
}

/* ── Wind (top-right overlay on map) ────────────── */
.wmifsc-wind-overlay {
	top: 50px;
	right: 12px;
	left: auto;
	background: var(--bg-card);
	border: 1px solid var(--border-subtle);
	border-radius: 14px;
	padding: 12px;
	text-align: center;
	min-width: 80px;
	animation: wmifsc-fade-in 0.8s ease-out 0.2s both;
}

.wmifsc-wind-compass {
	width: 64px;
	height: 64px;
	margin: 0 auto;
}

.wmifsc-compass-svg {
	width: 100%;
	height: 100%;
}

#wmifsc-wind-arrow-group {
	transition: transform 1s ease-out;
	transform-origin: 50px 50px;
}

.wmifsc-wind-info {
	text-align: center;
}

.wmifsc-wind-dir-label {
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--ifsc-green);
	text-shadow: 0 1px 4px rgba(0,0,0,0.8);
	display: block;
	margin-bottom: 2px;
}

.wmifsc-wind-speed {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--text-primary);
}

.wmifsc-wind-speed small {
	font-size: 0.6rem;
	font-weight: 400;
	color: var(--text-secondary);
	display: block;
}

/* ── Data Bar (overlay, below map area) ─────────── */
.wmifsc-databar {
	bottom: 250px;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
	padding: 6px 10px;
	background: rgba(10, 14, 20, 0.8);
	border-top: 1px solid var(--border-subtle);
}

.wmifsc-databar-item {
	background: var(--bg-card);
	border: 1px solid var(--border-subtle);
	border-radius: 8px;
	padding: 5px 4px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	animation: wmifsc-fade-in 0.8s ease-out 0.4s both;
}

.wmifsc-databar-icon {
	width: 22px;
	height: 22px;
	color: var(--ifsc-green);
}

.wmifsc-databar-icon svg {
	width: 100%;
	height: 100%;
}

.wmifsc-databar-label {
	font-size: 0.6rem;
	font-weight: 600;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.wmifsc-databar-value {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--text-primary);
}

.wmifsc-databar-value small {
	font-size: 0.6rem;
	font-weight: 400;
	color: var(--text-secondary);
}

.wmifsc-uv-bar {
	width: 100%;
	height: 3px;
	background: rgba(255,255,255,0.1);
	border-radius: 2px;
	margin-top: 3px;
	overflow: hidden;
}

.wmifsc-uv-fill {
	height: 100%;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--ifsc-green), #f1c40f, var(--ifsc-red));
	transition: width 1s ease-out;
	width: 0%;
}

/* ── Hourly Forecast (overlay) ─────────────────── */
.wmifsc-hourly {
	bottom: 170px;
	padding: 4px 10px 2px;
	background: rgba(10, 14, 20, 0.85);
	border-top: 1px solid var(--border-subtle);
}

.wmifsc-section-title {
	font-size: 0.65rem;
	font-weight: 700;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 4px;
}

.wmifsc-hourly-strip {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 3px;
}

.wmifsc-hourly-strip::-webkit-scrollbar {
	display: none;
}

.wmifsc-hourly-item {
	min-width: 52px;
	flex-shrink: 0;
	text-align: center;
	padding: 4px 3px;
	background: var(--bg-card);
	border: 1px solid var(--border-subtle);
	border-radius: 8px;
	animation: wmifsc-fade-in 0.6s ease-out both;
}

.wmifsc-hourly-time {
	font-size: 0.6rem;
	color: var(--text-secondary);
	font-weight: 600;
}

.wmifsc-hourly-icon {
	margin: 3px 0;
}

.wmifsc-hourly-icon svg {
	width: 24px;
	height: 24px;
}

.wmifsc-hourly-temp {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--text-primary);
}

.wmifsc-hourly-precip {
	font-size: 0.55rem;
	color: #4a9fd9;
	font-weight: 600;
}

/* ── Daily Forecast (overlay) ───────────────────── */
.wmifsc-daily {
	bottom: 30px;
	padding: 4px 10px;
	background: rgba(10, 14, 20, 0.9);
	border-top: 1px solid var(--border-subtle);
}

.wmifsc-daily-legend {
	font-size: 0.5rem;
	font-weight: 400;
	color: var(--text-secondary);
	opacity: 0.6;
	margin-left: 4px;
}

.wmifsc-daily-grid {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wmifsc-daily-row {
	display: grid;
	grid-template-columns: 50px 24px 1fr 38px 38px 26px;
	align-items: center;
	gap: 4px;
	padding: 2px 6px;
	background: var(--bg-card);
	border: 1px solid var(--border-subtle);
	border-radius: 5px;
	animation: wmifsc-fade-in 0.6s ease-out both;
}

.wmifsc-daily-day {
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--text-primary);
}

.wmifsc-daily-icon svg {
	width: 24px;
	height: 24px;
}

.wmifsc-daily-bar {
	height: 4px;
	background: rgba(255,255,255,0.08);
	border-radius: 2px;
	position: relative;
	overflow: hidden;
}

.wmifsc-daily-bar-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	border-radius: 2px;
	transition: width 1s ease-out;
}

.wmifsc-daily-bar-label {
	display: none;
}

.wmifsc-daily-min {
	font-size: 0.7rem;
	color: #4a9fd9;
	text-align: right;
}

.wmifsc-daily-max {
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--text-primary);
	text-align: right;
}

.wmifsc-daily-precip {
	font-size: 0.6rem;
	color: #4a9fd9;
	text-align: center;
}

/* ── Footer (bottom overlay) ────────────────────── */
.wmifsc-footer {
	bottom: 0;
	padding: 2px 8px;
	background: rgba(10, 14, 20, 0.95);
	border-top: 1px solid var(--border-subtle);
	text-align: center;
}

.wmifsc-footer-logos {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-bottom: 0;
}

.wmifsc-footer-logos svg {
	height: 20px;
	width: auto;
}

.wmifsc-footer-info {
	font-size: 0.45rem;
	color: var(--text-secondary);
	letter-spacing: 0.2px;
}

/* ── Animations ─────────────────────────────── */
@keyframes wmifsc-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes wmifsc-glow {
	0%, 100% { box-shadow: 0 0 10px rgba(91, 159, 84, 0.1); }
	50% { box-shadow: 0 0 25px rgba(91, 159, 84, 0.3); }
}

.wmifsc-root .wmifsc-current-overlay {
	animation: wmifsc-fade-in 0.8s ease-out, wmifsc-glow 4s ease-in-out infinite;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 500px) {
	.wmifsc-temp-value { font-size: 2.5rem; }
	.wmifsc-weather-icon svg { width: 32px; height: 32px; }
	.wmifsc-wind-compass { width: 48px; height: 48px; }
	.wmifsc-databar-item { padding: 4px 3px; }
	.wmifsc-databar-label { font-size: 0.55rem; }
	.wmifsc-databar-value { font-size: 0.75rem; }
	.wmifsc-hourly-item { min-width: 44px; }
	.wmifsc-daily-row { grid-template-columns: 44px 22px 1fr 34px 34px 24px; gap: 3px; }
}