/* ========================================
   Global Error Boundary Styles
   ======================================== */

.error-boundary-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef3 100%);
}

.error-boundary-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-icon {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.125rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-details {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.error-details-header {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #495057;
}

.error-details-content {
    font-size: 0.875rem;
}

.error-details-content p {
    margin-bottom: 0.75rem;
    word-break: break-word;
}

.error-details-content strong {
    color: #212529;
    font-weight: 600;
}

.error-details-content details {
    margin-top: 1rem;
}

.error-details-content summary {
    cursor: pointer;
    font-weight: 600;
    color: #0d6efd;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.error-details-content summary:hover {
    background-color: #e7f1ff;
}

.error-stack-trace {
    background: #212529;
    color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.5;
    overflow-x: auto;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.error-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.error-actions .btn i {
    font-size: 1rem;
}

.error-actions .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.error-actions .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.error-actions .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.error-actions .btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.error-actions .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.error-actions .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-2px);
}

.error-support {
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
}

.error-support p {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.error-support i {
    color: #0d6efd;
}

/* Dark Mode Support */
.dark-mode .error-boundary-container {
    background: linear-gradient(135deg, #1a1d23 0%, #2d3339 100%);
}

.dark-mode .error-boundary-content {
    background: #212529;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.dark-mode .error-title {
    color: #e9ecef;
}

.dark-mode .error-message {
    color: #adb5bd;
}

.dark-mode .error-details {
    background: #2d3339;
    border-color: #495057;
}

.dark-mode .error-details-header {
    color: #dee2e6;
}

.dark-mode .error-details-content strong {
    color: #f8f9fa;
}

.dark-mode .error-details-content summary {
    color: #6ea8fe;
}

.dark-mode .error-details-content summary:hover {
    background-color: #1e3a5f;
}

.dark-mode .error-stack-trace {
    background: #1a1d23;
    color: #adb5bd;
}

.dark-mode .error-support {
    border-top-color: #495057;
}

.dark-mode .error-support p {
    color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .error-boundary-content {
        padding: 2rem 1.5rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .error-message {
        font-size: 1rem;
    }
    
    .error-icon {
        font-size: 3rem;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .error-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .error-boundary-container {
        padding: 1rem;
    }
    
    .error-boundary-content {
        padding: 1.5rem 1rem;
    }
    
    .error-title {
        font-size: 1.25rem;
    }
    
    .error-icon {
        font-size: 2.5rem;
    }
}

/* Print Styles */
@media print {
    .error-boundary-container {
        background: white;
        min-height: auto;
    }
    
    .error-boundary-content {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .error-actions {
        display: none;
    }
}
