
#weather-container {
    margin-top: 70px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
    width: 100%;
    align-items: stretch;
    clip-path: inset(1px 0 0 1px);
}

.weather-date {
    font-size: 30px;
}

#weather-container .weather-date {
    text-align: center;
    padding: 30px 20px;
}

/* each day spans 4 rows (date + 3 areas) shared with the neighbouring days,
   so rows always have the same height across columns */
.weather-location {
    width: 100%;
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    gap: 0;
    border-top: 1px solid #ddd;
    border-left: 1px solid #ddd;
}

@media (min-width: 992px) {
    #weather-container {
        grid-template-columns: repeat(3, 1fr);
    }

    #weather-container .weather-location:nth-child(n+4) {
        margin-top: 40px;
        border-top: none;
    }

    #weather-container .weather-location:nth-child(-n+3) {
        border-bottom: 1px solid #ddd;
    }
}

.weather-location h2 {
    text-align: center;
}

.weather-row {
    width: 100%;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

.weather-date + .weather-row,
.weather-row + .weather-row {
    border-top: 1px solid #ddd;
}

.weather-row .details {
    flex: 1;
    line-height: 1.2;
    font-size: 1.1rem;
}

.weather-row .details h3 {
    font-size: 1.2rem;
}

.weather-row .details .precipitation {
    color: #42a3f1;
    font-size: 0.9rem;
    padding-top: 10px;
}

.icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    min-width: 100px;
    max-width: 100px;
}

.weather-map {
    width: 350px;
    height: 530px;
    position: relative;
}

.weather-map img {
    width: 100%;
    user-select: none;
}

.weather-map-description {
    padding: 0 20px;
    max-width: 350px;
}

.weather-today-icon {
    width: 120px;
    height: 120px;
    background: white;
    position: absolute;
    border-radius: 10px;
    border: 2px solid #ddd;
    transform: scale(0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.weather-today-icon .icon-container img {
    width: 100px;
}

#weather-today-lugano {
    bottom: 40px;
    right: 40px;
}

#weather-today-bellinzona {
    bottom: 170px;
    right: 60px;
}

#weather-today-faido {
    bottom: 345px;
    right: 100px;
}
