/**
 * Popular Times Grid Layout
 * Modern card-based grid layout for displaying popular times data
 */

.popular-times-container {
    margin-bottom: 2rem;
}

.popular-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Card Styling */
.popular-times-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.popular-times-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Animation delay for cards */
.popular-times-card:nth-child(1) { animation-delay: 0.1s; }
.popular-times-card:nth-child(2) { animation-delay: 0.2s; }
.popular-times-card:nth-child(3) { animation-delay: 0.3s; }
.popular-times-card:nth-child(4) { animation-delay: 0.4s; }
.popular-times-card:nth-child(5) { animation-delay: 0.5s; }
.popular-times-card:nth-child(6) { animation-delay: 0.6s; }
.popular-times-card:nth-child(7) { animation-delay: 0.7s; }

/* Card Header */
.popular-times-card-header {
    background-color: var(--primary-color, #4a89dc);
    color: #fff;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.popular-times-card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Card Content */
.popular-times-card-content {
    padding: 1rem;
}

/* Time Period Row */
.time-period-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.time-period-row:last-child {
    border-bottom: none;
}

.time-period-name {
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
}

/* Busyness Indicators */
.time-period-busyness {
    display: flex;
    align-items: center;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.time-period-busyness i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Busyness Level Colors */
.time-period-busyness.not-busy {
    background-color: #e3f9e5;
    color: #2c7a39;
}

.time-period-busyness.slightly-busy {
    background-color: #fff8e6;
    color: #b78105;
}

.time-period-busyness.busy {
    background-color: #fff1f0;
    color: #cf1322;
}

.time-period-busyness.very-busy {
    background-color: #ffccc7;
    color: #a8071a;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .popular-times-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .popular-times-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 576px) {
    .popular-times-grid {
        grid-template-columns: 1fr;
    }
    
    .time-period-name {
        font-size: 0.9rem;
    }
    
    .time-period-busyness {
        font-size: 0.85rem;
    }
}

/* FadeInUp Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
