/* Ensure map fills the viewport */
#map {
    height: 97vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Warning message bar */
.warning-message-bar {
    position: absolute;
    top: 10px;
    left: 200px;
    right: 50px;
    background-color: rgba(0, 128, 0, 0.8);
    color: white;
    text-align: center;
    z-index: 1001;
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
	will-change: transform;
}

.warning-message-text {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 20s linear infinite;
	will-change: transform;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Weather box (Current Weather panel) */
.weather-box {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
    text-align: center;
    width: 160px;
    overflow: visible;
}

.weather-title {
    font-weight: bold;
    font-size: 13px;
}

.weather-icon {
    width: 60px;
    height: 60px;
    display: block;
    margin: auto;
}

/* Warning icons container */
.warning-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 5px 0;
}

/* Individual warning icons */
.warning-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.weather-divider {
    margin: 5px 0;
}

.warning-label {
    font-weight: bold;
    font-size: 13px;
    margin: 5px 0 2px;  /* small margin to separate from divider/icons */
}

.weather-time {
    font-size: 12px;
}

/* Weather forecast box */
.weather-forecast-box {
    position: absolute;
    bottom: 20px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.15);
}

.weather-forecast-box.collapsed .weather-forecast-list {
    display: none;
}

.weather-forecast-title {
    font-weight: bold;
    cursor: pointer;
    width: 180px;
    text-align: center;
}

.weather-forecast-list {
    list-style: none;
    padding: 0;
}

.weather-forecast-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.forecast-date {
    width: 60px;
}

.forecast-icon {
    width: 30px;
    height: 30px;
    margin: 0 10px;
}

.forecast-temps {
    font-size: 12px;
}

/* Weather selector */
.weather-selector {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
}

.weather-selector-title {
    font-weight: bold;
}

.weather-selector select {
    margin-top: 5px;
    width: 100%;
}

/* Leaflet control customizations */
.leaflet-control-zoom {
    margin-top: 10px !important;
    margin-right: 10px !important;
}

.leaflet-control-locate {
    margin-top: 5px !important;
    margin-right: 10px !important;
}

.leaflet-control-home {
    margin-top: 4px !important;
    margin-right: 10px !important;
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid rgb(163 190 204);
    border-radius: 3px;
    cursor: pointer;
    background-image: url('img/homeIcon.png');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

.leaflet-control-locate a {
    width: 26px;
    height: 26px;
    display: block;
}

/* Tooltip styling for readability */
.leaflet-tooltip {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid black;
    font-weight: bold;
}

/* Responsive design for mobile devices */
@media (max-width: 600px) {
    .weather-box {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 74px;
        padding: 6px 10px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        box-sizing: border-box;
        background-color: rgba(255, 255, 255, 0.97);
        z-index: 1003;
        border-radius: 0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        font-size: 13px;
        overflow: hidden;
    }

	.weather-title {
        position: absolute;
        top: 5px;
        left: 5px;
        font-size: 10px;
        font-weight: bold;
        color: #333;
        z-index: 2;
        line-height: 1;
        white-space: nowrap;
    }

    .weather-icon {
        width: 54px;
        height: 54px;
		left: 10px;
        margin: 12px 12px 0 12px;
        flex-shrink: 0;
        position: relative;
    }

	.warning-label {
        position: absolute;
        top: 0px;                               /* same top as title for consistency */
        left: 40%;
        font-size: 10px;                        /* same size */
        font-weight: bold;                      /* same weight */
        color: #333;                            /* same color (changed from red) */
        background: rgba(255,255,255,0.8);      /* same background */
        padding: 1px 5px;                       /* same padding */
        border-radius: 3px;                     /* same radius */
        z-index: 2;
        white-space: nowrap;
        line-height: 1;
    }
	
    .warning-message-bar {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        font-size: 11px;
        padding: 8px 10px;
        white-space: normal;
        overflow: hidden;
        background-color: rgba(0, 128, 0, 0.8);
        z-index: 1002;
    }

    .warning-message-text {
        padding-left: 0;
        animation: none;
    }
	
	.weather-divider {
        display: none;
    }


	.weather-time {
        position: absolute;
        bottom: 6px;
        right: 10px;
        font-size: 10px;
        line-height: 1.15;
        text-align: right;
        color: #444;
    }
	
	.weather-time::before {
        font-weight: bold;
        margin-right: 4px;
    }
	
	.warning-icons {
        position: absolute;
        top: 25px;                           /* unchanged */
        left: 45%;
        display: flex;
        gap: 6px;
        margin: 0;
        max-width: 70%;
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
	
	.warning-icon {
        width: 28px;
        height: 28px;
    }
	
    /* Optional: make layout more compact by reducing gaps between elements */
    .weather-box > *:not(.weather-title) {
        margin-left: 8px;
    }
	
    #map {
        position: fixed;
        top: 130px;
        bottom: 30px;
        left: 0;
        right: 0;
        height: auto !important;
        width: 100%;
        z-index: 1;
        min-height: 200px;
    }

    .weather-forecast-box {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
        padding: 0;
        font-size: 14px;
        background-color: rgba(255, 255, 255, 1);
        box-sizing: border-box;
        z-index: 1003;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.15);
    }

    .weather-forecast-box.collapsed .weather-forecast-list {
        display: none;
    }

    .weather-forecast-title {
        padding: 10px;
        border-top: 1px solid #ccc;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.15);
    }

    .weather-forecast-list {
        padding: 0 15px;
        display: flex;
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow-x: auto;
    }

    .weather-forecast-item {
        flex: 0 0 auto;
        margin-right: 15px;
        align-items: center;
        display: flex;
        flex-direction: column;
        text-align: center;
        vertical-align: top;
    }

    .forecast-date {
        width: auto;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .forecast-icon {
        width: 30px;
        height: 30px;
        margin: 0 0 5px 0;
    }

    .forecast-temps {
        font-size: 12px;
    }

    .weather-selector {
        position: relative;
        top: 10px;
        left: 10px;
        width: auto;
        max-width: 150px;
        padding: 8px 10px;
        border-radius: 5px;
        font-size: 14px;
        background-color: rgba(255, 255, 255, 0.9);
        box-shadow: 0 0 5px rgba(0,0,0,0.2);
        z-index: 1004;
    }

    .weather-selector select {
        width: 100%;
    }

    .leaflet-control-zoom {
        margin-top: 5px !important;
        margin-right: 5px !important;
    }

    .leaflet-control-locate {
        margin-top: 5px !important;
        margin-right: 5px !important;
    }

    .leaflet-control-home {
        margin-top: 4px !important;
        margin-right: 5px !important;
    }

    .leaflet-tooltip {
        font-size: 12px;
    }
}




