/* Calendar Specific Styles */

/* Calendar Header */
.calendar-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    padding: 3rem 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-header-content {
    text-align: center;
}

.calendar-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.calendar-title i {
    color: #7c3aed;
}

.calendar-description {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Calendar Navigation */
.calendar-nav {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 600px;
    margin: 0 auto;
}

.btn-nav-month {
    background: rgba(124, 58, 237, 0.2);
    color: #a855f7;
    border: 1px solid rgba(124, 58, 237, 0.4);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-nav-month:hover {
    background: rgba(124, 58, 237, 0.4);
    color: #ffffff;
    border-color: rgba(124, 58, 237, 0.6);
    transform: translateY(-2px);
}

.current-month h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    margin: 0;
    min-width: 200px;
}

/* Calendar Grid */
.calendar-section {
    padding: 2rem 0 4rem;
}

.calendar-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.weekday-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(99, 102, 241, 0.3) 100%);
    color: #ffffff;
    padding: 1.2rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid rgba(124, 58, 237, 0.4);
}

#calendarDays {
    display: contents;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.03);
    min-height: 120px;
    padding: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.calendar-day:hover {
    background: rgba(124, 58, 237, 0.1);
    transform: scale(1.02);
    z-index: 10;
    border-radius: 8px;
    border-color: rgba(124, 58, 237, 0.3);
}

.calendar-day.other-month {
    background: rgba(255, 255, 255, 0.01);
    opacity: 0.3;
}

.calendar-day.other-month:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: none;
}

.calendar-day.today {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    border: 2px solid rgba(34, 197, 94, 0.5);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.calendar-day.has-event {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.calendar-day.has-event:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 5px 20px rgba(124, 58, 237, 0.3);
}

.day-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.calendar-day.other-month .day-number {
    color: #64748b;
}

.calendar-day.today .day-number {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
}

.calendar-events {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-event {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.9) 0%, rgba(99, 102, 241, 0.9) 100%);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.calendar-event:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 1) 0%, rgba(99, 102, 241, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    z-index: 20;
}

.event-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #7c3aed;
    border-radius: 50%;
    margin-right: 6px;
}

/* Event Legend */
.event-legend {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.event-legend h3 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.legend-items {
    display: flex;
    justify-content: space-around;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.legend-color.event-dot {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
}

.legend-color.today-dot {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
}

/* Event Modal Styles */
.event-modal-content {
    max-width: 800px;
    margin: 2% auto;
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.95) 0%, rgba(26, 31, 46, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-event-header {
    position: relative;
}

.modal-event-header #modalEventBanner {
    width: 100%;
    height: 200px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.modal-event-header #modalEventBanner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.modal-convoy-name {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-convoy-name h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-event-body {
    padding: 2rem;
}

.modal-event-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.event-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.event-info-item i {
    color: #7c3aed;
    font-size: 1.2rem;
    margin-top: 2px;
}

.event-info-item div {
    flex: 1;
}

.event-info-item strong {
    color: #ffffff;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.event-info-item p {
    color: #cbd5e1;
    margin: 0;
    line-height: 1.4;
}

.modal-event-attendance {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-event-attendance h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.modal-attendance-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.modal-attendance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.modal-attendance-item i {
    color: #7c3aed;
    font-size: 1.5rem;
}

.modal-attendance-item span {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.875rem;
}

.modal-event-map {
    margin-bottom: 2rem;
}

.modal-event-map img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-event-map img:hover {
    transform: scale(1.02);
}

.modal-event-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .calendar-controls {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }
    
    .day-number {
        font-size: 0.875rem;
    }
    
    .calendar-event {
        font-size: 0.625rem;
        padding: 1px 4px;
    }
    
    .modal-event-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-attendance-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-event-actions {
        flex-direction: column;
    }
    
    .event-modal-content {
        margin: 1% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        gap: 0;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 2px;
    }
    
    .weekday-header {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

/* Active Navigation Link */
.nav-link.active {
    color: #7c3aed;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #7c3aed;
    border-radius: 1px;
}