/* VM Timeline - Style Sheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: aliceblue;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.header p {
    color: #666;
    font-size: 1em;
}

/* Filter Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: white;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.filter-btn.active {
    box-shadow: 0 0 0 3px rgba(0,0,0,0.2);
}

/* Category-specific button colors */
.filter-btn[data-category="all"] { background: #34495e; }
.filter-btn[data-category="Mainframe Era"] { background: #8b4513; }
.filter-btn[data-category="Hardware Support"] { background: #2980b9; }
.filter-btn[data-category="Hypervisors"] { background: #27ae60; }
.filter-btn[data-category="Containers"] { background: #e74c3c; }
.filter-btn[data-category="Serverless & Cloud"] { background: #9b59b6; }
.filter-btn[data-category="Infrastructure Tools"] { background: #f39c12; }
.filter-btn[data-category="Research"] { background: #1abc9c; }

/* Navigation Controls */
.nav-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.nav-btn {
    padding: 8px 16px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: #ecf0f1;
    border-color: #95a5a6;
}

/* Timeline Container */
#timeline {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding-left: 80px;
    padding-right: 80px;
    overflow: hidden;
}

/* Override vis-timeline clipping */
.vis-timeline {
    overflow: visible !important;
}

.vis-panel.vis-center {
    overflow: visible !important;
}

.vis-item .vis-item-overflow {
    overflow: visible !important;
}

/* Instructions */
.instructions {
    text-align: center;
    color: #7f8c8d;
    font-size: 13px;
    margin: 15px 0;
}

/* Info Panel */
.info-panel {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* Legend */
.legend {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.legend h3 {
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font-size: 13px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Event Details Panel */
.event-details {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 150px;
}

.event-details h3 {
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.event-details .placeholder {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

.event-details .event-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.event-details .event-date {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 12px;
}

.event-details .event-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: white;
    margin-bottom: 12px;
}

.event-details .event-description {
    font-size: 14px;
    line-height: 1.6;
    color: #34495e;
    margin-bottom: 12px;
}

.event-details .event-context {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.event-details .event-context strong {
    color: #2c3e50;
}

/* vis-timeline Tooltip Styling */
.vis-tooltip {
    background: #2c3e50 !important;
    color: white !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    max-width: 300px !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    box-sizing: border-box !important;
}

.vis-tooltip div {
    max-width: 280px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

/* vis-timeline Item Styling */
.vis-item {
    border-radius: 4px;
    border: none;
    font-size: 12px;
    font-weight: 500;
}

.vis-item.vis-selected {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.4em;
    }

    .info-panel {
        grid-template-columns: 1fr;
    }

    .controls {
        gap: 5px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    #timeline {
        padding-left: 40px;
        padding-right: 40px;
    }
}
