/**
 * Enhanced Popular Times Styling
 * Beautiful, modern styling for the popular times display
 */

/* Main container */
.popular-times-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
}

/* Day column */
.day-column {
    flex: 1;
    min-width: 180px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.day-column:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Day name */
.day-name {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color, #3498db);
    color: var(--heading-color, #2c3e50);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* Time period */
.time-period {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.time-period:hover {
    background-color: #f0f2f5;
}

.time-period:last-child {
    margin-bottom: 0;
}

/* Time period name */
.time-period-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

/* Busyness level */
.busyness-level {
    display: block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: #fff;
}

/* Busyness level colors */
.busyness-level.not-busy {
    background-color: #2ecc71;
}

.busyness-level.slightly-busy {
    background-color: #f39c12;
}

.busyness-level.busy {
    background-color: #e67e22;
}

.busyness-level.very-busy {
    background-color: #e74c3c;
}

/* Error message */
.popular-times-message {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    text-align: center;
    color: #555;
    font-size: 16px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color, #3498db);
}

/* Responsive design */
@media (max-width: 768px) {
    .popular-times-container {
        flex-direction: column;
    }
    
    .day-column {
        min-width: 100%;
    }
}

/* Animation for hover effects */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.day-column:hover .day-name {
    animation: pulse 1s infinite;
}

/* Today highlight */
.day-column.today {
    border: 2px solid var(--primary-color, #3498db);
    background-color: rgba(52, 152, 219, 0.05);
}

.day-column.today .day-name {
    color: var(--primary-color, #3498db);
    font-weight: 700;
}

/* Add icons */
.time-period-name::before {
    font-family: "Font Awesome 5 Free";
    margin-right: 5px;
    font-weight: 900;
}

.time-period-name:nth-child(1)::before {
    content: "\f185"; /* sun icon */
}

.time-period-name:nth-child(2)::before {
    content: "\f186"; /* moon icon */
}

/* Loading state */
.popular-times-loading {
    text-align: center;
    padding: 30px;
}

.popular-times-loading::after {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color, #3498db);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
