/**
 * Error Handler Styles
 * User-friendly error modal and notifications
 */

/* Error Modal */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.error-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #0f3460;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: errorModalSlideIn 0.3s ease-out;
}

@keyframes errorModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.error-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.error-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.error-title i {
    font-size: 24px;
}

.error-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.error-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.error-modal-body {
    padding: 24px;
}

/* Error Icon */
.error-icon {
    text-align: center;
    margin-bottom: 20px;
    font-size: 64px;
    animation: errorIconPulse 2s infinite;
}

.error-icon-orange {
    color: #ff6b35;
}

.error-icon-yellow {
    color: #f7b801;
}

.error-icon-red {
    color: #e74c3c;
}

.error-icon-gray {
    color: #95a5a6;
}

@keyframes errorIconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Error Message */
.error-message {
    text-align: center;
    color: #e0e0e0;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Error Details */
.error-details {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.error-details pre {
    color: #aaa;
    font-size: 12px;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Error Actions */
.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.error-action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.error-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.error-action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.error-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Success Notification */
.error-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
    z-index: 10001;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease-out;
}

.error-success-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive */
@media (max-width: 600px) {
    .error-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .error-action-btn {
        width: 100%;
    }
}

