/* --- New to version 2.7: Dark theme and loading skeleton --- */
/* --- Weather Widget Styling --- */
.weather-widget {
	contain: content;
	min-height: 300px;
	/* This setting is optional */ 
	/* However, setting a minimum height helps to reduce browser repaints */
}
.weather-widget.no-forecast { min-height: 175px; } /* When the forecaset is excluded less height is required */
.weather-widget.has-sunrise { min-height: 375px; } /* When sunrise sunset is shown using min-height: 375px; is better */
.weather-widget.no-forecast.has-sunrise {min-height: 250px;}/* With sunrise sunset but without forecast */

.weather-location-name {
	border-bottom: 2px solid #eee;
	font-size: 1.375em;
	font-weight: bold;
	margin-bottom: 15px;
	padding-bottom: 6px;
	text-align: center;
	min-height:42px;
}

.current-weather {
	align-items: center;
	display: flex;
	justify-content: space-around;
	margin-bottom: 8px;
	padding: 0 10px 10px; /* Zero top padding for here for greater icon spacing flexibility */
	gap:10px;
}

.current-temp {
	font-size: 2.5em;
	font-weight: 700;
}

.current-conditions {
	align-items: center;
	display: flex;
	flex-direction: column;
	font-size: 1.125em;
	text-transform: capitalize;
	line-height: 35px;
}

.forecast-container {
	display: flex;
	justify-content: space-between;
	text-align: center;
	padding: 5px;
}

.forecast-day {
	flex: 1;
	min-height: 115px;
}

.forecast-day-name {
	color: #444;
	font-size: 1em;
	margin-bottom: 3px;
}



.forecast-temps .slash {
	color: transparent;
	font-size: 0.375em;
	/*Change the color and size to see the / between high and low */
}

.forecast-temps .high {
	color: #000;
	font-size: 1.06em;
	font-weight: 700;
}

.forecast-temps .low {
	color: #555;
	font-size: 0.875em;
}

.today-forecast-temps {
	align-items: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: 10px;
}

.today-forecast-label {
	font-size: 1.375em;
	margin: 5px 0;
	line-height: 1.375em;
}
.temps-wrapper{
	line-height: 2.25em;
}

.today-forecast-temps .temps-wrapper .slash{
	color: transparent;
	font-size: 0.55em;
	/*Change the color and size to see the / between high and low */
}

.today-forecast-temps .high {
	color: #000;
	font-size: 2.25em; /* Converted from 36px */
	font-weight: 700;
}

.today-forecast-temps .low {
	color: #555;
	font-size: 1.625em; /* Converted from 26px */
	font-weight: 400;
}

.today-forecast-temps .temp-unit {
	color: #666;
	font-size: 0.94em; /* Converted from 15px */
	font-weight: 400;
	position: relative;
	top: -8px;
}

