/* Mausam24 Weather — mobile-first, lightweight, no framework dependency */

.mausam24-app {
	--m24-blue: #1565c0;
	--m24-blue-dark: #0d47a1;
	--m24-bg: #f4f8fc;
	--m24-card: #ffffff;
	--m24-text: #1a1a1a;
	--m24-muted: #6b7280;
	--m24-alert: #d32f2f;
	--m24-radius: 14px;

	max-width: 900px;
	margin: 0 auto;
	padding: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Devanagari", Arial, sans-serif;
	color: var(--m24-text);
	box-sizing: border-box;
}
.mausam24-app * { box-sizing: border-box; }
/* The HTML `hidden` attribute must always win: several components below set display:flex/block, which would otherwise keep them visible when JS hides them (e.g. an empty alert ribbon). */
.mausam24-app [hidden] { display: none !important; }

.mausam24-location-controls {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
	margin: 12px 0 0;
}
/* "─── या ───" between the detect button and the search / selector row */
.mausam24-or-divider {
	display: flex; align-items: center; gap: 12px; width: 100%; margin: 10px 0 12px;
	color: var(--m24-muted); font-size: 0.85rem;
}
.mausam24-or-divider::before, .mausam24-or-divider::after {
	content: ''; flex: 1 1 auto; height: 1px; background: #d5dce5;
}
.mausam24-btn {
	border: none; border-radius: 999px; padding: 10px 16px; font-size: 0.9rem; cursor: pointer;
}
.mausam24-btn-primary { background: var(--m24-blue); color: #fff; }
.mausam24-btn-secondary { background: #e8eef7; color: var(--m24-blue-dark); }
.mausam24-btn:active { transform: scale(0.98); }

.mausam24-search-wrap { position: relative; min-width: 0; }
.mausam24-search-wrap input {
	width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 999px; border: 1px solid #d5dce5; font-size: 0.82rem;
}
.mausam24-search-results {
	position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0;
	border-radius: 10px; margin-top: 4px; max-height: 240px; overflow-y: auto; z-index: 20;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.mausam24-search-results div { padding: 10px 12px; cursor: pointer; font-size: 0.88rem; border-bottom: 1px solid #f1f4f8; }
.mausam24-search-results div:last-child { border-bottom: none; }
.mausam24-search-results div:hover { background: #f4f8fc; }

/* Search box + cascading location dropdown: always one line, sized to fit on mobile too */
.mausam24-location-row {
	display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; justify-content: center; margin: 0 0 6px;
}
.mausam24-location-row .mausam24-search-wrap { flex: 1 1 58%; min-width: 0; }

.mausam24-location-select { flex: 1 1 42%; min-width: 0; }
.mausam24-location-step-select {
	width: 100%; box-sizing: border-box; padding: 9px 8px; border-radius: 999px; border: 1px solid #d5dce5;
	font-size: 0.82rem; text-overflow: ellipsis;
}

/* Step-by-step cascade: जिला / तहसील / गाँव each appear as their own box,
   stacked below the previous selection, once its parent has been chosen. */
.mausam24-location-cascade {
	display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px;
}
.mausam24-location-cascade .mausam24-location-step-select {
	border-radius: 10px; padding: 10px 12px; font-size: 0.85rem;
}

.mausam24-status { text-align: center; padding: 14px; color: var(--m24-muted); font-size: 0.9rem; }
.mausam24-status .m24-dots span { animation: m24-blink 1.4s infinite both; }
.mausam24-status .m24-dots span:nth-child(2) { animation-delay: 0.2s; }
.mausam24-status .m24-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes m24-blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

.mausam24-current-card {
	background: linear-gradient(135deg, var(--m24-blue), var(--m24-blue-dark));
	color: #fff; border-radius: var(--m24-radius); padding: 20px; text-align: center;
}
.mausam24-current-loc { font-size: 0.95rem; opacity: 0.9; margin-bottom: 6px; }
.mausam24-current-main { display: flex; align-items: center; justify-content: center; gap: 10px; }
.mausam24-temp-big { font-size: 3.2rem; font-weight: 700; line-height: 1; }
.mausam24-icon-big { font-size: 2.6rem; }
.mausam24-condition { font-size: 1.05rem; margin-top: 4px; }
.mausam24-feelslike { font-size: 0.85rem; opacity: 0.85; margin-top: 2px; }
.mausam24-rain-main { font-size: 0.88rem; opacity: 0.95; margin-top: 6px; }
.mausam24-rain-main strong { font-weight: 700; }

.mausam24-quickstats {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px;
	border-top: 1px solid rgba(255,255,255,0.25); padding-top: 12px;
}
.mausam24-quickstats .m24-label { display: block; font-size: 0.75rem; opacity: 0.85; }
.mausam24-quickstats .m24-value { display: block; font-size: 1.05rem; font-weight: 600; margin-top: 2px; }

.mausam24-substats {
	display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 0.85rem; opacity: 0.95;
}

.mausam24-stale-note {
	margin-top: 12px; font-size: 0.78rem; background: rgba(255,255,255,0.15); border-radius: 8px; padding: 6px 10px;
}

.mausam24-section { margin-top: 22px; }
.mausam24-section h2 { font-size: 1.05rem; margin: 0 0 10px; color: var(--m24-blue-dark); }

.mausam24-hourly-scroll {
	display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch;
}
.mausam24-hourly-item {
	flex: 0 0 auto; min-width: 78px; text-align: center; background: var(--m24-card); border-radius: 10px;
	padding: 13px 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mausam24-hourly-item .m24-h-time { font-size: 0.84rem; color: var(--m24-muted); }
.mausam24-hourly-item .m24-h-icon { font-size: 1.7rem; margin: 6px 0; }
.mausam24-hourly-item .m24-h-temp { font-weight: 600; font-size: 1rem; }
.mausam24-hourly-item .m24-h-rain { font-size: 0.78rem; color: var(--m24-blue-dark); margin-top: 5px; }

.mausam24-daily-list { display: flex; flex-direction: column; gap: 6px; }
.mausam24-daily-row {
	display: flex; align-items: center; justify-content: space-between; background: var(--m24-card);
	border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); font-size: 0.98rem; gap: 12px;
}
.mausam24-daily-row .m24-d-day { flex: 1 1 30%; font-weight: 500; }
/* "🌧️ 10%  |  ☀️ 34° / 25°" — clear gap and a thin divider between rain and temperature */
.mausam24-daily-row .m24-d-rain {
	flex: 0 0 auto; font-size: 0.88rem; color: var(--m24-blue-dark);
	padding-right: 14px; border-right: 1px solid #d5dce5;
}
.mausam24-daily-row .m24-d-icon { flex: 0 0 auto; font-size: 1.5rem; }
.mausam24-daily-row .m24-d-temps { flex: 0 0 auto; color: var(--m24-muted); }
.mausam24-daily-row .m24-d-temps strong { color: var(--m24-text); }

/* Clear visual separation between "आज का मौसम" and "अगले दिन" */
.mausam24-section-divider {
	margin: 26px 0 4px;
	border-top: 1px solid #e2e8f0;
	width: 100%;
}

.mausam24-alert-ribbon {
	margin-top: 18px; background: #fdecea; border: 1px solid #f5c2c0; border-radius: 10px;
	padding: 16px 16px; min-height: 56px; display: flex; align-items: center; gap: 12px; overflow: hidden;
}
.mausam24-alert-label { flex: 0 0 auto; font-weight: 700; color: var(--m24-alert); font-size: 0.92rem; white-space: nowrap; }
.mausam24-alert-viewport { flex: 1 1 auto; overflow: hidden; min-width: 0; }
.mausam24-alert-items {
	display: flex; gap: 28px; align-items: center; white-space: nowrap; width: max-content;
	animation: m24-marquee 28s linear infinite;
}
.mausam24-alert-ribbon:hover .mausam24-alert-items { animation-play-state: paused; }
@media ( prefers-reduced-motion: reduce ) {
	.mausam24-alert-items { animation: none; overflow-x: auto; }
}
.mausam24-alert-chip { flex: 0 0 auto; font-size: 0.9rem; line-height: 1.6; color: #7a1f1a; white-space: nowrap; }
.mausam24-alert-chip strong { color: var(--m24-alert); }

@keyframes m24-marquee {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

/* Horizontal scrolling latest-posts carousel */
.mausam24-recent-posts .mausam24-posts-scroll {
	display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
}
.mausam24-post-card {
	flex: 0 0 auto; width: 220px; scroll-snap-align: start;
	display: block; text-decoration: none; color: inherit; background: var(--m24-card);
	border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mausam24-post-thumb img { width: 100%; height: 130px; object-fit: cover; display: block; }
.mausam24-post-title { font-weight: 600; padding: 10px 12px 2px; font-size: 0.92rem; }
.mausam24-post-excerpt { padding: 0 12px 12px; color: var(--m24-muted); font-size: 0.8rem; }
.mausam24-view-all-btn { display: inline-block; margin-top: 12px; text-decoration: none; }

@media (min-width: 640px) {
	.mausam24-temp-big { font-size: 3.8rem; }
	.mausam24-quickstats { max-width: 420px; margin-left: auto; margin-right: auto; }
	.mausam24-post-card { width: 260px; }
}

@media (min-width: 900px) {
	.mausam24-app { padding: 20px 0; }
}
