/* Error toast styling */
#error-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.error-toast {
    padding: 12px 20px;
    border-radius: 4px;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 300px;
    max-width: 500px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    color: white;
}

.error-toast.info {
    background-color: #2196F3;
}

.error-toast.warning {
    background-color: #FF9800;
}

.error-toast.error {
    background-color: #757575;
}

.error-toast.critical {
    background-color: #F44336;
    animation: pulse 2s infinite;
}

.error-toast .icon {
    margin-right: 15px;
    font-size: 20px;
}

.error-toast .content {
    flex-grow: 1;
}

.error-toast .title {
    font-weight: bold;
    margin-bottom: 5px;
}

.error-toast .message {
    margin-bottom: 5px;
}

.error-toast .reference {
    font-size: 0.8em;
    opacity: 0.8;
}

.error-toast .close-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    margin-left: 10px;
    cursor: pointer;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}

/* Error report modal styles */
.error-report-modal {
    width: 800px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.error-report-modal .error-summary {
    margin-bottom: 15px;
}

/* Filter styles */
.error-report-modal .error-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.error-report-modal .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-report-modal .severity-filters {
    display: flex;
    gap: 10px;
}

.error-report-modal .filter-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.error-report-modal #context-filter {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Severity badges */
.error-report-modal .severity-badge {
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
}

.error-report-modal .severity-badge.info {
    background-color: #2196F3;
}

.error-report-modal .severity-badge.warning {
    background-color: #FF9800;
}

.error-report-modal .severity-badge.error {
    background-color: #757575;
}

.error-report-modal .severity-badge.critical {
    background-color: #F44336;
}

/* Stats styles */
.error-report-modal .error-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.error-report-modal .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-report-modal .stat-label {
    font-weight: bold;
}

.error-report-modal .stat-value {
    font-weight: bold;
}

.error-report-modal .stat-critical {
    color: #F44336;
}

.error-report-modal .stat-error {
    color: #757575;
}

.error-report-modal .stat-warning {
    color: #FF9800;
}

.error-report-modal .stat-info {
    color: #2196F3;
}

/* Error list styles */
.error-report-modal .error-list {
    max-height: 30vh;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.error-report-modal .error-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.error-report-modal .error-item:hover {
    background-color: #f5f5f5;
}

.error-report-modal .error-item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
}

.error-report-modal .error-item .error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-weight: bold;
}

.error-report-modal .error-item .error-count-badge {
    background-color: #757575;
    color: white;
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 10px;
}

/* Error details container */
.error-report-modal .error-details-wrapper {
    display: flex;
    gap: 15px;
}

.error-report-modal .error-details {
    flex: 3;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-family: 'Fira Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    white-space: pre-wrap;
    height: 20vh;
    max-height: 20vh;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.error-report-modal .error-resolution {
    flex: 2;
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 4px;
    border: 1px solid #b3e0ff;
    height: 20vh;
    max-height: 20vh;
    overflow-y: auto;
}

.error-report-modal .error-resolution h3 {
    margin-top: 0;
    color: #0078d4;
    font-size: 1em;
    margin-bottom: 10px;
}

.error-report-modal .error-resolution ul {
    margin: 0;
    padding-left: 20px;
}

.error-report-modal .error-resolution li {
    margin-bottom: 5px;
}

.error-report-modal .empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #757575;
    font-style: italic;
}

/* Action buttons */
.error-report-modal .action-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.error-report-modal .left-buttons,
.error-report-modal .right-buttons {
    display: flex;
    gap: 10px;
}

/* Button styles */
.error-report-modal .button {
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    cursor: pointer;
    transition: background-color 0.2s;
}

.error-report-modal .button:hover {
    background-color: #e0e0e0;
}

.error-report-modal .button.primary {
    background-color: #2196F3;
    color: white;
    border-color: #1976D2;
}

.error-report-modal .button.primary:hover {
    background-color: #1976D2;
}

.error-report-modal .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
