/* Standard Timeline Frontend Styles */

.standard-timeline-container {
    margin: 20px 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.standard-timeline-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.timeline-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.timeline-description {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.standard-timeline-vis {
    min-height: 400px;
    background: #fff;
}

.standard-timeline-legend {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
}

.standard-timeline-legend h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.legend-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.2);
}

.legend-label {
    color: #555;
    font-weight: 500;
}

/* Event Item Styles */
.event-item {
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.event-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 10;
}

/* Event Type Styles */
.event-item.event-call-logs {
    border-left: 4px solid #3498db;
}

.event-item.event-call-recordings {
    border-left: 4px solid #e74c3c;
}

.event-item.event-emails {
    border-left: 4px solid #f39c12;
}

.event-item.event-xero-audit {
    border-left: 4px solid #9b59b6;
}

.event-item.event-verbal-promises {
    border-left: 4px solid #1abc9c;
}

.event-item.event-witnesses {
    border-left: 4px solid #34495e;
}

.event-item.event-whistleblower {
    border-left: 4px solid #e67e22;
}

.event-item.event-unreturned-emails {
    border-left: 4px solid #95a5a6;
}

.event-item.event-missed-calls {
    border-left: 4px solid #2c3e50;
}

.event-item.event-accounting-errors {
    border-left: 4px solid #c0392b;
}

.event-item.event-uncategorized {
    border-left: 4px solid #7f8c8d;
}



/* Timeline Controls */
.timeline-controls {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 10px;
    align-items: center;
}

.timeline-controls button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.timeline-controls button:hover {
    background: #f0f0f0;
    border-color: #999;
}

.timeline-controls button:active {
    background: #e0e0e0;
}

/* Error States */
.standard-timeline-error {
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    text-align: center;
    font-weight: 500;
}

/* Loading State */
.standard-timeline-loading {
    padding: 40px;
    text-align: center;
    color: #666;
}

.standard-timeline-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .standard-timeline-container {
        margin: 10px 0;
        border-radius: 4px;
    }

    .standard-timeline-header {
        padding: 15px;
    }
    
    .timeline-title {
        font-size: 20px;
    }
    
    .timeline-description {
        font-size: 14px;
    }
    
    .standard-timeline-vis {
        min-height: 300px;
    }

    .standard-timeline-legend {
        padding: 15px;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 10px;
    }
    
    .timeline-controls {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .timeline-controls button {
        font-size: 11px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .standard-timeline-header {
        padding: 10px;
    }

    .timeline-title {
        font-size: 18px;
    }

    .timeline-description {
        font-size: 13px;
    }

    .standard-timeline-vis {
        min-height: 250px;
    }

    .standard-timeline-legend {
        padding: 10px;
    }
    
    .timeline-controls {
        padding: 8px 10px;
    }
}

/* Print Styles */
@media print {
    .standard-timeline-container {
        border: none;
        box-shadow: none;
        break-inside: avoid;
    }

    .timeline-controls {
        display: none;
    }

    .standard-timeline-vis {
        min-height: 300px;
    }

    .standard-timeline-legend {
        break-inside: avoid;
    }
}

/* Note: Attachment styles removed - functionality deprecated */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .standard-timeline-container {
        border: 2px solid #000;
    }

    .event-item {
        border: 2px solid #000;
        background: #fff;
    }

    .timeline-title {
        color: #000;
    }

    .timeline-description,
    .legend-label {
        color: #000;
    }

    /* Note: Attachment styles removed */
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .timeline-controls button {
        transition: none;
    }

    .standard-timeline-loading::after {
        animation: none;
    }
}

/* Full Width Timeline Styles - Simple Flexbox Approach */
.standard-timeline-fullwidth,
.event-timeline-fullwidth,
.evidence-timeline-fullwidth {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Content containers with max-width for readability */
.standard-timeline-fullwidth h3,
.standard-timeline-fullwidth p,
.standard-timeline-fullwidth > div:last-child,
.event-timeline-fullwidth .event-timeline-legend,
.event-timeline-fullwidth .event-timeline-controls,
.evidence-timeline-fullwidth h3,
.evidence-timeline-fullwidth p,
.evidence-timeline-fullwidth > div:last-child {
    width: 100% !important;
    max-width: 1200px !important;
    padding: 0 20px !important;
    box-sizing: border-box;
}

/* Timeline visualization takes available width */
.standard-timeline-fullwidth #timeline-container,
.event-timeline-fullwidth .event-timeline-vis,
.evidence-timeline-fullwidth > div:last-child {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 20px !important;
    box-sizing: border-box;
}

/* Enhanced selection styling for background items */
.vis-timeline .vis-item.vis-background.vis-selected {
    border: 2px solid #FFC200 !important;
    box-shadow: 0 0 5px rgba(255, 194, 0, 0.5) !important;
    opacity: 0.8 !important;
}

/* Center the timeline controls */
.standard-timeline-fullwidth > div:last-child,
.event-timeline-fullwidth .event-timeline-controls,
.evidence-timeline-fullwidth > div:last-child {
    text-align: center !important;
}
