/**
 * Thinking Orbs Stylesheet — SetiAI Platform
 * Inspired by Jakub Antalik Thinking Orbs & Linear/Apple Intelligence aesthetics
 */

.thinking-orb-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    user-select: none;
    flex-shrink: 0;
}

.thinking-orb-canvas {
    display: block;
    pointer-events: none;
    will-change: transform;
}

/* Sizing profiles */
.thinking-orb-sm {
    width: 22px;
    height: 22px;
}

.thinking-orb-md {
    width: 48px;
    height: 48px;
}

.thinking-orb-lg {
    width: 120px;
    height: 120px;
}

.thinking-orb-xl {
    width: 160px;
    height: 160px;
}

/* Ambient Radial Glow */
.thinking-orb-glow {
    position: absolute;
    inset: -20%;
    border-radius: 50%;
    filter: blur(14px);
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.4s ease, background 0.4s ease;
    z-index: 0;
}

.thinking-orb-canvas {
    position: relative;
    z-index: 1;
}

/* Color glow variations */
.thinking-orb-glow.state-listening { background: radial-gradient(circle, rgba(14, 165, 233, 0.7) 0%, transparent 70%); }
.thinking-orb-glow.state-working   { background: radial-gradient(circle, rgba(99, 102, 241, 0.7) 0%, transparent 70%); }
.thinking-orb-glow.state-searching { background: radial-gradient(circle, rgba(6, 182, 212, 0.7) 0%, transparent 70%); }
.thinking-orb-glow.state-solving   { background: radial-gradient(circle, rgba(139, 92, 246, 0.7) 0%, transparent 70%); }
.thinking-orb-glow.state-connecting{ background: radial-gradient(circle, rgba(16, 185, 129, 0.7) 0%, transparent 70%); }
.thinking-orb-glow.state-weaving   { background: radial-gradient(circle, rgba(236, 72, 153, 0.7) 0%, transparent 70%); }
.thinking-orb-glow.state-composing { background: radial-gradient(circle, rgba(59, 130, 246, 0.7) 0%, transparent 70%); }
.thinking-orb-glow.state-breathing { background: radial-gradient(circle, rgba(148, 163, 184, 0.4) 0%, transparent 70%); }
.thinking-orb-glow.state-shaping   { background: radial-gradient(circle, rgba(245, 158, 11, 0.7) 0%, transparent 70%); }

/* Inline Badge Component */
.thinking-orb-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(8px);
    font-size: 0.8125rem;
    font-weight: 500;
    color: #e2e8f0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.thinking-orb-badge:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(15, 23, 42, 0.85);
}

.thinking-orb-label {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* Interactive Bento Showcase Widget */
.thinking-orb-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.75rem;
    border-radius: 1.25rem;
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.thinking-orb-stage {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.thinking-orb-status-display {
    text-align: center;
    margin-bottom: 1.25rem;
}

.thinking-orb-status-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.thinking-orb-status-desc {
    font-size: 0.8125rem;
    color: #94a3b8;
    max-width: 280px;
    line-height: 1.4;
}

.thinking-orb-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: center;
    max-width: 360px;
}

.thinking-orb-pill-btn {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.5);
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.65rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.thinking-orb-pill-btn:hover {
    background: rgba(51, 65, 85, 0.6);
    color: #ffffff;
    border-color: rgba(148, 163, 184, 0.35);
    transform: translateY(-1px);
}

.thinking-orb-pill-btn.active {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* RTL Adjustments */
[dir="rtl"] .thinking-orb-badge {
    flex-direction: row-reverse;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .thinking-orb-glow {
        filter: none;
        opacity: 0.15;
    }
}
