/**
 * @description calendar styling sheet
 * @requires tailwind for base utils
*/

/* calendar day cells */
.calendar-day {
    aspect-ratio: 1;
    min-height: 50px;
    position: relative;
}

/* responsive sizes for calendar days */
@media (min-width: 640px) {
    .calendar-day {
        min-height: 60px;
    }
}

@media (min-width: 768px) {
    .calendar-day {
        min-height: 80px;
    }
}

/* event dots with animation */
.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transition: transform 0.2s ease-out;
}

@media (min-width: 768px) {
    .event-dot {
        width: 8px;
        height: 8px;
    }
}

.calendar-day:hover .event-dot {
    transform: scale(1.2);
}

/* button press animation to move calendar month */
#prevMonth, #nextMonth {
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
}

#prevMonth:active, #nextMonth:active {
    transform: scale(0.92);
}

/* smooth fade in and out for calendar grid */
#calendarDays {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* modal animations */
.modal-backdrop {
    animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* fade in/out and slide up/down animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideDown {
    from { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

/* ensure modal works on mobile */
.modal-content {
    max-height: 85vh;
}

@media (max-height: 600px) {
    .modal-content {
        max-height: 75vh;
    }
}

/* hover effect on upcoming events */
#eventsList > div {
    transition: transform 0.2s ease-out, background-color 0.2s;
}

#eventsList > div:hover {
    transform: translateX(4px);
}

/* scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}