/* Calendar Modal Styles */
.calendar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.calendar-container {
    position: absolute;
    top: 60px;
    right: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    width: 400px;
    max-width: 90vw;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
    pointer-events: auto;
}

/* Bubble arrow */
.calendar-container::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: white;
    transform: rotate(45deg);
    top: -7px;
    right: 25px;
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-section {
    display: flex;
    flex-direction: column;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: #f0f0f0;
}

.current-month {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: #f0f0f0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 500;
    color: #888;
    padding: 6px 0;
    font-size: 0.8rem;
}

.calendar-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.8rem;
    padding: 6px;
}

.calendar-day:hover {
    background-color: #f5f5f5;
}

.calendar-day.today {
    background-color: #e6f7ff;
    font-weight: 600;
}

.calendar-day.selected {
    background-color: #1a73e8;
    color: white;
}

.calendar-day.selected .event-dot {
    background-color: white;
}

.calendar-day.has-events {
    font-weight: 500;
}

.event-dot {
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #1a73e8;
}

.event-list {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    max-height: 150px;
    overflow-y: auto;
}

.event-list h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #333;
}

.event-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-item {
    background-color: white;
    border-radius: 6px;
    padding: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.event-item h4 {
    margin-top: 0;
    margin-bottom: 0.25rem;
    color: #1a73e8;
    font-size: 0.9rem;
}

.event-item p {
    margin: 0.2rem 0;
    color: #555;
    font-size: 0.8rem;
}

.event-item i {
    margin-right: 0.25rem;
    color: #888;
}

@media (max-width: 480px) {
    .calendar-container {
        right: 10px;
        width: calc(100% - 20px);
        padding: 1rem;
    }
    
    .event-list {
        max-height: 120px;
    }
}
