/* Enhanced Calendar Styles with Modern Design */

/* Base Calendar Styles */
.fc {
    font-family: 'Sarabun', sans-serif;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.fc-toolbar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    margin-bottom: 0 !important;
}

.fc-toolbar-title {
    font-size: 1.8rem !important;
    color: white !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fc-button {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 25px !important;
    font-size: 0.9rem;
    padding: 8px 16px !important;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.fc-button:hover,
.fc-button:focus {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.fc-button-active {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    color: #667eea !important;
    font-weight: 600;
}

/* Enhanced Event Styles */
.fc-event {
    border-radius: 8px !important;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.fc-event::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.fc-event:hover::before {
    left: 100%;
}

.fc-event:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    z-index: 10;
}

.fc-event-title {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Severity-specific event colors */
.fc-event.severity-critical {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f) !important;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
}

.fc-event.severity-high {
    background: linear-gradient(135deg, #ffa726, #ff9800) !important;
    box-shadow: 0 3px 10px rgba(255, 167, 38, 0.4);
}

.fc-event.severity-medium {
    background: linear-gradient(135deg, #ffca28, #ffd54f) !important;
    box-shadow: 0 3px 10px rgba(255, 202, 40, 0.4);
    color: #333 !important;
}

.fc-event.severity-low {
    background: linear-gradient(135deg, #66bb6a, #4caf50) !important;
    box-shadow: 0 3px 10px rgba(102, 187, 106, 0.4);
}

/* Calendar Grid Enhancements */
.fc-daygrid-day {
    transition: all 0.3s ease;
    position: relative;
}

.fc-daygrid-day:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05)) !important;
}

.fc-day-today {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1)) !important;
    position: relative;
}

.fc-day-today::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.fc-daygrid-day-number {
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
}

.fc-day-today .fc-daygrid-day-number {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1em;
}

.fc-col-header-cell {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.fc-daygrid-event {
    margin: 2px 3px;
    border-radius: 6px !important;
}

/* Enhanced Legend and UI Elements */
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.legend-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.legend-color {
    width: 24px;
    height: 16px;
    border-radius: 8px;
    margin-right: 12px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Enhanced Modal Styles */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none;
    padding: 20px 25px;
}

.modal-title {
    color: white;
    font-weight: 600;
    font-size: 1.3rem;
}

.modal-body {
    padding: 25px;
}

.form-control-plaintext {
    padding: 12px 15px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
    background: rgba(248, 249, 250, 0.8);
    border: none;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.form-control-plaintext:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

/* Enhanced Badges */
.severity-critical {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f) !important;
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
}

.severity-high {
    background: linear-gradient(135deg, #ffa726, #ff9800) !important;
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(255, 167, 38, 0.4);
}

.severity-medium {
    background: linear-gradient(135deg, #ffca28, #ffd54f) !important;
    color: #333 !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(255, 202, 40, 0.4);
}

.severity-low {
    background: linear-gradient(135deg, #66bb6a, #4caf50) !important;
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(102, 187, 106, 0.4);
}

/* Status Badges */
.status-new {
    background: linear-gradient(135deg, #4facfe, #00f2fe) !important;
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(79, 172, 254, 0.4);
}

.status-investigating {
    background: linear-gradient(135deg, #ffa726, #ffb74d) !important;
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(255, 167, 38, 0.4);
}

.status-resolved {
    background: linear-gradient(135deg, #66bb6a, #81c784) !important;
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(102, 187, 106, 0.4);
}

.status-cancelled {
    background: linear-gradient(135deg, #78909c, #90a4ae) !important;
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(120, 144, 156, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .fc-toolbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .fc-toolbar-title {
        font-size: 1.4rem !important;
        margin-bottom: 10px;
    }
    
    .calendar-card,
    .filter-card {
        margin-bottom: 20px;
    }
    
    .main-header {
        padding: 20px;
        text-align: center;
    }
    
    .header-title {
        font-size: 2rem;
    }
    
    .datetime-display {
        margin-top: 15px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .fc-button {
        font-size: 0.8rem;
        padding: 6px 12px !important;
    }
    
    .fc-toolbar-title {
        font-size: 1.2rem !important;
    }
    
    .header-title {
        font-size: 1.8rem;
    }
}

/* Enhanced Loading Animation */
.calendar-loading {
    position: relative;
    pointer-events: none;
}

.calendar-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: enhanced-spin 1s linear infinite;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

@keyframes enhanced-spin {
    0% { 
        transform: rotate(0deg);
        border-top-color: #667eea;
    }
    25% {
        border-top-color: #764ba2;
    }
    50% { 
        transform: rotate(180deg);
        border-top-color: #4facfe;
    }
    75% {
        border-top-color: #00f2fe;
    }
    100% { 
        transform: rotate(360deg);
        border-top-color: #667eea;
    }
}

/* Enhanced Filter Styles */
.form-select:focus,
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.form-select,
.form-control {
    transition: all 0.3s ease;
}

/* Hover Effects for Interactive Elements */
.fc-daygrid-day:hover .fc-daygrid-day-number {
    color: #667eea;
    transform: scale(1.1);
}

/* Event Count Display */
.event-count {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
    padding: 2px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    margin: 2px;
    font-weight: 500;
}

/* More Link Styling */
.fc-more-link {
    color: #667eea !important;
    font-weight: 600;
    text-decoration: none !important;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.fc-more-link:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

/* Particles Container */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Enhanced Button Animations */
.btn:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.btn:active {
    transform: translateY(0);
}

/* Glassmorphism for modern look */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Custom scrollbar for webkit browsers */
.fc-scrollgrid-liquid {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.fc-scrollgrid-liquid::-webkit-scrollbar {
    width: 8px;
}

.fc-scrollgrid-liquid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.fc-scrollgrid-liquid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.fc-scrollgrid-liquid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}