/* EVC Hourly Weather Card Styles */

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

.evc-hourly-inner-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px; /* Padding for the entire content area */
    box-sizing: border-box;
}

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

.evc-hourly-scroll-container {
    display: flex;
    overflow-x: scroll; /* Always show scrollbar, but make it transparent */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scroll-snap-type: x mandatory; /* Snap to items */
    padding-bottom: 10px; /* Space for scrollbar */
    height: 100%; /* Make scroll container take full height */
    /* Custom scrollbar styling for Webkit (Chrome, Safari) */
    &::-webkit-scrollbar {
        width: 8px; /* Fixed width for vertical scrollbar */
        height: 8px; /* Fixed height for horizontal scrollbar */
        background-color: transparent; /* Make background transparent */
    }

    &::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0); /* Transparent thumb by default */
        border-radius: 10px;
        transition: background-color 0.3s ease; /* Smooth transition */
    }

    /* Show scrollbar thumb on hover */
    &:hover::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2); /* Semi-transparent black on hover */
    }

    /* Custom scrollbar styling for Firefox */
    scrollbar-width: thin; /* Always reserve space */
    scrollbar-color: transparent transparent; /* Transparent thumb and track */

    &:hover {
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Semi-transparent thumb on hover */
    }
}

.evc-hourly-item {
    flex: 0 0 auto; /* Don't grow, don't shrink, base on content */
    width: 100px; /* Fixed width for each hourly block */
    text-align: center;
    padding: 10px 5px;
    margin-right: 10px; /* Space between items */
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    scroll-snap-align: start; /* Snap to start of item */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.evc-hourly-item:last-child {
    margin-right: 0; /* No margin on the last item */
}

.evc-hourly-time {
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.evc-hourly-icon {
    width: 80px; /* Base Icon size */
    height: 80px; /* Base Icon size */
    margin-bottom: 5px;
}

.evc-hourly-temp {
    font-size: 1.2em;
    font-weight: 700;
    color: #212529;
    margin-bottom: 3px;
}

.evc-hourly-forecast {
    font-size: 0.75em;
    color: #666;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
}

/* Responsive adjustments */
/* Removed min-width: 769px media query as its scrollbar styles are now handled directly in .evc-hourly-scroll-container */


@media (max-width: 1380px) {
    .evc-hourly-inner-content {
        padding: 12px;
        height: auto;;
    }
    .evc-hourly-item {
        width: 90px;
        padding: 8px 4px;
    }
    .evc-hourly-time {
        font-size: 0.8em;
    }
    .evc-hourly-icon {
        width: 70px; /* Icon size for this breakpoint */
        height: 70px; /* Icon size for this breakpoint */
    }
    .evc-hourly-temp {
        font-size: 1.1em;
    }
    .evc-hourly-forecast {
        font-size: 0.7em;
    }
}

@media (max-width: 601px) {
    .evc-hourly-inner-content {
        padding: 10px;
    }
    .evc-hourly-item {
        width: 80px;
        padding: 6px 3px;
        margin-right: 8px;
    }
    .evc-hourly-time {
        font-size: 0.75em;
    }
    .evc-hourly-icon {
        width: 70px; /* Icon size for this breakpoint */
        height: 70px; /* Icon size for this breakpoint */
    }
    .evc-hourly-temp {
        font-size: 1em;
    }
    .evc-hourly-forecast {
        font-size: 0.65em;
    }
}

/* Refined breakpoint for smooth scaling between 480px and 344px */
@media (max-width: 480px) {
    .evc-hourly-weather-card-container {
        height: 160px; /* Fixed height for mobile */
        padding-bottom: 0; /* Disable aspect ratio hack */
    }
    .evc-hourly-inner-content {
        padding: 6px; /* Reduced padding for tighter fit */
    }
    .evc-hourly-item {
        width: calc(33.33% - 8px); /* Roughly 3 items per view, accounting for margin */
        min-width: 65px; /* Ensure a minimum size */
        padding: 4px 2px;
        margin-right: 4px;
    }
    .evc-hourly-time {
        font-size: 0.65em; /* Smaller font */
    }
    .evc-hourly-icon {
        width: 70px; /* Icon size for this breakpoint */
        height: 70px; /* Icon size for this breakpoint */
    }
    .evc-hourly-temp {
        font-size: 0.8em; /* Smaller font */
    }
    .evc-hourly-forecast {
        font-size: 0.55em; /* Smaller font */
        -webkit-line-clamp: 1; /* Limit to 1 line for very small screens */
    }
}

/* Tablet specific height */
@media (max-width: 768px) and (min-width: 481px) {
    .evc-hourly-weather-card-container {
        height: 190px; /* Fixed height for tablet */
        padding-bottom: 0; /* Disable aspect ratio hack */
    }
    .evc-hourly-inner-content {
        padding: 10px; /* Adjust padding for tablet height */
    }
    .evc-hourly-item {
        width: 85px; /* Adjust item width for tablet */
        padding: 7px 3px;
        margin-right: 7px;
    }
    .evc-hourly-time {
        font-size: 0.75em;
    }
    .evc-hourly-icon {
        width: 70px; /* Icon size for this breakpoint */
        height: 70px; /* Icon size for this breakpoint */
    }
    .evc-hourly-temp {
        font-size: 0.9em;
    }
    .evc-hourly-forecast {
        font-size: 0.6em;
    }
}
