/* GP Weather Widget styles — namespaced with .gpw- to avoid theme conflicts */

.gpw-weather-widget {
	--gpw-bg: #0f2740;
	--gpw-bg-light: #16324f;
	--gpw-accent: #4aa8ff;
	--gpw-text: #ffffff;
	--gpw-text-muted: #c3d4e6;
	--gpw-radius: 14px;
	max-width: 900px;
	margin: 1.5em auto;
	font-family: inherit;
	box-sizing: border-box;
}

.gpw-weather-widget * {
	box-sizing: border-box;
}

/* City search box */
.gpw-city-search-wrap {
	position: relative;
	margin-bottom: 1em;
}

.gpw-city-search-input-row {
	display: flex;
	gap: 0.6em;
	flex-wrap: wrap;
}

.gpw-city-search {
	flex: 1;
	min-width: 180px;
	padding: 0.65em 0.9em;
	border: 1px solid #d5dde4;
	border-radius: 10px;
	font-size: 0.95rem;
	font-family: inherit;
}

.gpw-city-search:focus {
	outline: none;
	border-color: var(--gpw-accent);
	box-shadow: 0 0 0 3px rgba(74, 168, 255, 0.2);
}

.gpw-use-location-btn {
	padding: 0.65em 1em;
	border: 1px solid #d5dde4;
	border-radius: 10px;
	background: #fff;
	color: #000;
	font-size: 0.9rem;
	font-family: inherit;
	cursor: pointer;
	white-space: nowrap;
}

.gpw-use-location-btn:hover {
	background: #f2f6fa;
	border-color: var(--gpw-accent);
	color: #000;
}

.gpw-city-suggestions {
	position: absolute;
	z-index: 20;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #d5dde4;
	border-radius: 10px;
	list-style: none;
	margin: 0;
	padding: 0.3em 0;
	max-height: 260px;
	overflow-y: auto;
	box-shadow: 0 8px 24px rgba(15, 39, 64, 0.15);
}

.gpw-suggestion-item {
	padding: 0.6em 1em;
	cursor: pointer;
	font-size: 0.92rem;
	color: #1f2d3a;
}

.gpw-suggestion-item:hover {
	background: #eef5fc;
}

.gpw-suggestion-empty {
	padding: 0.6em 1em;
	color: #8a97a3;
	font-size: 0.9rem;
}

/* Loading state */
.gpw-status {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 1em;
	color: var(--gpw-text-muted);
	background: var(--gpw-bg-light);
	border-radius: var(--gpw-radius);
}

.gpw-spinner {
	width: 18px;
	height: 18px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: var(--gpw-accent);
	border-radius: 50%;
	animation: gpw-spin 0.8s linear infinite;
	flex-shrink: 0;
}

@keyframes gpw-spin {
	to { transform: rotate(360deg); }
}

/* Current weather card */
.gpw-current-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5em;
	background: linear-gradient(135deg, var(--gpw-bg), var(--gpw-bg-light));
	color: var(--gpw-text);
	border-radius: var(--gpw-radius);
	padding: 1.5em;
	margin-bottom: 1.2em;
}

.gpw-current-left {
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.gpw-icon {
	font-size: 3.2rem;
	line-height: 1;
}

.gpw-temp-wrap {
	display: flex;
	align-items: flex-start;
}

.gpw-temp {
	font-size: 3.2rem;
	font-weight: 700;
	line-height: 1;
}

.gpw-unit {
	font-size: 1.2rem;
	margin-top: 4px;
	color: var(--gpw-text-muted);
}

.gpw-current-right {
	flex: 1;
	min-width: 200px;
}

.gpw-location {
	margin: 0 0 0.2em;
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--gpw-text);
}

.gpw-desc {
	margin: 0 0 0.6em;
	color: var(--gpw-text-muted);
	font-size: 1rem;
}

.gpw-meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	font-size: 0.9rem;
	color: var(--gpw-text-muted);
}

.gpw-meta strong {
	color: var(--gpw-text);
	font-weight: 600;
}

/* SEO paragraphs */
.gpw-seo-paragraph {
	background: #f5f8fb;
	border-left: 4px solid var(--gpw-accent);
	padding: 1em 1.2em;
	border-radius: 6px;
	margin-bottom: 1.2em;
	line-height: 1.7;
	font-size: 0.98rem;
	color: #1f2d3a;
}

/* Forecast heading */
.gpw-forecast-heading {
	font-size: 1.25rem;
	margin: 0 0 0.8em;
}

/* 7-day forecast grid */
.gpw-forecast-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.7em;
	margin-bottom: 1.2em;
}

.gpw-forecast-day {
	background: #fff;
	border: 1px solid #e3e9ef;
	border-radius: 10px;
	padding: 0.9em 0.5em;
	text-align: center;
}

.gpw-forecast-day .gpw-fday-name {
	font-weight: 700;
	font-size: 0.85rem;
	margin-bottom: 0.3em;
}

.gpw-forecast-day .gpw-fday-date {
	font-size: 0.72rem;
	color: #7a8794;
	margin-bottom: 0.5em;
}

.gpw-forecast-day .gpw-fday-icon {
	font-size: 1.8rem;
	margin-bottom: 0.4em;
}

.gpw-forecast-day .gpw-fday-desc {
	font-size: 0.72rem;
	color: #55636f;
	min-height: 2.2em;
	margin-bottom: 0.4em;
}

.gpw-forecast-day .gpw-fday-temps {
	font-size: 0.85rem;
}

.gpw-forecast-day .gpw-fday-max {
	font-weight: 700;
}

.gpw-forecast-day .gpw-fday-min {
	color: #8a97a3;
}

.gpw-forecast-day .gpw-fday-rain {
	margin-top: 0.4em;
	font-size: 0.7rem;
	color: #3a8fd6;
}

/* Error state */
.gpw-error {
	background: #fdecea;
	color: #a1332a;
	padding: 0.9em 1.1em;
	border-radius: 8px;
}

/* Attribution */
.gpw-attribution {
	font-size: 0.75rem;
	color: #99a3ac;
	text-align: right;
	margin: 0;
}

.gpw-attribution a {
	color: #7a8794;
}

/* Tablet */
@media (max-width: 782px) {
	.gpw-forecast-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Mobile */
@media (max-width: 480px) {
	.gpw-current-card {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
	}

	.gpw-forecast-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.gpw-temp,
	.gpw-icon {
		font-size: 2.4rem;
	}

	.gpw-city-search-input-row {
		flex-direction: column;
	}

	.gpw-use-location-btn {
		width: 100%;
	}
}
