/* EVC 7-Day Forecast Card Styles */

.evc-seven-day-forecast-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;
    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-seven-day-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-seven-day-forecast-loading,
.evc-seven-day-forecast-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1em;
    font-weight: bold;
    color: #6c757d;
}

.evc-seven-day-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-seven-day-item {
    flex: 0 0 auto; /* Don't grow, don't shrink, base on content */
    width: calc(100% / 7); /* Distribute width for 7 items initially */
    min-width: 100px; /* Minimum width for each item */
    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; /* Distribute space vertically */
    align-items: center;
}

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

.evc-seven-day-name {
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    white-space: normal; /* Allow text to wrap */
    overflow: hidden; /* Hide overflow if it goes beyond height */
    text-overflow: ellipsis; /* Add ellipsis if hidden by overflow */
    min-height: 2.4em; /* Height for two lines (approx 2 * 1.2em line-height) */
    line-height: 1.2em; /* Line height for text */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    width: 99px; /* Fixed width for the container */
}

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

.evc-seven-day-temps {
    font-size: 1.1em;
    font-weight: 700;
    color: #212529;
    margin-bottom: 3px;
}

.evc-seven-day-high {
    margin-right: 5px;
}

.evc-seven-day-low {
    color: #6c757d; /* Lighter color for low temp */
}

.evc-seven-day-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;
    min-height: 2.4em; /* Consistent height for forecast text */
}

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


@media (max-width: 1380px) {
    .evc-seven-day-inner-content {
        padding: 12px;
    }
    .evc-seven-day-item {
        width: 90px; /* Fixed width for each item to ensure scrollability */
        padding: 8px 4px;
    }
    .evc-seven-day-name {
        font-size: 0.8em;
        width: 89px;
        min-height: 2.2em; /* Adjusted height for 2 lines */
        line-height: 1.1em;
    }
    .evc-seven-day-icon {
        width: 50px;
        height: 50px;
    }
    .evc-seven-day-temps {
        font-size: 1em;
    }
    .evc-seven-day-forecast {
        font-size: 0.7em;
        -webkit-line-clamp: 2; /* Keep 2 lines */
        min-height: 2.2em; /* Adjusted height for 2 lines */
        line-height: 1.1em;
    }
}

@media (max-width: 601px) {
    .evc-seven-day-inner-content {
        padding: 10px;
    }
    .evc-seven-day-item {
        width: 90px; /* Adjusted width */
        padding: 6px 3px;
        margin-right: 8px;
    }
    .evc-seven-day-name {
        font-size: 0.75em;
        width: 89px;
        min-height: 2.0em; /* Adjusted height for 2 lines */
        line-height: 1em;
    }
    .evc-seven-day-icon {
        width: 70px; /* Adjusted icon size */
        height: 70px; /* Adjusted icon size */
    }
    .evc-seven-day-temps {
        font-size: 0.9em;
    }
    .evc-seven-day-forecast {
        font-size: 0.65em;
        -webkit-line-clamp: 2; /* Keep 2 lines */
        min-height: 2.0em; /* Adjusted height for 2 lines */
        line-height: 1em;
    }
}

/* Tablet specific height (768px down to 481px) */
@media (max-width: 768px) and (min-width: 481px) {
    .evc-seven-day-forecast-card-container {
        height: 190px; /* Fixed height for tablet */
        padding-bottom: 0; /* Disable aspect ratio hack */
    }
    .evc-seven-day-inner-content {
        padding: 10px; /* Adjust padding for tablet height */
    }
    .evc-seven-day-item {
        width: 85px; /* Adjust item width for tablet */
        padding: 7px 3px;
        margin-right: 7px;
    }
    .evc-seven-day-name {
        font-size: 0.75em;
        min-height: 2.0em;
        line-height: 1em;
    }
    .evc-seven-day-icon {
        width: 50px;
        height: 50px;
    }
    .evc-seven-day-temps {
        font-size: 0.9em;
    }
    .evc-seven-day-forecast {
        font-size: 0.6em;
        min-height: 2.0em;
        line-height: 1em;
    }
}

/* Mobile specific height (480px and below) */
@media (max-width: 480px) {
    .evc-seven-day-forecast-card-container {
        height: 160px; /* Fixed height for mobile */
        padding-bottom: 0; /* Disable aspect ratio hack */
    }
    .evc-seven-day-inner-content {
        padding: 8px; /* Adjust padding for mobile height */
    }
    .evc-seven-day-item {
        width: 70px; /* Adjust item width for mobile */
        padding: 5px 2px;
        margin-right: 6px;
    }
    .evc-seven-day-name {
        font-size: 0.7em;
        min-height: 1.8em;
        line-height: 0.9em;
    }
    .evc-seven-day-icon {
        width: 40px;
        height: 40px;
    }
    .evc-seven-day-temps {
        font-size: 0.8em;
    }
    .evc-seven-day-forecast {
        font-size: 0.55em;
        min-height: 1.8em;
        line-height: 0.9em;
    }
}
