/* FullCalendar v6 Custom Styles for MBBC */

/* Calendar Container */
.calendar-section {
    background-color: #f9fafb;
    border-radius: 24px;
}

.calendar-section h2 {
    color: #1a365d; /* primary color */
    margin-bottom: 1.5rem;
    text-align: center;
}

/* FullCalendar Base Styling */
.fc {
    font-family: inherit;
    border: none;
    background: white;
}

/* Calendar Header */
.fc .fc-toolbar {
    padding: 1.5rem 0 0;
    background: white;
    justify-content: space-between;
}

.fc .fc-toolbar-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1a365d;
    margin: 0;
}

/* Left button group styling */
.fc .fc-toolbar-chunk:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fc .fc-button-group {
    display: flex;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    gap: 1px;
}

.fc .fc-button {
    background: #297D99 !important;
    border: none !important;
    color: white !important;
    padding: 0.75rem 1rem !important;
    font-weight: 500 !important;
    text-transform: capitalize !important;
    transition: all 0.2s !important;
    margin: 0 !important;
    height: auto !important;
    border-radius: 0 !important;
    position: relative;
}

.fc .fc-button:hover {
    background: #1f5f73 !important; /* 20% darker */
    transform: none;
}

.fc .fc-button:active,
.fc .fc-button-active {
    background: #1a4f61 !important;
    transform: none;
}

.fc .fc-button:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Subscribe button specific styling */
.fc .fc-subscribe-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #297D99 !important;
}

.fc .fc-subscribe-button:hover {
    background: #1f5f73 !important;
}

.fc .fc-subscribe-button svg {
    width: 16px !important;
    height: 16px !important;
    stroke: white !important;
}

/* Calendar Grid */
.fc .fc-scrollgrid {
    border: 1px solid #e5e7eb;
    overflow: hidden;
    border-radius: 16px;
}

.fc th:last-child, .fc td:last-child, .fc  {
    border-right-width: 0px;
}

.fc .fc-scrollgrid-section-body > td {
    border-bottom-width: 0px;
}

.fc .fc-col-header-cell {
    padding: 3px 0.75rem;
    font-weight: 600;
    color: #374151;
    background: #f4f8f5;
    text-align: center;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    border-color: #e5e7eb;
}

/* Calendar Days */
.fc .fc-daygrid-day-number {
    padding: 4px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.2s;
    font-size: 14px;
}

.fc .fc-daygrid-day-number:hover {
    background-color: #e5e7eb;
    text-decoration: none;
}

.fc .fc-day-today {
    background-color: #f4f8f5 !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    background-color: #03c3e3e6;
    color: white;
    font-weight: 600;
}

.fc .fc-day-other {
    background-color: #f9fafb !important;
}

.fc .fc-day-other .fc-daygrid-day-number {
    color: #9ca3af;
}

/* Events */
.fc .fc-event {
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    margin: 1px 2px !important;
}

.fc .fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* All-day events */
.fc .fc-event.fc-event-all-day {
    margin: 2px 4px !important;
    padding: 0.375rem 0.5rem !important;
}

/* Multi-day events */
.fc .fc-event.fc-event-multi-day {
    border-radius: 4px !important;
}

/* Single day events with time */
.fc .fc-event.fc-event-single-day {
    background-color: transparent !important;
    border: none !important;
    color: #374151 !important;
    padding: 0.125rem 0.25rem !important;
    margin: 1px !important;
}

.fc .fc-event.fc-event-single-day .fc-event-time {
    color: #6b7280 !important;
    font-size: 0.75rem !important;
    margin-right: 0.25rem !important;
}

.fc .fc-event.fc-event-single-day .fc-event-title {
    color: #374151 !important;
    font-size: 0.75rem !important;
}


/* Week/Day view events */
.fc .fc-timegrid-event {
    border-radius: 4px !important;
    padding: 0.25rem 0.5rem !important;
    opacity: 0.9 !important;
}

.fc .fc-timegrid-event .fc-event-time {
    font-size: 0.75rem !important;
    font-weight: normal !important;
}

.fc .fc-timegrid-event .fc-event-title {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
}

/* Custom Event Tooltips */
.event-tooltip {
    position: absolute;
    z-index: 1000;
    max-width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #9ca3af; /* medium-gray border */
    font-size: 0.875rem;
    opacity: 0;
    animation: fadeInTooltip 0.2s ease-out forwards;
    overflow: hidden;
}

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

.event-tooltip .event-preview-card {
    display: block;
}

.event-tooltip .event-image {
    width: 100%;
    aspect-ratio: 16/9; /* widescreen aspect ratio */
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.event-tooltip .event-content {
    padding: 2rem; /* p-8 equivalent */
}

.event-tooltip .event-title {
    font-size: 1.125rem; /* h3 equivalent */
    font-weight: 600;
    color: #1a365d;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.event-tooltip .event-datetime {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.event-tooltip .event-text {
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* More link styling */
.fc .fc-more-link {
    color: #1a365d !important;
    font-weight: 600 !important;
}

.fc .fc-more-link:hover {
    color: #2d4a66 !important;
}

/* Popover styling */
.fc .fc-popover {
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.fc .fc-popover-header {
    background: #1a365d !important;
    color: white !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 0.75rem 1rem !important;
    font-weight: 600 !important;
}

/* Loading states */
.fc .fc-loading {
    opacity: 0.7;
}

/* Responsive design */
@media (max-width: 768px) {
    .calendar-section {
        padding: 1rem;
        margin-top: 2rem;
        border-radius: 16px;
    }
    
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .fc .fc-button {
        margin: 0.125rem !important;
        padding: 0.375rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    .event-tooltip {
        max-width: 90vw !important;
        left: 5vw !important;
        right: 5vw !important;
    }
    
    .event-tooltip .event-preview {
        flex-direction: column;
    }
    
    .event-tooltip .event-preview-image {
        width: 100%;
        height: 120px;
    }
}