/* Calendar Widget - Crystal Light Styles */

.w-14-2 {
    width: 14.285%;
    text-align: center;
}

.calendar-grid .grid-day {
    width: 14.285%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: var(--kt-gray-700);
}

.calendar-grid .grid-day:hover {
    background: rgba(var(--kt-primary-rgb), 0.1);
    color: var(--kt-primary);
    transform: scale(1.05);
}

.calendar-grid .grid-day.active {
    background: var(--kt-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 15px rgba(var(--kt-primary-rgb), 0.3);
    font-weight: 600;
}

.calendar-grid .grid-day.active,
.calendar-grid .grid-day.active.today,
.calendar-grid .grid-day.active.has-event {
    background: var(--kt-primary) !important;
    color: #000000 !important;
    font-weight: 800 !important;
}

.calendar-grid .grid-day.today:not(.active) {
    color: var(--kt-primary);
    font-weight: 800;
}

.calendar-grid .grid-day.today::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 16px;
    height: 2px;
    background: var(--kt-primary);
    border-radius: 4px;
}

.calendar-grid .grid-day.has-event::before {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 4px;
    height: 4px;
    background: #FF9800;
    /* Warm orange for events */
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 152, 0, 0.4);
}

.calendar-grid .grid-day.active.has-event::before {
    background: #ffffff;
    box-shadow: none;
}

.calendar-grid .grid-day.other-month {
    opacity: 0.25;
}

/* Crystal Light Theme Overrides for Drawer */
#kt_drawer_calendar {
    backdrop-filter: blur(25px) saturate(180%);
    background: rgba(255, 255, 255, 0.82) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.08) !important;
}

.theme-dark-show #kt_drawer_calendar {
    background: rgba(30, 30, 45, 0.82) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.3) !important;
}

/* Event Cards */
.event-card {
    padding: 1.15rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 0.85rem;
    transition: all 0.3s ease;
    cursor: default;
}

.event-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.04);
    border-color: rgba(var(--kt-primary-rgb), 0.15);
}

.theme-dark-show .event-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

/* Scrollbar Customization for High-Fidelity Look */
#cw_events_list::-webkit-scrollbar {
    width: 4px;
}

#cw_events_list::-webkit-scrollbar-track {
    background: transparent;
}

#cw_events_list::-webkit-scrollbar-thumb {
    background: rgba(var(--kt-primary-rgb), 0.1);
    border-radius: 10px;
}

#cw_events_list:hover::-webkit-scrollbar-thumb {
    background: rgba(var(--kt-primary-rgb), 0.2);
}

/* Animations */
@keyframes cw-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card {
    animation: cw-fade-in 0.4s ease forwards;
}

.active-filter {
    background-color: var(--kt-primary) !important;
    color: var(--kt-primary-inverse) !important;
    box-shadow: 0 4px 10px rgba(var(--kt-primary-rgb), 0.2);
}

.cursor-pointer {
    cursor: pointer !important;
}

/* Ensure transitions are smooth */
.grid-day::before,
.grid-day::after {
    transition: all 0.2s ease;
}

#cw_today_btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#cw_today_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(var(--kt-primary-rgb), 0.2);
}

#cw_type_filter_select+.select2-container--bootstrap5 .select2-selection--single {
    background-color: transparent !important;
    border: none !important;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--kt-gray-700);
}

#cw_type_filter_select+.select2-container--bootstrap5 .select2-selection__rendered {
    padding-left: 15px !important;
    padding-right: 15px !important;
    text-align: center !important;
}

/* Persistent Scrollbar for Event List */
#cw_events_list {
    overflow-y: scroll !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

#cw_events_list::-webkit-scrollbar {
    width: 5px;
    display: block !important;
}

#cw_events_list::-webkit-scrollbar-track {
    background: transparent;
}

#cw_events_list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#cw_events_list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}