/**
 * TGFlash Log Viewer Styling
 * Styles for TGFlash-specific UI elements and modal
 */

/* TGFlash Metadata Modal */
.tgflash-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
}

.tgflash-modal .modal-title {
    font-weight: 600;
}

.tgflash-modal .btn-close {
    filter: brightness(0) invert(1);
}

.tgflash-modal .modal-body {
    padding: 2rem;
}

.tgflash-modal .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.tgflash-modal .form-control {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tgflash-modal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.tgflash-modal .form-text {
    color: #6c757d;
    font-size: 0.875rem;
}

.tgflash-modal .filename-display {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px dashed #dee2e6;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 1.5rem;
}

.tgflash-modal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tgflash-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* TGFlash Chart Styling */
.tgflash-chart-container {
    position: relative;
    margin-bottom: 2rem;
}

.tgflash-data-info {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

.tgflash-data-info .info-label {
    font-weight: 600;
    color: #667eea;
    margin-right: 0.5rem;
}

.tgflash-data-info .info-value {
    color: #495057;
}

/* High-density data indicator */
.high-density-indicator {
    display: inline-block;
    background-color: #ff9800;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Parameter cards for TGFlash */
.tgflash-param-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tgflash-param-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tgflash-param-card.rpm-card {
    border-left-color: #9C27B0;
}

.tgflash-param-card.torque-card {
    border-left-color: #36A2EB;
}

.tgflash-param-card.boost-card {
    border-left-color: #FF1744;
}

.tgflash-param-card.iq-card {
    border-left-color: #4CAF50;
}

.tgflash-param-card .param-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.tgflash-param-card .param-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

.tgflash-param-card .param-unit {
    font-size: 0.875rem;
    color: #6c757d;
    margin-left: 0.25rem;
}

/* Session Selection Styling */
.session-card {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.session-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.session-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.session-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.session-selected-badge {
    background-color: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.session-details {
    display: flex;
    gap: 1.5rem;
}

.session-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495057;
    font-size: 0.9rem;
}

.session-detail i {
    color: #667eea;
}

#tgflashSessionSection {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.75rem;
}

#tgflashSessionSection h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

#tgflashSessionContainer {
    margin-top: 0.75rem;
}

/* Session Switcher in Chart View */
.session-switcher-container {
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    border-left: 4px solid #667eea;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.session-switcher-container strong {
    color: #495057;
    margin-left: 0.5rem;
}

.session-switcher-container i {
    color: #667eea;
}

#sessionButtonGroup .btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

#sessionButtonGroup .btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

#sessionButtonGroup .btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#sessionButtonGroup .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

#sessionButtonGroup .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

#tgflashSessionSwitcher {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
