/* =====================================
AstronovAI Floating Compare Launcher
Loaded only on pages where tool cards can be compared.
===================================== */

#go-compare.ai-floating-compare-btn,
.ai-floating-compare-btn{
    position:fixed!important;
    right:24px!important;
    bottom:24px!important;
    z-index:99999!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:10px!important;
    min-width:154px!important;
    min-height:56px!important;
    padding:0 20px!important;
    border:1px solid rgba(255,255,255,.16)!important;
    border-radius:999px!important;
    background:linear-gradient(135deg,#0f172a,#020617)!important;
    color:#fff!important;
    font-size:14px!important;
    line-height:1!important;
    font-weight:950!important;
    letter-spacing:-.01em!important;
    cursor:pointer!important;
    box-shadow:0 18px 42px rgba(15,23,42,.28),0 0 0 8px rgba(99,91,255,.06)!important;
    text-decoration:none!important;
    transform:translateY(0)!important;
    transition:transform .18s ease,box-shadow .18s ease,background .18s ease!important;
}

#go-compare.ai-floating-compare-btn:hover,
.ai-floating-compare-btn:hover{
    transform:translateY(-2px)!important;
    box-shadow:0 24px 54px rgba(15,23,42,.34),0 0 0 9px rgba(99,91,255,.10)!important;
}

#go-compare.ai-floating-compare-btn .compare-count,
.ai-floating-compare-btn .compare-count{
    min-width:26px!important;
    height:26px!important;
    padding:0 8px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.12)!important;
    color:#fff!important;
    font-size:12px!important;
    font-weight:950!important;
}

#go-compare.ai-floating-compare-btn.active,
.ai-floating-compare-btn.active{
    background:linear-gradient(135deg,#4f46e5,#6d5dfc)!important;
}

#go-compare.ai-floating-compare-btn.ready,
.ai-floating-compare-btn.ready{
    background:linear-gradient(135deg,#0f172a,#111827 52%,#4f46e5)!important;
}

#compare-preview-bar.ai-floating-compare-preview,
.ai-floating-compare-preview{
    position:fixed!important;
    right:24px!important;
    bottom:92px!important;
    z-index:99998!important;
    display:none!important;
    flex-direction:column!important;
    align-items:flex-end!important;
    gap:10px!important;
    opacity:0!important;
    visibility:hidden!important;
    transform:translateY(10px)!important;
    transition:opacity .18s ease,visibility .18s ease,transform .18s ease!important;
}

#compare-preview-bar.ai-floating-compare-preview.active,
.ai-floating-compare-preview.active{
    display:flex!important;
    opacity:1!important;
    visibility:visible!important;
    transform:translateY(0)!important;
}

.ai-floating-compare-preview .compare-preview-items{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-end!important;
    gap:10px!important;
}

.ai-floating-compare-preview .compare-preview-item{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    min-height:44px!important;
    max-width:260px!important;
    padding:7px 10px!important;
    border:1px solid rgba(15,23,42,.08)!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.96)!important;
    box-shadow:0 12px 30px rgba(15,23,42,.12)!important;
    backdrop-filter:blur(12px)!important;
}

.ai-floating-compare-preview .compare-preview-item img{
    width:28px!important;
    height:28px!important;
    flex:0 0 28px!important;
    object-fit:cover!important;
    border-radius:999px!important;
    background:#f8fafc!important;
    border:1px solid rgba(15,23,42,.06)!important;
}

.ai-floating-compare-preview .compare-preview-item span{
    max-width:150px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    color:#0f172a!important;
    font-size:12px!important;
    font-weight:900!important;
}

.ai-floating-compare-preview .remove-compare{
    width:22px!important;
    height:22px!important;
    flex:0 0 22px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:0!important;
    border-radius:999px!important;
    background:#f1f5f9!important;
    color:#0f172a!important;
    cursor:pointer!important;
    font-size:11px!important;
    font-weight:950!important;
    line-height:1!important;
}

.ai-floating-compare-preview .remove-compare:hover{
    background:#fee2e2!important;
    color:#991b1b!important;
}

.ai-compare-notice{
    position:fixed!important;
    right:24px!important;
    bottom:158px!important;
    z-index:100000!important;
    max-width:min(320px,calc(100vw - 32px))!important;
    padding:14px 16px!important;
    border:1px solid rgba(15,23,42,.08)!important;
    border-radius:18px!important;
    background:#0f172a!important;
    color:#fff!important;
    box-shadow:0 18px 42px rgba(15,23,42,.22)!important;
    font-size:13px!important;
    line-height:1.45!important;
    font-weight:850!important;
    opacity:0!important;
    visibility:hidden!important;
    transform:translateY(8px)!important;
    transition:opacity .18s ease,visibility .18s ease,transform .18s ease!important;
}

.ai-compare-notice.active{
    opacity:1!important;
    visibility:visible!important;
    transform:translateY(0)!important;
}

@media(max-width:782px){
    #go-compare.ai-floating-compare-btn,
    .ai-floating-compare-btn{
        right:14px!important;
        bottom:14px!important;
        min-width:140px!important;
        min-height:52px!important;
        padding:0 16px!important;
        font-size:13px!important;
    }

    #compare-preview-bar.ai-floating-compare-preview,
    .ai-floating-compare-preview{
        right:14px!important;
        bottom:78px!important;
    }

    .ai-compare-notice{
        right:14px!important;
        bottom:140px!important;
    }
}
