/* ====================================
   🛡️ ERROR BOUNDARY STYLES
   ==================================== */

.error-boundary-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    grid-column: 1 / -1;
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 15px;
    margin: 2rem 0;
}

/* ====================================
   ERROR ICON
   ==================================== */
.error-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #ff6b6b;
    animation: errorPulse 2s ease-in-out infinite;
}

.error-icon svg {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 0 10px rgba(255, 107, 107, 0.5));
}

@keyframes errorPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ====================================
   ERROR TITLE
   ==================================== */
.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

/* ====================================
   ERROR MESSAGE
   ==================================== */
.error-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.6;
}

/* ====================================
   ERROR ACTIONS
   ==================================== */
.error-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ====================================
   OFFLINE MODE
   ==================================== */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-align: center;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.offline-banner.show {
    transform: translateY(0);
}

.offline-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.offline-banner-icon {
    width: 24px;
    height: 24px;
}

.offline-banner-text {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ====================================
   NETWORK ERROR
   ==================================== */
.network-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.network-error-title {
    color: #ff6b6b;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.network-error-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ====================================
   RETRY BUTTON
   ==================================== */
.btn-retry {
    position: relative;
    overflow: hidden;
}

.btn-retry:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-retry.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* ====================================
   ERROR DETAILS (DEV MODE)
   ==================================== */
.error-details {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    text-align: left;
    max-width: 600px;
    width: 100%;
}

.error-details-toggle {
    background: none;
    border: none;
    color: var(--neon-cyan);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    margin-bottom: 1rem;
}

.error-details-content {
    display: none;
    font-family: monospace;
    font-size: 0.85rem;
    color: #ff6b6b;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.error-details-content.show {
    display: block;
}

/* ====================================
   FALLBACK UI
   ==================================== */
.fallback-ui {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.fallback-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.fallback-message {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 768px) {
    .error-boundary-ui {
        padding: 2rem 1rem;
    }
    
    .error-title {
        font-size: 1.25rem;
    }
    
    .error-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .error-actions .btn {
        width: 100%;
    }
    
    .offline-banner {
        padding: 0.5rem 1rem;
    }
    
    .offline-banner-text {
        font-size: 0.85rem;
    }
}
