.event-calendar-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    direction: rtl;
    text-align: right;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: #0c4e8b;
    color: white;
}

.calendar-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}
.calendar-header h2#calendar-title {
    margin: 0;
    color: #fff;
}
.calendar-nav {
    background: rgb(175 204 70);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.calendar-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.weekday {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: flex;
    grid-template-columns: repeat(7, 1fr);
    min-height: 600px;
    flex-wrap: wrap;
}

.calendar-day {
    border: 1px solid #e9ecef;
    padding: 10px;
    min-height: 100px;
    position: relative;
    background: white;
    transition: all 0.3s ease;
    width: calc(100% / 7);
}

.calendar-day:hover {
    background: #f8f9fa;
    transform: scale(1.02);
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #adb5bd;
}
.calendar-day.today {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    color: #afcc46;
    font-weight: bold;
}

.calendar-day.today .day-number {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.day-number {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: inherit;
    text-align: center;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.event-item {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    line-height: 1.3;
}

.event-item:hover {
    background: #bbdefb;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.event-thumbnail {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 5px;
    float: left;
}

.event-info {
    overflow: hidden;
}

.event-title {
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 2px;
/*     white-space: nowrap; */
    overflow: hidden;
/*     text-overflow: ellipsis; */
    text-align: right;
}

.event-time {
    color: #666;
    font-size: 11px;
    margin-bottom: 2px;
    text-align: right;
}

.event-location {
    color: #888;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* Event Tooltip Styles */
.event-tooltip-container {
    position: fixed;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;  
    padding: 10px;        
    margin: -10px;         
}
.event-tooltip {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 16px;
    max-width: 300px;
    border: 1px solid #e1e5e9;
    position: relative;
    pointer-events: auto;
    cursor: pointer;      
}

.event-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tooltip-header {
    margin-bottom: 0px;
}

.tooltip-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    text-align: right;
}

.tooltip-time {
    font-size: 13px;
    color: #667eea;
    font-weight: 500;
    text-align: right;
}

.tooltip-description {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 12px;
    max-height: 80px;
    overflow-y: auto;
    text-align: right;
}

.tooltip-location {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-align: right;
    flex-direction: row;
}

.tooltip-cta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e1e5e9;
}

.tooltip-link {
    display: inline-block;
    background: #afcc46;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    direction: rtl;
}

.tooltip-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Tooltip positioning adjustments */
.event-tooltip-container[data-position="bottom"] .event-tooltip::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: white;
}
.tooltip-time, .tooltip-date {
    text-align: right;
    font-weight: 400;
    color: #666;
    font-size: 16px;
    line-height: 1.3;
    /* margin-top: 10px; */
    /* margin-bottom: 10px; */
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-calendar-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .calendar-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .calendar-header h2 {
        font-size: 20px;
    }
    
    .calendar-nav {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .weekday {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .calendar-day {
        padding: 5px;
        min-height: 80px;
    }
    
    .day-number {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .event-item {
        padding: 5px;
        font-size: 11px;
    }
    
    .event-title {
        font-size: 11px;
    }
    
    .event-time,
    .event-location {
        font-size: 10px;
    }
    
    /* Mobile tooltip adjustments */
    .event-tooltip {
        max-width: 250px;
        padding: 12px;
    }
    
    .tooltip-title {
        font-size: 14px;
    }
    
    .tooltip-description {
        font-size: 13px;
        max-height: 60px;
    }
    
    .tooltip-link {
        padding: 6px 12px;
        font-size: 12px;
    }
.calendar-days {
    min-height: 320px;
}
}

@media (max-width: 480px) {
    .calendar-days {
        min-height: 500px;
    }
    
    .calendar-day {
        min-height: 70px;
    }
    
    .event-item {
        padding: 3px;
        font-size: 10px;
    }
    
    .event-thumbnail {
        width: 16px;
        height: 16px;
    }
    
    /* Small mobile tooltip adjustments */
    .event-tooltip {
        max-width: 200px;
        padding: 10px;
    }
    
    .tooltip-title {
        font-size: 13px;
    }
    
    .tooltip-description {
        font-size: 12px;
        max-height: 50px;
    }
    
    .tooltip-link {
        padding: 5px 10px;
        font-size: 11px;
    }
}