/* SIZING VISUALS */
.current-conditions img {
	filter: drop-shadow(1px 2px 3px #555);
	height: 50px;
	width: 50px;
	margin: 10px 0 5px; /* Margin for image, equal to svg height  */
}
.current-conditions .weather-icon-svg {
    filter: none; /* No Drop Shadow on animated SVGs */
    width: 65px;
    height: 65px;
}
.weather-widget .wi {
	color: #555;
	font-size: 45px;
	line-height: 1;
	margin: 10px 0; /* Match SVG height of 65px */
}
.forecast-day img {
	filter: drop-shadow(1px 2px 3px #666);
	height: 40px;
	width: 40px;
	margin: 5px 0; /* Match 50px svg sizing */
}

.forecast-day .weather-icon-svg {
    filter: none;
    width: 50px;
    height: 50px;
    margin:0; 
}
.forecast-day .wi {
	font-size: 35px;
	margin: 5px 0 10px; /* Match SVG height of 50px */
}

.sunrise-sunset-container .wi {
    font-size: 30px;
    line-height: 1;
    color: #f28c1f;
	display: inline;
	width: 39px;
    margin: 0 8px;
}

.sunrise-sunset-container .sunrise-sunset-icon {
    width: 25px;
    height: 25px;
    filter: drop-shadow(1px 2px 2px #888);
	display: inline;
	margin:0 15px;
}

/* --- NEW SVG STYLES --- */
.sunrise-sunset-container .sunrise-sunset-icon-svg {
    width: 45px;
    height: 45px;
    vertical-align: middle;
    display: inline-block;
    margin: 0 5px;
}


.weather-extra-details {
	color: #555;
	display: flex;
	font-size: .9em;
	justify-content: space-around;
	margin-bottom: 10px;
    padding: 5px 0 10px;
    line-height: 30px;
}

.wind-details {
	align-items: center;
	display: flex;
}

.wind-details .wi {
	font-size: 30px;
    line-height: 30px;
	margin-right: 5px;
}

.wind-details .wind-icon-svg {
    width: 25px;
    height: 25px;
        margin: 0 5px 5px 0;
    border:1.5px solid #e2e8f0;
    border-radius: 50%;
}


/* Remove specific borders that cause stacking */
.current-weather, 
.weather-extra-details, 
.sunrise-sunset-container {
    border-bottom: 1px solid #eee;
}

/* If it's the last element before the updated timestamp, or if forecast is off */
.no-forecast .sunrise-sunset-container,
.no-forecast .weather-extra-details {
    border-bottom: none;
}

.last-updated {
	color: #999;
	font-size: .8em;
	margin-top: 10px;
	text-align: center;
	border-top: 1px solid #eee;
	padding-top: 5px;
    line-height: 29px;
}

/* --- Weather Alert Styling --- */

.weather-alert {
    display: flex;
    align-items: center; /* Vertically aligns the icon with the text block */
    background-color: #f0f8ff;
    border: 1px solid #add8e6;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 15px;
    color: #333;
}

.weather-alert-icon-left {
    margin-right: 12px;
}

.weather-alert-message {
    flex-grow: 1; /* Allows the message area to take up remaining space */
}

.weather-alert-event {
    font-weight: bold;
    margin-bottom: 4px;
}

.weather-alert-sender {
    font-size: 0.9em;
    opacity: 0.8;
}

.weather-alert-icon-left .weather-alert-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
}

.weather-alert-icon-left .wi {
    font-size: 2em;
    line-height: 1;
}

.weather-alert-icon-left .weather-alert-icon-svg {
    width: 50px;
    height: 50px;
    vertical-align: middle;
}


/* --- Sunrise & Sunset Styling --- */

.sunrise-sunset-container {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 10px 5px;
    margin-bottom: 10px;
    color: #555;
}

.sunrise-sunset-text-wrapper{
	min-height:64px;
}


.sunrise-time, .sunset-time {
    flex-basis: 50%;
}

.sunrise-sunset-label {
    font-size: 1em;
	display: inline;
}

.sunrise-sunset-value {
    font-weight: bold;
    font-size: 1.25em;
}



.sunrise-time, .sunset-time {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- DARK MODE STYLES --- */
/* Dark Mode Overrides */
.weather-widget.utw-dark-mode {
    background-color: transparent;
    color: #ffffff;
}
.utw-dark-mode .weather-location-name{
    border-bottom: 1px solid #333; /* Dark gray separators */
    padding-bottom: 7px;
}
.utw-dark-mode .sunrise-sunset-container,
.utw-dark-mode .weather-extra-details,
.utw-dark-mode .current-weather,
.utw-dark-mode .forecast-day,
.utw-dark-mode .last-updated {
    border-color: #333; /* Dark gray separators */
}
.utw-dark-mode .sunrise-sunset-value, 
.utw-dark-mode .high {
    color: #ffffff;
}

/* Make alerts pop in dark mode without clashing */
.utw-dark-mode .weather-alert {
    background-color: rgba(255, 69, 0, 0.15); /* A subtle, translucent bright orange/red */
    border-color: #ff4500; /* Bright orange/red border to grab attention */
    color: #ffffff; /* Crisp white text */
}
.utw-dark-mode .forecast-day-name,
.utw-dark-mode  .temp-unit{
    color: #aaa; /* darkest of the light text */
}

.utw-dark-mode .weather-alert-sender,
.utw-dark-mode .weather-extra-details {
    color: #ccc; /* Slightly dimmed secondary text. Light gray for conditions */
}
.utw-dark-mode .sunrise-sunset-label,
.utw-dark-mode .low,
.utw-dark-mode .last-updated {
    color: #bbb; /* Light gray for secondary text */
}
/* --- END DARK MODE STYLES --- */


/* =========================================
   SKELETON LOADER
========================================= */
/* The Shimmer Animation */
@keyframes utw-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* Base Skeleton Block */
.utw-skeleton {
    background: #d0d0d0;
    background-image: linear-gradient(90deg, #d0d0d0 0px, #e0e0e0 40px, #d0d0d0 80px);
    background-size: 400px 100%;
    animation: utw-shimmer 1.5s infinite linear;
    border-radius: 4px;
}

/* Skeleton Shapes */
.utw-skeleton-wrapper {
    padding: 10px 0;
}

.utw-skeleton-title {
    height: 25px;
    width: 60%;
    margin: 0 auto 20px auto;
}

.utw-skeleton-temp {
    height: 36px;
    width: 40%;
    margin: 0 auto 15px auto;
}

/* Mimic the real .current-weather flex container */
.utw-skeleton-current-weather {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 8px;
    padding: 10px;
}

/* The block representing "Today" and "78 / 68" */
.utw-skeleton-temp-block {
    height: 45px; 
    width: 40%;
    border-radius: 4px;
}

/* Update your existing skeleton icon to remove the auto margins */
.utw-skeleton-icon {
    height: 75px;
    width: 75px;
    border-radius: 50%;
    margin: 0 auto 15px auto;
    /* Skeleton area is designed to match 90px tall current-conditions / icon and text div  */
}


.utw-skeleton-sunrise-container {
    display: flex;
    justify-content: space-between;
    margin:15px 0 20px;
}

.utw-skeleton-sun {
    height: 50px;
    width: 45%;
}
.utw-skeleton-forecast-container{
display: flex;
    justify-content: space-between;	
    gap: 10px; /* Adds clean spacing between the blocks */
    padding: 5px;
}
.utw-skeleton-forecast-row {
	flex: 1; /* Forces them to stretch evenly side-by-side */
    height: 115px; 
}
/* New Details and Timestamp Skeletons */
.utw-skeleton-details {
    height: 31px;
    width: 75%;
    margin: 15px auto;
}

.utw-skeleton-timestamp {
    height: 15px;
    width: 40%;
    margin: 15px auto;
}
/* =========================================
   INVISIBLE SKELETON OVERRIDE
========================================= */
/* If the user checks 'Hide Shimmer', make the blocks transparent but keep their physical dimensions */
.utw-skeleton-wrapper.utw-hide-shimmer .utw-skeleton {
    background: transparent !important;
    background-image: none !important;
    animation: none !important;
}
