/* EVC Unified Forecast Card Styles */
/* This file replaces evc-hourly-weather.css and evc-seven-day-forecast.css */

.evc-forecast-card-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #f0f4f7;
    border: 1px solid #dbe3e8;
    font-family: 'Inter', sans-serif;
    color: #34495e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.evc-forecast-inner-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    box-sizing: border-box;
}

.evc-forecast-loading,
.evc-forecast-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1em;
    font-weight: bold;
    color: #6c757d;
}

.evc-forecast-scroll-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px; /* Space for scrollbar */
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.evc-forecast-scroll-container::-webkit-scrollbar {
    height: 8px;
    background-color: transparent;
}

.evc-forecast-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.evc-forecast-item {
    flex: 0 0 100px; /* Base width, don't grow or shrink */
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
    padding: 10px 5px;
    margin-right: 10px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    scroll-snap-align: start;
    text-align: center;
}

.evc-forecast-item:last-child {
    margin-right: 0;
}

.evc-forecast-item-time {
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    min-height: 2.4em; /* Reserve space for two lines */
    line-height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.evc-forecast-item-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 5px 0;
}

.evc-forecast-item-temp {
    font-size: 1.2em;
    font-weight: 700;
    color: #212529;
}

/* Specific to 7-day forecast high/low temps */
.evc-forecast-item-temp .evc-seven-day-high {
    margin-right: 5px;
}

.evc-forecast-item-temp .evc-seven-day-low {
    color: #6c757d;
}

.evc-forecast-item-desc {
    font-size: 0.75em;
    color: #666;
    line-height: 1.2;
    min-height: 2.4em; /* Reserve space for two lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Responsive Adjustments --- */

/* Tablet and Small Mobile */
@media (max-width: 768px) {
    .evc-forecast-card-container {
        height: 190px; /* Fixed height for consistency */
        padding-bottom: 0;
    }

    .evc-forecast-inner-content {
        padding: 10px;
    }

    .evc-forecast-item {
        flex-basis: 85px;
        margin-right: 8px;
        padding: 8px 4px;
    }

    .evc-forecast-item-time {
        font-size: 0.75em;
    }

    .evc-forecast-item-icon {
        width: 50px;
        height: 50px;
    }

    .evc-forecast-item-temp {
        font-size: 1em;
    }

    .evc-forecast-item-desc {
        font-size: 0.7em;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .evc-forecast-card-container {
        height: 200px; /* Adjust height for smaller screens */
    }

    .evc-forecast-inner-content {
        padding: 8px;
    }

    .evc-forecast-item {
        flex-basis: 100px;
        margin-right: 6px;
        padding: 6px 3px;
    }
    
    .evc-forecast-item-icon {
        width: 55px;
        height: 55px;
    }

    .evc-forecast-item-temp {
        font-size: 0.9em;
    }

    .evc-forecast-item-desc {
        font-size: 0.65em;
    }
}

/* Larger Desktops */
@media (min-width: 1200px) {
    .evc-forecast-inner-content {
        padding: 20px;
    }

    .evc-forecast-item {
        flex-basis: 120px;
        padding: 12px 6px;
        margin-right: 12px;
    }

    .evc-forecast-item-time {
        font-size: 1em;
    }

    .evc-forecast-item-icon {
        width: 70px;
        height: 70px;
    }

    .evc-forecast-item-temp {
        font-size: 1.4em;
    }

    .evc-forecast-item-desc {
        font-size: 0.85em;
    }
}
