/**
 * Weather Widget Frontend Styles
 */

.weather-widget-container {
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.weather-widget-title {
	margin: 0 0 15px;
	font-size: 24px;
	font-weight: 600;
	color: #333;
}

.weather-widget-content {
	text-align: center;
}

.weather-widget-location {
	font-size: 18px;
	font-weight: 500;
	color: #555;
	margin-bottom: 15px;
}

.weather-location-name {
	font-weight: 600;
}

.weather-location-country {
	opacity: 0.8;
}

.weather-widget-icon {
	margin: 10px 0;
}

.weather-widget-icon img {
	width: 100px;
	height: 100px;
	display: inline-block;
}

.weather-icon-emoji {
	font-size: 80px;
	line-height: 1;
	display: inline-block;
}

/* Icon color styling - applies to emoji icons */
.weather-icon-emoji[data-icon-color] {
	filter: grayscale(100%) brightness(0.8);
}

/* PNG icon filter support */
.weather-widget-icon img {
	transition: filter 0.3s ease;
}

.weather-widget-description {
	font-size: 20px;
	color: #666;
	margin: 10px 0 20px;
	text-transform: capitalize;
	font-weight: 500;
}

.weather-widget-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min-content, 1fr));
	gap: 15px;
	margin-top: 20px;
}

.weather-stat {
	padding: 12px;
	background: transparent;
	border-radius: 6px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
}

/* When labels are hidden, center the value */
.weather-stat:not(:has(.weather-stat-label)) {
	justify-content: center;
}

.weather-stat:not(:has(.weather-stat-label)) .weather-stat-value {
	font-size: 24px;
}

.weather-stat-label {
	font-size: 12px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 500;
}

.weather-stat-value {
	font-size: 20px;
	font-weight: 600;
	background: transparent !important;
}

/* Default colors - can be overridden by Elementor or data attributes */
.weather-stat-value[data-text-color] {
	color: var(--text-color, #333333);
}

.weather-temp .weather-stat-value {
	font-size: 32px;
	background: transparent !important;
}

.weather-temp .weather-stat-value[data-temp-color] {
	color: var(--temp-color, #ff6b6b);
}

.weather-humidity .weather-stat-value {
	color: #4dabf7;
}

.weather-wind .weather-stat-value {
	color: #51cf66;
}

.weather-pressure .weather-stat-value {
	color: #845ef7;
}

.weather-feels-like .weather-stat-value {
	color: #ff922b;
}

.weather-widget-error {
	padding: 15px;
	background: #fee;
	border: 1px solid #fcc;
	border-radius: 6px;
	color: #c33;
	text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
	.weather-widget-stats {
		grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
		gap: 10px;
	}

	.weather-widget-title {
		font-size: 20px;
	}

	.weather-widget-location {
		font-size: 16px;
	}

	.weather-widget-icon img {
		width: 80px;
		height: 80px;
	}

	.weather-widget-description {
		font-size: 16px;
	}

	.weather-stat-value {
		font-size: 18px;
	}

	.weather-temp .weather-stat-value {
		font-size: 28px;
	}
}

@media (max-width: 480px) {
	.weather-widget-stats {
		grid-template-columns: 1fr;
	}

	.weather-widget-container {
		padding: 15px;
	}
}

/* Widget Sidebar Specific Styles */
.widget .weather-widget-container {
	padding: 15px;
}

.widget .weather-widget-stats {
	grid-template-columns: 1fr;
	gap: 10px;
}

.widget .weather-widget-icon img {
	width: 64px;
	height: 64px;
}

/* Elementor Specific Adjustments */
.elementor-widget-weather_widget .weather-widget-container {
	background: transparent;
	box-shadow: none;
}

/* Horizontal Layout */
.weather-widget-layout-horizontal .weather-widget-content {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 20px;
	flex-wrap: nowrap;
	overflow-x: auto;
}

.weather-widget-layout-horizontal .weather-widget-location {
	flex: 0 0 auto;
	text-align: left;
	margin-bottom: 0;
	white-space: nowrap;
}

.weather-widget-layout-horizontal .weather-widget-icon {
	flex: 0 0 auto;
	margin: 0;
}

.weather-widget-layout-horizontal .weather-widget-description {
	flex: 0 0 auto;
	margin: 0;
	text-align: left;
	white-space: nowrap;
}

.weather-widget-layout-horizontal .weather-widget-stats {
	flex: 1 1 auto;
	display: flex;
	gap: 15px;
	flex-wrap: nowrap;
	margin-top: 0;
}

.weather-widget-layout-horizontal .weather-stat {
	flex: 0 0 auto;
	white-space: nowrap;
}

.weather-widget-layout-horizontal .weather-widget-icon img,
.weather-widget-layout-horizontal .weather-icon-emoji {
	width: 64px;
	height: 64px;
	font-size: 64px;
}

/* Keep horizontal layout on all screen sizes - no mobile changes */
