/* ============================================================
   BOB - shared assistant identity styles
   The RF glass orb: a steel / RF-plum conic rim around a dark glass
   core, matching the Cerberus Bob launcher. `.bob-wave-orb` keeps its
   name so existing callers and sizing rules keep working.
   Colours come from the --bob-orb-* tokens.
   ============================================================ */

.bob-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
}

.bob-btn-orb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}

@property --bob-orb-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 210deg;
}

/* ---- Small still mark (avatars, buttons, chat headers) ---- */

.bob-wave-orb {
    --bob-orb-size: 48px;
    position: relative;
    width: var(--bob-orb-size);
    height: var(--bob-orb-size);
    flex: 0 0 auto;
    border-radius: 50%;
    overflow: visible;
    isolation: isolate;
    background: conic-gradient(
        from var(--bob-orb-angle),
        var(--bob-orb-1),
        var(--bob-orb-2),
        var(--bob-orb-3),
        var(--bob-orb-4),
        var(--bob-orb-5),
        var(--bob-orb-1)
    );
    box-shadow: 0 0 8px rgba(var(--bob-orb-glow-rgb), 0.35);
}

/* Glass core: 3px rim on the 26px header mark, scaled for other sizes. */
.bob-wave-orb::after {
    content: '';
    position: absolute;
    inset: max(2px, calc(var(--bob-orb-size) * 0.115));
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 28%, rgba(var(--ink-rgb), 0.2), transparent 42%),
        radial-gradient(circle at 50% 55%, var(--bob-orb-core) 55%, var(--bg));
    box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), 0.1);
}

/* Thinking: the rim turns (the launcher's spin). Idle holds still, so a
   GPU-less kiosk is not repainting forever. */
.bob-wave-orb[data-bob-mode="thinking"] {
    animation: bob-orb-spin 9s linear infinite;
}

/* ---- Launcher (FAB): blurred halo that turns slowly ---- */

.bob-wave-orb.bob-wave-orb--halo {
    background: transparent;
    box-shadow: none;
}

.bob-wave-orb.bob-wave-orb--halo::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    z-index: -1;
    background: conic-gradient(
        from var(--bob-orb-angle),
        var(--bob-orb-1),
        var(--bob-orb-2),
        var(--bob-orb-3),
        var(--bob-orb-4),
        var(--bob-orb-5),
        var(--bob-orb-1)
    );
    filter: blur(7px);
    animation: bob-orb-spin 9s linear infinite;
}

.bob-wave-orb.bob-wave-orb--halo::after {
    inset: 4px;
    background:
        radial-gradient(circle at 34% 28%, rgba(var(--ink-rgb), 0.18), transparent 40%),
        radial-gradient(circle at 50% 55%, rgba(var(--bob-orb-core-rgb), 0.92) 55%, rgba(var(--bg-rgb), 0.75));
    box-shadow:
        inset 0 0 0 1px rgba(var(--ink-rgb), 0.1),
        inset 0 0 10px rgba(var(--primary-light-rgb), 0.18);
}

@keyframes bob-orb-spin {
    from { --bob-orb-angle: 0deg; }
    to { --bob-orb-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
    .bob-wave-orb,
    .bob-wave-orb.bob-wave-orb--halo::before {
        animation: none !important;
    }
}
