/* ==========================================
   ERROR HANDLING & NETWORK STATUS
   ========================================== */

/* Network Error Banner */
.network-error-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    padding: 12px 20px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.network-error-banner i {
    font-size: 18px;
}

/* Error State (for containers) */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #e74c3c;
    text-align: center;
    gap: 16px;
}

.error-state i {
    font-size: 48px;
    opacity: 0.5;
}

.error-state .error-message {
    font-size: 16px;
    font-weight: 500;
}

.error-state .error-details {
    font-size: 13px;
    opacity: 0.7;
    max-width: 400px;
}

.error-state .retry-button {
    margin-top: 16px;
    padding: 10px 20px;
    background: #5865f2;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.error-state .retry-button:hover {
    background: #4a54c9;
    transform: translateY(-1px);
}

/* Toast Error Styling (if using custom toast) */
.toast.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-left: 4px solid #c0392b;
}

.toast.warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-left: 4px solid #e67e22;
}

.toast.success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-left: 4px solid #229954;
}

/* Error Shake Animation */
@keyframes errorShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.error-shake {
    animation: errorShake 0.5s ease;
}

/* Offline Indicator (for specific elements) */
.offline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(24, 26, 32, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    color: #fff;
    gap: 16px;
}

.offline-overlay i {
    font-size: 64px;
    opacity: 0.4;
}

.offline-overlay .offline-text {
    font-size: 18px;
    font-weight: 500;
}

/* Connection Lost Badge */
.connection-lost {
    position: relative;
}

.connection-lost::after {
    content: "Bağlantı yok";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(231, 76, 60, 0.95);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}