/* ENHANCED CALENDAR STYLING WITH CHECKLIST INTEGRATION */

/* Calendar Event Badges */
.checklist-badge {
    background: rgba(255, 193, 7, 0.9) !important;
    color: #333 !important;
    font-size: 0.7em !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    margin-left: 4px !important;
    font-weight: bold !important;
}

.agenda-badge {
    background: rgba(13, 202, 240, 0.9) !important;
    color: white !important;
    font-size: 0.7em !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    margin-left: 2px !important;
}

/* Event Details Modal Styling */
.event-details {
    max-height: 70vh;
    overflow-y: auto;
}

.event-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.event-agenda .agenda-content {
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.5;
}

.event-checklist .checklist-items {
    max-height: 200px;
    overflow-y: auto;
}

.checklist-item {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.checklist-item:hover {
    background-color: #f8f9fa !important;
    border-color: #adb5bd;
}

.checklist-item.completed {
    background-color: rgba(25, 135, 84, 0.1) !important;
    border-color: #198754;
}

.checklist-item input[type="checkbox"] {
    transform: scale(1.2);
}

/* Calendar Legend Styling */
.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Calendar Stats */
.stat-item {
    padding: 0.25rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.stat-item:last-child {
    border-bottom: none;
}

/* Enhanced FullCalendar Styling */
.fc-event {
    cursor: pointer;
    transition: all 0.2s ease;
}

.fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fc-event-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Calendar Header Buttons */
.fc-button-group .fc-button {
    background: #001f3f;
    border-color: #001f3f;
    font-weight: 500;
}

.fc-button-group .fc-button:hover {
    background: #003366;
    border-color: #003366;
}

.fc-button-group .fc-button-active {
    background: #0056b3 !important;
    border-color: #0056b3 !important;
}

/* Export Button Styling */
.event-actions .btn-group {
    gap: 0;
}

.event-actions .btn-group .btn {
    flex: 1;
    font-size: 0.875rem;
}

/* New Event Form Styling */
#newEventForm .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

#newEventForm .form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#newEventForm .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Calendar Responsive Design */
@media (max-width: 768px) {
    .fc-header-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    
    .event-details {
        max-height: 60vh;
    }
    
    .event-actions .btn-group {
        flex-direction: column;
    }
    
    .event-actions .btn-group .btn {
        margin-bottom: 0.5rem;
    }
}

/* Checklist Progress Indicators */
.checklist-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.progress-bar-small {
    height: 6px;
    border-radius: 3px;
    flex-grow: 1;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar-small .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

/* Calendar Loading States */
.calendar-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.calendar-loading .spinner {
    width: 3rem;
    height: 3rem;
    border: 0.3em solid rgba(0, 31, 63, 0.1);
    border-top: 0.3em solid #001f3f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ICS Export Success Indication */
.export-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Calendar Theme Customization */
.fc-theme-standard .fc-scrollgrid {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.fc-theme-standard th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-color: #dee2e6;
}

.fc-theme-standard td {
    border-color: #dee2e6;
}

.fc-day-today {
    background-color: rgba(0, 31, 63, 0.05) !important;
}

/* Event Type Color Coding */
.fc-event.trip-event {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.fc-event.mini-trip-event {
    background-color: #198754;
    border-color: #198754;
}

.fc-event.checklist-event {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.fc-event.reminder-event {
    background-color: #dc3545;
    border-color: #dc3545;
}
