/**
 * Events Visualization Styles
 */

/* Events Sidebar */
.events-sidebar {
    position: fixed;
    top: 80px;
    right: 10px;
    width: 320px;
    max-height: 70vh;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #555;
}

.events-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.btn-toggle-events {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-toggle-events:hover {
    background: #45a049;
}

/* Event Groups */
.event-group {
    margin-bottom: 20px;
}

.event-group h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
    text-transform: capitalize;
}

.event-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-item {
    padding: 8px 10px;
    margin-bottom: 6px;
    background: rgba(60, 60, 60, 0.8);
    border-left: 4px solid #888;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.event-item:hover {
    background: rgba(80, 80, 80, 0.9);
    transform: translateX(3px);
}

.event-item.severity-high {
    border-left-color: #ff4444;
}

.event-item.severity-medium {
    border-left-color: #ffaa00;
}

.event-item.severity-low {
    border-left-color: #44ff44;
}

.event-date {
    display: inline-block;
    font-size: 11px;
    color: #aaa;
    margin-right: 8px;
    font-family: monospace;
}

.event-desc {
    display: inline-block;
    color: #fff;
    font-size: 12px;
}

.event-site {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    color: #ffd700;
}

.event-more {
    padding: 5px 10px;
    color: #aaa;
    font-style: italic;
    font-size: 11px;
}

/* Event Notification Banner */
.event-notification {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.event-banner {
    display: flex;
    align-items: center;
    min-width: 400px;
    max-width: 600px;
    padding: 15px 20px;
    background: rgba(40, 40, 40, 0.98);
    border: 2px solid #888;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
    color: #fff;
}

.event-banner.severity-high {
    border-color: #ff4444;
    background: rgba(60, 20, 20, 0.98);
}

.event-banner.severity-medium {
    border-color: #ffaa00;
    background: rgba(60, 50, 20, 0.98);
}

.event-banner.severity-low {
    border-color: #44ff44;
    background: rgba(20, 60, 20, 0.98);
}

.event-icon {
    font-size: 32px;
    margin-right: 15px;
}

.event-content {
    flex: 1;
}

.event-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: #ffd700;
}

.event-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.event-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    margin-left: 15px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.event-close:hover {
    opacity: 1;
}

/* Event Markers on Timeline */
.event-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4444;
    border: 2px solid #fff;
    cursor: pointer;
    z-index: 100;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.event-marker.severity-medium {
    background: #ffaa00;
}

.event-marker.severity-low {
    background: #44ff44;
}

.event-marker:hover {
    transform: scale(1.5);
    animation: none;
}

/* Scrollbar styling for sidebar */
.events-sidebar::-webkit-scrollbar {
    width: 8px;
}

.events-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.events-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.events-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .events-sidebar {
        width: 280px;
        right: 5px;
        font-size: 12px;
    }

    .event-notification {
        left: 10px;
        right: 10px;
        transform: none;
    }

    .event-banner {
        min-width: auto;
        width: 100%;
    }
}

/* Hide events sidebar by default (can be toggled) */
.events-sidebar.hidden {
    display: none;
}

/* Event filters */
.event-filters {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
}

.event-filters select {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
    background: rgba(60, 60, 60, 0.8);
    color: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    font-size: 12px;
}

.event-filters label {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 3px;
}
