/**
 * 🔱 RBN Core - Framework [v3.5 "RbnCore"]
 * 🏛️ ARCHITECTURE  : Sovereign Asset Engine
 * ---------------------------------------
 * 🛰️ COMPONENT     : RbnKit v1.0
 * ⚓ RESOURCE      : rbnAlert.css [Core]
 * 🛡️ STATUS        : Verified & Proxied
 * ---------------------------------------
 */

:root {
    --rbn-blur: blur(16px) saturate(180%) contrast(1.1);
    --rbn-radius: 24px;
    --rbn-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --rbn-font: 'Inter', system-ui, -apple-system, sans-serif;

    /* Colors */
    --rbn-success: #10b981;
    --rbn-error: #f43f5e;
    --rbn-warning: #f59e0b;
    --rbn-info: #3b82f6;
    --rbn-dark: #0f172a;
}



/* ============================================================
   2. UNIFIED TOASTS (rbn-toast)
   ============================================================ */

.rbn-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 400000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rbn-toast {
    width: 340px;
    background: rgba(15, 23, 42, 0.88) !important;
    backdrop-filter: var(--rbn-blur);
    -webkit-backdrop-filter: var(--rbn-blur);
    border-radius: 24px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--rbn-shadow);
    display: flex;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
}

.rbn-toast-icon {
    font-size: 1.5rem;
}

.rbn-toast.is-success .rbn-toast-icon {
    color: var(--rbn-success);
}

.rbn-toast.is-error .rbn-toast-icon {
    color: var(--rbn-error);
}

.rbn-toast.is-info .rbn-toast-icon {
    color: var(--rbn-info);
}

.rbn-toast.is-warning .rbn-toast-icon {
    color: var(--rbn-warning);
}

.rbn-toast-title {
    font-weight: 800;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.rbn-toast-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   3. UNIFIED MODALS (Center Alerts)
   ============================================================ */

.rbn-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(8px);
    z-index: 600000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.rbn-modal-card {
    background: #fff;
    width: 100%;
    max-width: 440px;
    border-radius: 40px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.rbn-modal-body {
    padding: 3rem 2.5rem;
    text-align: center;
}

.rbn-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
}

.is-success .rbn-modal-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--rbn-success);
}

.is-error .rbn-modal-icon {
    background: rgba(244, 63, 94, 0.1);
    color: var(--rbn-error);
}

.is-question .rbn-modal-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--rbn-info);
}

.rbn-modal-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--rbn-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.rbn-modal-text {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 500;
}

.rbn-modal-footer {
    display: flex;
    gap: 1rem;
}

.rbn-modal-btn {
    border: 0;
    border-radius: 100px;
    padding: 0.9rem 1.5rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    flex: 1;
}

.rbn-modal-btn.is-confirm {
    background: var(--rbn-dark);
    color: #fff;
}

.rbn-modal-btn.is-danger {
    background: var(--rbn-error);
    color: #fff;
}

.rbn-modal-btn.is-cancel {
    background: #f1f5f9;
    color: #64748b;
}

/* ============================================================
   4. ANIMATIONS & SPINNERS
   ============================================================ */

.rbn-spinner-mini {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rbnSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes rbnShimmerFlow {
    0% {
        transform: translateX(-30%) translateY(-30%);
    }

    100% {
        transform: translateX(30%) translateY(30%);
    }
}

@keyframes rbnSpin {
    to {
        transform: rotate(360deg);
    }
}

.rbn-fade-in {
    animation: rbnFadeIn 0.4s ease forwards;
}

.rbn-fade-out {
    animation: rbnFadeOut 0.3s ease forwards;
    pointer-events: none;
}

.rbn-scale-in {
    animation: rbnScaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.rbn-slide-in {
    animation: rbnSlideIn 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.rbn-slide-out {
    animation: rbnSlideOut 0.4s ease-in forwards;
}

@keyframes rbnFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes rbnFadeOut {
    to {
        opacity: 0;
    }
}

@keyframes rbnScaleIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rbnSlideIn {
    from {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes rbnSlideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.shake {
    animation: rbnShake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes rbnShake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* ============================================================
   5. UTILS (Loading Card)
   ============================================================ */

.rbn-loading-card {
    background: #fff;
    padding: 3rem;
    border-radius: 40px;
    text-align: center;
    box-shadow: var(--rbn-shadow);
}

.rbn-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f1f5f9;
    border-top-color: var(--rbn-dark);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: rbnSpin 1s linear infinite;
}

.rbn-loading-text {
    font-weight: 800;
    color: var(--rbn-dark);
    font-size: 1.1rem;
}

/* ============================================================
   6. STANDARD ALERT SUPPORT (Legacy / Inline)
   ============================================================ */
.alert {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    margin-bottom: var(--space-4);
    font-weight: 500;
}

.alert-primary {
    background: var(--theme-50);
    border-color: var(--theme-500);
    color: var(--theme-800);
}

.alert-success {
    background: hsl(var(--success) / 0.1);
    border-color: hsl(var(--success));
    color: hsl(var(--success));
}

.alert-warning {
    background: hsl(var(--warning) / 0.1);
    border-color: hsl(var(--warning));
    color: hsl(var(--warning));
}

.alert-danger {
    background: hsl(var(--danger) / 0.1);
    border-color: hsl(var(--danger));
    color: hsl(var(--danger));
}