/* Event Details Modal Styles */

/* Modal size */
#eventDetailsModal .modal-dialog {
    max-width: 1400px;
}

#eventDetailsModal .modal-body {
    max-height: 75vh;
    overflow-y: auto;
}

/* Tabs navigation */
.event-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1.5rem;
}

.event-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.event-tabs .nav-link:hover {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
}

.event-tabs .nav-link.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
    background-color: transparent;
}

.event-tabs .nav-link i {
    margin-right: 0.5rem;
}

/* Event info cards */
.event-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.event-info-card .event-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.event-info-card .event-meta {
    opacity: 0.9;
    font-size: 0.9rem;
}

.event-info-card .status-badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Stats grid */
.event-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.event-stat-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.event-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0d6efd;
}

.event-stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.event-stat-card.stat-success .stat-value {
    color: #28a745;
}

.event-stat-card.stat-warning .stat-value {
    color: #ffc107;
}

.event-stat-card.stat-danger .stat-value {
    color: #dc3545;
}

/* Real-time logs section */
.event-logs-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.logs-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.live-badge {
    background: #28a745;
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.logs-feed {
    max-height: 500px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

.log-entry-realtime {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border-left: 4px solid #6c757d;
    background: #f8f9fa;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.log-entry-realtime.log-error {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.log-entry-realtime.log-warning {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.log-entry-realtime.log-info {
    border-left-color: #0dcaf0;
    background: #f0f9ff;
}

.log-entry-realtime .log-timestamp {
    font-size: 0.8rem;
    color: #6c757d;
    font-family: 'Courier New', monospace;
}

.log-entry-realtime .log-message {
    margin-top: 0.25rem;
    color: #212529;
}

/* Progress section */
.event-progress-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress-bar-wrapper {
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.progress-bar-fill.progress-complete {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.progress-bar-fill.progress-failed {
    background: linear-gradient(90deg, #dc3545 0%, #f8719d 100%);
}

/* Results table */
.results-table {
    width: 100%;
    margin-top: 1rem;
}

.results-table th {
    background: #f8f9fa;
    font-weight: 600;
    padding: 0.75rem;
    border-bottom: 2px solid #dee2e6;
}

.results-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.results-table tr:hover {
    background: #f8f9fa;
}

/* Blocks/Errors section */
.blocks-list {
    list-style: none;
    padding: 0;
}

.block-item {
    background: white;
    border: 1px solid #dee2e6;
    border-left: 4px solid #dc3545;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.block-item .block-type {
    font-weight: 600;
    color: #dc3545;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.block-item .block-url {
    color: #6c757d;
    font-size: 0.85rem;
    word-break: break-all;
}

.block-item .block-timestamp {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Loading state */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Responsive */
@media (max-width: 768px) {
    #eventDetailsModal .modal-dialog {
        max-width: 100%;
        margin: 0.5rem;
    }
    
    .event-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .event-tabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
