
.weather-panel {
    display: flex;
    height: 94%;
    width: 100%;
    color: white;
    padding-top: 0.5vh;
}

.weather-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 55%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 0.5rem;
    gap: 2vh;
    padding: 1vh;
}

.weather-right {
    width: 45%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.sidebar-location {
    font-size: 2vh;
}

.location-search {
    width: 100%;
    padding: 0.2rem;
    border-radius: 0.3rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
}

.location-results {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: left;
    font-size: 1.4vh;
}

.location-results li {
    cursor: pointer;
    padding: 0.2rem 0.4rem;
}

.sidebar-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1 1 0;
    background: rgba(0, 229, 226, 0.2);
    border: 1px solid rgba(0, 229, 226, 0.4);
    color: #00E5E2;
    border-radius: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.sidebar-button img {
    width: 2vh;
    height: 2vh;
}

.sidebar-data {
    display: grid;
    /*    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));*/
    grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    grid-auto-rows: 1fr; /* This makes each row equal in height */
    height: 100%; /* Ensure the container fills the space */
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    touch-action: none;
    -ms-touch-action: none;
}

.sidebar-data li {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1vh;
    padding: 0;
    width: 100%;
    user-select: none;
    touch-action: none;
    -ms-touch-action: none;
    max-height: 20vh;
}

.sidebar-data.drag-cursor li {
    cursor: grab;
}

.data-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.data-label {
    font-weight: 300;
}

.data-value {
    color: #00E5E2;
    margin-top: 0.3rem;
}

.sidebar-data img {
    width: 8vh;
    height: 8vh;
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

.sidebar-data.drag-cursor li.sortable-chosen,
.sidebar-data.drag-cursor li.sortable-drag {
    opacity: 0.7;
    cursor: grabbing;
}


.location-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    z-index: 50;
    min-width: 60%;
    color: white;
    max-height: 100%;
}

.location-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 2vh;
}

.location-buttons {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.search-icon {
    width: 3vh;
    height: 3vh;
}

.location-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.location-search-overlay.show {
    display: flex;
}

.location-search-box {
    background: rgba(20, 20, 20, 0.95);
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 40%;
    color: white;
}

.location-search-box .btn {
    width: 100%;
}

.location-search-box .btn + .btn {
    margin-top: 0.25rem;
}

.weather-status {
    position: absolute;
    bottom: 1vh;
    right: 1vh;
    color: white;
    font-size: 5vh;
}

.weather-settings-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    width: 100%;
    overflow: auto;
    position: relative;
}

.weather-settings-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.weather-settings-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.weather-settings-panel .col-span-2 {
    grid-column: span 2;
}

.weather-param-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 300;
}

.weather-param-option input {
    accent-color: #00E5E2;
}

.weather-param-option.selected {
    color: #00E5E2;
}

.weather-settings-customize {
    min-width: 450px;
}





/* === MEDIA === */

/* Mobile  */

@media (max-width: 699px) {
    .weather-panel {
        height: 100%;
        flex-direction: column-reverse;
        overflow-y: auto;
        gap: 1rem;
    }

    .weather-sidebar {
        width: 100%;
    }

    .weather-right {
        width: 100%;
        flex-direction: column-reverse;
        align-items: center;
    }

    .weather-status {
        position: relative;
        font-size: 1.5rem;
    }

    .location-panel { 
        width: 100%;
    }

    .location-buttons {
        flex-wrap: wrap;
    }

    .sidebar-data {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    .sidebar-data li {
         width: auto;
         min-width: 40%;
         flex-direction: column;
         align-items: center;
         justify-content: center;
         gap: 0.25rem;
    }
}

/* WVGA / WVGA-Narrow (720x480, 800x480) */

@media (min-width: 700px) and (max-width: 880px) {

    .weather-panel {
        gap: 0.5rem;
    }

    .weather-sidebar {
        width: 55%;
    }

    .weather-right {
        width: 45%;
    }

    .location-panel {
        width: 100%;
    }

    .sidebar-button {
        padding: 0.25rem 0.5rem;
    }

    .weather-status {
        font-size: 2rem;
    }

    .sidebar-data li {
        flex-direction: column;
        gap: 0rem;
    }

    .sidebar-data img {
        height: 2rem;
        width: 2rem;
    }

    .data-content {
        justify-content: start;
    }

    .data-label {
        font-size: 0.95rem;
    }

    .data-value {
        font-size: 1rem;
    }

    .weather-settings-title h3 {
        font-size: 1.25rem;
    }

    .weather-settings-title button {
        padding: 0.25rem 0.5rem;
    }
}

/* WSVGA / XGA (1024x600, 1024x768) */

@media (min-width: 881px) and (max-width: 1150px) {
    .sidebar-data li {
        gap: 0.5rem;
    }

    .sidebar-data img {
        width: 3rem;
        height: 3rem;
    }

    .data-label {
        font-size: 0.95rem;
    }

    .data-value {
        font-size: 1rem;
    }

}

/* WXGA / HD720 / SXGA (1280x720/800/1024) */

@media (min-width: 1151px) and (max-width: 1600px) {

    .weather-settings-title h3 {
        font-size: 1.25rem;
    }    
}

/* HD / WUXGA (1920x1080, 1920x1200) */

@media (min-width: 1601px) and (max-width: 2879px) {
}

/* 4K (3840x2160) */

@media (min-width: 2880px) {

    .location-panel {
        padding: 2rem;
    }

    .weather-settings-panel {
        gap: 4rem;
        padding: 2rem;
        border-width: 4px;
    }

    .weather-param-option {
        gap: 2rem;
    }

    .weather-settings-content {
        gap: 1rem;
    }

    .location-buttons {
        gap: 2rem;
    }

    .sidebar-button {
        gap: 2rem;
        font-size: 3rem;
    }

    .sidebar-data {
        grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    }

    .data-label {
        font-size: 3em;
    }

    .data-value {
        font-size: 4rem;
    }

    .weather-settings-title h3 {
        font-size: 3rem;
    }

    .weather-settings-title button {
        font-size: 2rem;
    }

    .weather-param-option {
        font-size: 3rem;
    }

    .weather-param-option input {
        transform: scale(3);
    }

    .location-search-box {
        gap: 1rem;
    }

    .location-search {
        font-size: 3rem;
    }

    .location-search-box button {
        font-size: 2rem;
    }
}

/* Low height */

@media (min-width: 1000px) and (max-height: 650px) {
    .sidebar-data li {
        gap: 0;
    }

    .sidebar-data img {
        width: 2.5rem;
        height: 2.5rem;
    }

    .location-panel {
        width: 80%;
        max-height: 90%;
    }

    .sidebar-button {
        flex-shrink: 0;
    }

    .weather-settings-title h3 {
        font-size: 1.5rem;
    }
}

/* Override for 1024x600 */

@media (width: 1024px) and (height: 600px) {
    .sidebar-data li {
        gap: 0;
    }

    .sidebar-data img {
        width: 2.5rem;
        height: 2.5rem;
    }

    .location-panel {
        width: 80%;
        max-height: 90%;
    }

    .sidebar-button {
        flex-shrink: 0;
    }

    .weather-settings-title h3 {
        font-size: 1.5rem;
    }
}