﻿/* EchoFlash Timeline - Simple Styling */

/* Timeline Container */
.timeline-container {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

/* Timeline Controls */
.timeline-controls {
    background: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

    .timeline-controls .btn {
        margin: 0;
    }

    .timeline-controls label {
        margin: 0;
        font-weight: normal;
    }

/* Master Event Items (with children) - shown as range/bar */
.vis-item.timeline-item.master-event {
    background: #4a90e2 !important;
    border: 1px solid #2e6da4 !important;
    border-radius: 4px;
    color: white;
}

    .vis-item.timeline-item.master-event .vis-item-content {
        color: white;
        font-weight: 500;
    }

/* Single Event Items (no children) - shown as box */
.vis-item.timeline-item.single-event {
    background: #e74c3c !important;
    border: 1px solid #c0392b !important;
    border-radius: 4px;
    color: white;
}

    .vis-item.timeline-item.single-event .vis-item-content {
        color: white;
        font-weight: 500;
    }

/* Hover effects */
.vis-item.timeline-item:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Selection */
.vis-item.vis-selected {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    border-width: 2px !important;
}

/* Group Labels */
.vis-label {
    font-weight: 500;
    font-size: 13px;
    color: #333;
    padding-left: 10px !important;
}

    /* Natural disasters */
    .vis-label.event-type-eq {
        border-left: 4px solid #8B4513; /* Saddle Brown */
    }

    .vis-label.event-type-tc {
        border-left: 4px solid #9370DB; /* Medium Purple */
    }

    .vis-label.event-type-fl,
    .vis-label.event-type-ff {
        border-left: 4px solid #1E90FF; /* Dodger Blue */
    }

    .vis-label.event-type-vo {
        border-left: 4px solid #FF4500; /* Orange Red */
    }

    .vis-label.event-type-cw {
        border-left: 4px solid #87CEEB; /* Sky Blue */
    }

    .vis-label.event-type-dr {
        border-left: 4px solid #DAA520; /* Goldenrod */
    }

    .vis-label.event-type-ep,
    .vis-label.event-type-pe {
        border-left: 4px solid #9ACD32; /* Yellow Green */
    }

    .vis-label.event-type-ec {
        border-left: 4px solid #6A5ACD; /* Slate Blue */
    }

    .vis-label.event-type-fr,
    .vis-label.event-type-wf,
    .vis-label.event-type-fo,
    .vis-label.event-type-frw {
        border-left: 4px solid #FF6347; /* Tomato */
    }

    .vis-label.event-type-ht {
        border-left: 4px solid #FF8C00; /* Dark Orange */
    }

    .vis-label.event-type-in {
        border-left: 4px solid #32CD32; /* Lime Green */
    }

    .vis-label.event-type-ls,
    .vis-label.event-type-ms {
        border-left: 4px solid #A0522D; /* Sienna */
    }

    .vis-label.event-type-st,
    .vis-label.event-type-mw {
        border-left: 4px solid #4682B4; /* Steel Blue */
    }

    .vis-label.event-type-av {
        border-left: 4px solid #B0E0E6; /* Powder Blue */
    }

    .vis-label.event-type-ss {
        border-left: 4px solid #20B2AA; /* Light Sea Green */
    }

    .vis-label.event-type-to {
        border-left: 4px solid #708090; /* Slate Gray */
    }

    .vis-label.event-type-ts {
        border-left: 4px solid #00CED1; /* Dark Turquoise */
    }

    .vis-label.event-type-vw {
        border-left: 4px solid #B0C4DE; /* Light Steel Blue */
    }

    /* Human emergencies */
    .vis-label.event-type-ce,
    .vis-label.event-type-co {
        border-left: 4px solid #DC143C; /* Crimson */
    }

    .vis-label.event-type-ur {
        border-left: 4px solid #CD5C5C; /* Indian Red */
    }

    .vis-label.event-type-pd {
        border-left: 4px solid #BC8F8F; /* Rosy Brown */
    }

    .vis-label.event-type-fd {
        border-left: 4px solid #F4A460; /* Sandy Brown */
    }

    .vis-label.event-type-mn {
        border-left: 4px solid #696969; /* Dim Gray */
    }

    .vis-label.event-type-nu {
        border-left: 4px solid #FFB6C1; /* Light Pink */
    }

    .vis-label.event-type-as {
        border-left: 4px solid #8B0000; /* Dark Red */
    }

    /* Technological/Other */
    .vis-label.event-type-ac {
        border-left: 4px solid #2F4F4F; /* Dark Slate Gray */
    }

    .vis-label.event-type-he {
        border-left: 4px solid #00FA9A; /* Medium Spring Green */
    }

    /* DG ECHO specific */
    .vis-label.event-type-fs {
        border-left: 4px solid #FFD700; /* Gold */
    }

    .vis-label.event-type-rs {
        border-left: 4px solid #BDB76B; /* Dark Khaki */
    }

    .vis-label.event-type-cpm {
        border-left: 4px solid #4B0082; /* Indigo */
    }

    .vis-label.event-type-pa {
        border-left: 4px solid #FF69B4; /* Hot Pink */
    }

    /* Default for any unmapped types */
    .vis-label.event-type-other {
        border-left: 4px solid #808080; /* Gray */
    }

/* Timeline Background */
.vis-timeline {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.vis-time-axis .vis-text {
    color: #666;
    font-size: 12px;
}

    .vis-time-axis .vis-text.vis-major {
        font-weight: 600;
        color: #333;
    }

/* Current Time Line */
.vis-current-time {
    background-color: #e74c3c;
    width: 2px;
}

/* Tooltip Styling */
.vis-tooltip {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 4px;
    padding: 12px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    line-height: 1.5;
    z-index: 1000;
}

/* Legend */
.timeline-legend {
    background: #fff;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

    .timeline-legend h4 {
        margin: 0 0 12px 0;
        font-size: 14px;
        font-weight: 600;
    }

/* Responsive Adjustments */
@media (max-width: 767px) {
    .timeline-controls {
        flex-direction: column;
        align-items: stretch;
    }

        .timeline-controls .btn {
            width: 100%;
            margin-bottom: 5px;
        }

        .timeline-controls label {
            text-align: center;
            padding: 8px 0;
        }

    .vis-timeline {
        font-size: 11px;
    }
}

/* Animation for timeline items */
@keyframes itemAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vis-item {
    animation: itemAppear 0.3s ease-out;
}

/* Custom Scrollbar for Timeline */
.vis-panel.vis-center {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

    .vis-panel.vis-center::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .vis-panel.vis-center::-webkit-scrollbar-track {
        background: #f5f5f5;
    }

    .vis-panel.vis-center::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }

        .vis-panel.vis-center::-webkit-scrollbar-thumb:hover {
            background: #999;
        }

/* Print Styles */
@media print {
    .timeline-controls {
        display: none;
    }

    .timeline-legend {
        page-break-before: avoid;
    }

    .vis-timeline {
        border: 1px solid #000;
    }
}
