/* assets/css/weather-styles.css */

.weather-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-md);
    padding: 20px;
    transition: var(--transition-medium);
    overflow: hidden;
    position: relative;
    height: 100%;
}

.weather-card:before {
    content: '';
    position: absolute;
    top: -150px;
    right: -150px;
    width: 300px;
    height: 300px;
    background-color: var(--primary-color);
    opacity: 0.1;
    border-radius: 50%;
    transition: var(--transition-medium);
}

.weather-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.weather-card:hover:before {
    transform: scale(1.2);
    opacity: 0.15;
}

.weather-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.city-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flag-icon {
    width: 24px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.city-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-color);
}

.current-date {
    font-size: 0.85rem;
    color: var(--subtle-text-color);
    font-weight: 500;
}

.weather-content {
    text-align: center;
    display: none; /* Default state is hidden */
}

.weather-content.active {
    display: block; /* Active state is visible */
}

.weather-icon-big img {
    width: 120px;
    height: 120px;
    margin: -10px auto;
}

.temperature {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0;
    line-height: 1;
}

.description {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-transform: capitalize;
}

.details {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.detail-item {
    font-size: 0.9rem;
    color: var(--text-color);
}

.detail-item i {
    margin-right: 5px;
    color: var(--subtle-text-color);
}

/* Forecast Styles */
.forecast-content {
    min-height: 250px; /* Ensure consistent card height */
}
.forecast-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.95rem;
}

.forecast-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.forecast-item .day {
    font-weight: 600;
    color: var(--heading-color);
    flex-basis: 30%;
    text-align: left;
}

.weather-icon-small {
    width: 40px;
    height: 40px;
}

.forecast-item .temp {
    color: var(--text-color);
    flex-basis: 40%;
    text-align: right;
}

.forecast-item .temp strong {
    color: var(--heading-color);
}

/* Filter Buttons */
.weather-filters .btn {
    margin: 0 5px;
    min-width: 120px;
}

/* --- Hourly Forecast Modal Styles --- */

.weather-card[data-bs-toggle="modal"] {
    cursor: pointer;
}

.weather-modal-content {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
}

.weather-modal-content .modal-header {
    border-bottom: 1px solid var(--border-color);
}

.weather-modal-content .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.weather-modal-content .modal-title {
    color: var(--heading-color);
    font-weight: 600;
}

#hourlyForecastBody {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.hourly-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease-in-out;
}

.hourly-item:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.02);
}

.hourly-time {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--heading-color);
    flex: 0 0 70px; /* Fixed width for time */
}

.hourly-icon img {
    width: 50px;
    height: 50px;
}

.hourly-temp {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    flex: 0 0 70px; /* Fixed width for temp */
    text-align: center;
}

.hourly-desc {
    font-size: 0.95rem;
    color: var(--text-color);
    flex-grow: 1; /* Takes remaining space */
    text-align: left;
    padding-left: 20px;
    text-transform: capitalize;
}

@media (max-width: 767px) {
    .hourly-item {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        padding: 15px;
    }
    .hourly-desc {
        flex-basis: 100%;
        padding-left: 0;
        margin-top: 5px;
        font-size: 0.9rem;
    }
    .hourly-time, .hourly-temp {
        flex-basis: 50%;
    }
}