/* ═══════════════════════════════════════════════════════════════
   Ezzy v2 — Unified fullscreen takeover + floating pill.
   Relies on ezzy-avatar.css for the avatar itself.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --ez-teal-1:   #5eead4;
    --ez-teal-2:   #14b8a6;
    --ez-teal-3:   #0d9488;
    --ez-cyan-1:   #67e8f9;
    --ez-cyan-2:   #22d3ee;
    --ez-magenta:  #d946ef;
    --ez-ink:      #0f172a;
    --ez-ink-soft: #334155;
    --ez-mute:     #64748b;
    --ez-border:   rgba(148, 163, 184, 0.2);
    --ez-z-pill:   9500;
    --ez-z-takeover: 9999;
    --ez-fade:     0.5s;
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE CHAT INVITE — compact section, lives below the hero.
   3D Ezzy lives here when the takeover is closed.
   ═══════════════════════════════════════════════════════════════ */
.ezzy-chat-invite {
    position: relative;
    padding: 80px 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(251, 146, 60, 0.10) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(217, 70, 239, 0.10) 0%, transparent 40%),
        linear-gradient(180deg, #0b1324 0%, #131022 50%, #0b1324 100%);
    color: #fef7e8;
    border-top: 1px solid rgba(94, 234, 212, 0.08);
    border-bottom: 1px solid rgba(94, 234, 212, 0.08);
}
.ezzy-chat-invite__grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.9 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 160px 160px;
}

.ezzy-chat-invite__inner {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: center;
}
@media (max-width: 800px) {
    .ezzy-chat-invite { padding: 56px 20px; }
    .ezzy-chat-invite__inner {
        grid-template-columns: 1fr;
        gap: 32px;
        justify-items: center;
        text-align: center;
    }
}

/* Avatar slot — the 3D Ezzy canvas mounts here */
.ezzy-chat-invite__avatar-slot {
    position: relative;
    /* Hard-pinned size so Tailwind JIT or layout race conditions can't
       shrink the slot — was 260px, bumped to 320 desktop / 240 tablet /
       200 mobile so Ezzy reads prominent at every breakpoint. */
    width: 320px;
    height: 320px;
    flex: 0 0 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 1024px) {
    .ezzy-chat-invite__avatar-slot {
        width: 240px;
        height: 240px;
        flex: 0 0 240px;
    }
}
@media (max-width: 640px) {
    .ezzy-chat-invite__avatar-slot {
        width: 200px;
        height: 200px;
        flex: 0 0 200px;
    }
}
/* The 3D canvas injects at 100% within this host — override size-hero's
   fixed 180px so the canvas fills the 260x260 container. */
.ezzy-chat-invite__avatar-slot .ezzy-av--3d.size-hero {
    width: 100% !important;
    height: 100% !important;
}

.ezzy-chat-invite__copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 640px;
}
.ezzy-chat-invite__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(20, 184, 166, 0.15);
    border: 1px solid rgba(94, 234, 212, 0.3);
    border-radius: 999px;
    color: #5eead4;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    width: fit-content;
}
@media (max-width: 800px) { .ezzy-chat-invite__badge { margin: 0 auto; } }

.ezzy-chat-invite__title {
    margin: 0;
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fef7e8;
}
.ezzy-chat-invite__title span {
    background: linear-gradient(135deg, #5eead4 0%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.ezzy-chat-invite__subtitle {
    margin: 0;
    color: rgba(254, 247, 232, 0.7);
    font-size: 15.5px;
    line-height: 1.65;
}

/* Chat input row */
.ezzy-chat-invite__form {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    width: 100%;
    max-width: 560px;
}
@media (max-width: 800px) { .ezzy-chat-invite__form { margin-left: auto; margin-right: auto; } }

.ezzy-chat-invite__input {
    flex: 1;
    border: 1px solid rgba(94, 234, 212, 0.3);
    background: rgba(8, 13, 24, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fef7e8;
    padding: 14px 20px;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.ezzy-chat-invite__input::placeholder { color: rgba(254, 247, 232, 0.45); }
.ezzy-chat-invite__input:focus {
    border-color: #5eead4;
    background: rgba(8, 13, 24, 0.85);
    box-shadow:
        0 0 0 4px rgba(94, 234, 212, 0.1),
        inset 0 0 20px rgba(94, 234, 212, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

.ezzy-chat-invite__send {
    appearance: none;
    border: none;
    background: linear-gradient(135deg, #14b8a6 0%, #22d3ee 100%);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
    box-shadow:
        0 6px 20px rgba(20, 184, 166, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.2);
}
.ezzy-chat-invite__send:hover { transform: scale(1.06); box-shadow: 0 10px 30px rgba(20, 184, 166, 0.5), inset 0 1px 0 rgba(255,255,255,0.3); }
.ezzy-chat-invite__send svg { width: 20px; height: 20px; }

/* Suggestion chips under the input */
.ezzy-chat-invite__chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
@media (max-width: 800px) { .ezzy-chat-invite__chips { justify-content: center; } }

.ezzy-chat-invite__chip {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(254, 247, 232, 0.85);
    padding: 7px 14px;
    border-radius: 999px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.ezzy-chat-invite__chip:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: #5eead4;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(20, 184, 166, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   FULLSCREEN TAKEOVER
   Always mounted. Smoothly fades in/out via opacity + visibility.
   Used for both the homepage auto-morph and pill-click expansion.
   ═══════════════════════════════════════════════════════════════ */
.ezzy-v2-hero {
    position: fixed;
    inset: 0;
    z-index: var(--ez-z-takeover);
    display: flex;                /* always in layout; hidden via opacity */
    flex-direction: column;
    padding: 40px 20px 28px;
    /* Frosted glass (iOS style) */
    background: rgba(8, 15, 31, 0.62);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity var(--ez-fade) ease,
        visibility 0s linear var(--ez-fade),
        backdrop-filter var(--ez-fade) ease,
        -webkit-backdrop-filter var(--ez-fade) ease,
        background var(--ez-fade) ease;
}
.ezzy-v2-hero.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* On-brand base — deep slate-navy gradient matching the site's
       slate-900/950 palette. Cool, professional, evening-not-midnight.
       Top is slightly lifted (slate-800-ish) for atmosphere. */
    background:
        linear-gradient(
            180deg,
            #0f172a 0%,    /* slate-900 — site primary dark */
            #0a1124 30%,
            #060c1c 65%,
            #030714 100%   /* near-black at floor */
        );
    transition:
        opacity var(--ez-fade) ease,
        visibility 0s linear 0s,
        backdrop-filter var(--ez-fade) ease,
        -webkit-backdrop-filter var(--ez-fade) ease,
        background var(--ez-fade) ease;
}

/* On-brand light wash: teal key + cyan rim (the site's primary palette),
   with a magenta echo only behind Ezzy because that's where her wire-mesh
   sits. Floor uses cyan to stage chips + input on-brand. */
.ezzy-v2-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        /* CYAN KEY LIGHT — Ezzy's primary colour, upper-left dominant */
        radial-gradient(ellipse 80% 65% at 12% 8%,  rgba(34, 211, 238, 0.16) 0%, transparent 60%),
        /* MAGENTA RIM LIGHT — Ezzy's secondary, upper-right */
        radial-gradient(ellipse 60% 55% at 92% 12%, rgba(217, 70, 239, 0.14) 0%, transparent 60%),
        /* AVATAR SPOTLIGHT — soft cyan-leaning halo where Ezzy sits */
        radial-gradient(ellipse 50% 40% at 50% 18%, rgba(34, 211, 238, 0.10) 0%, transparent 65%),
        /* FLOOR GLOW — magenta on the left, cyan on the right, splits
           her colour across the bottom edge so chips/input sit on it */
        radial-gradient(ellipse 55% 30% at 25% 105%, rgba(217, 70, 239, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 55% 30% at 75% 105%, rgba(34, 211, 238, 0.10) 0%, transparent 60%),
        /* SIDE FILL — left magenta, right cyan (mirror of the floor) */
        radial-gradient(ellipse 45% 70% at 0% 55%, rgba(217, 70, 239, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 45% 70% at 100% 55%, rgba(34, 211, 238, 0.07) 0%, transparent 65%);
    z-index: 0;
}

/* Behind-Ezzy halo — tight cyan-magenta glow matching her wire mesh
   colours so the avatar reads as the source of its own light. */
.ezzy-v2-hero__stars::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        circle 280px at 50% 14%,
        rgba(34, 211, 238, 0.14) 0%,    /* cyan inner — Ezzy's primary */
        rgba(217, 70, 239, 0.08) 50%,   /* magenta mid — her secondary */
        transparent 78%
    );
    mix-blend-mode: screen;
}

/* Slow breathing aurora — teal/cyan colour pools drift through the mid
   space. Magenta kept tiny (just one small pool) so it's an accent not
   a theme. ~60-second cycle. */
.ezzy-v2-hero__stars::after {
    content: '';
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(ellipse 50% 45% at 28% 55%, rgba(34, 211, 238, 0.16)  0%, transparent 65%),
        radial-gradient(ellipse 50% 45% at 72% 50%, rgba(217, 70, 239, 0.14)  0%, transparent 65%),
        radial-gradient(ellipse 40% 40% at 50% 75%, rgba(34, 211, 238, 0.10)  0%, transparent 65%),
        radial-gradient(ellipse 40% 40% at 50% 25%, rgba(217, 70, 239, 0.10)  0%, transparent 65%);
    filter: blur(72px);
    animation: ezv2-aurora 60s ease-in-out infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}
@keyframes ezv2-aurora {
    0%, 100% { transform: translate(0, 0) scale(1);       opacity: 0.95; }
    25%      { transform: translate(3%, -2%) scale(1.04); opacity: 1;    }
    50%      { transform: translate(-2%, 3%) scale(0.98); opacity: 0.92; }
    75%      { transform: translate(-3%, -3%) scale(1.06); opacity: 0.98;}
}

/* Cool vignette — slate-navy corner shading instead of warm plum. */
.ezzy-v2-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse 95% 90% at center,
        transparent 50%,
        rgba(3, 7, 20, 0.65) 100%   /* deeper corner shadow */
    );
    z-index: 0;
}

/* Subtle grain layer — warm film-noise texture that kills the plasticky
   feel of flat dark areas. Static, no motion, barely perceptible. */
.ezzy-v2-hero__stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7 0 0 0 0 0.85 0 0 0 0 1 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 180px 180px;
}

/* Keep the inner column above the atmospheric layers */
.ezzy-v2-hero__close,
.ezzy-v2-hero__inner {
    position: relative;
    z-index: 2;
}

@media (max-width: 640px) {
    .ezzy-v2-hero { padding: 28px 16px 20px; }
}

/* Original hero content fades & recedes when Ezzy is active */
body.ezzy-v2-takeover .hero-content {
    opacity: 0.12;
    transform: scale(0.98);
    pointer-events: none;
    transition: opacity var(--ez-fade) ease, transform var(--ez-fade) ease;
}
body.ezzy-v2-takeover .hero-scroll { opacity: 0; pointer-events: none; transition: opacity var(--ez-fade) ease; }
body.ezzy-v2-takeover .hero-text-overlay { opacity: 0.3; transition: opacity var(--ez-fade) ease; }

/* Close button (top-right) */
.ezzy-v2-hero__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(241, 245, 249, 0.85);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
    z-index: 5;
}
.ezzy-v2-hero__close:hover {
    background: rgba(20, 184, 166, 0.2);
    color: #fff;
    border-color: var(--ez-teal-1);
    transform: scale(1.05);
}
.ezzy-v2-hero__close svg { width: 18px; height: 18px; }

/* Inner column — grows with conversation */
.ezzy-v2-hero__inner {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    justify-content: center;          /* centered when conversation empty */
    min-height: 0;                    /* allow child overflow */
    transition: justify-content 0.4s ease;
}

/* Once a conversation exists: avatar stays prominent at the top, conversation
   flows BELOW it with a stronger top fade so older messages dissolve into
   Ezzy as they scroll up. */
.ezzy-v2-hero.has-conversation .ezzy-v2-hero__inner {
    justify-content: flex-start;
    gap: 14px;
    padding-top: 10px;
}
.ezzy-v2-hero.has-conversation .ezzy-v2-hero__avatar-slot .ezzy-av {
    --ezzy-size: 120px;
    transition: --ezzy-size 0.4s ease;
}
.ezzy-v2-hero.has-conversation .ezzy-v2-hero__greeting,
.ezzy-v2-hero.has-conversation .ezzy-v2-hero__message {
    display: none;
}

/* Avatar slot */
.ezzy-v2-hero__avatar-slot {
    display: flex;
    justify-content: center;
    transition: transform 0.3s ease;
}
.ezzy-v2-hero__avatar-slot .ezzy-av {
    --ezzy-size: 140px;
}

/* Greeting + initial question */
.ezzy-v2-hero__greeting {
    /* Warm cream white instead of cold hex white — feels softer, less clinical */
    color: #fef7e8;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.01em;
    text-align: center;
    text-shadow: 0 2px 20px rgba(15, 23, 42, 0.4);
    opacity: 0;
    transform: translateY(12px);
    animation: ez-slideup 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}
@media (max-width: 640px) { .ezzy-v2-hero__greeting { font-size: 22px; } }

.ezzy-v2-hero__message {
    color: rgba(254, 247, 232, 0.88);   /* cream, matching greeting */
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
    max-width: 480px;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    animation: ez-slideup 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

/* Conversation area — hidden until messages exist. Generous top-fade so
   older messages gently dissolve into Ezzy's avatar as they scroll up. */
.ezzy-v2-hero__conversation {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px 4px;
    /* Tight top-fade — only the very top edge dissolves into Ezzy.
       Was 32% — that hid the first message when there were only 1-3
       messages on screen. Now ~8% so the first reply is fully readable. */
    mask-image: linear-gradient(180deg,
        rgba(0,0,0,0.6) 0%,
        #000 8%,
        #000 calc(100% - 14px),
        transparent 100%);
    -webkit-mask-image: linear-gradient(180deg,
        rgba(0,0,0,0.6) 0%,
        #000 8%,
        #000 calc(100% - 14px),
        transparent 100%);
}
.ezzy-v2-hero.has-conversation .ezzy-v2-hero__conversation {
    display: flex;
}

/* Message row — flex container so the avatar can sit beside the bubble */
.ezzy-v2-msg {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: 88%;
    animation: ez-msg-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.ezzy-v2-msg--bot  { align-self: flex-start; }
.ezzy-v2-msg--user { align-self: flex-end; margin-left: auto; flex-direction: row-reverse; }

/* Inline avatars removed — the big Ezzy at the top represents her. Bot
   messages now sit flush-left without any indent. */
.ezzy-v2-msg__avatar { display: none; }

.ezzy-v2-msg__bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.ezzy-v2-msg--bot .ezzy-v2-msg__bubble {
    /* Warmer bubble tint — less blue, more "paper at dusk" */
    background: rgba(24, 18, 34, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fef7e8;     /* cream text instead of cool slate */
    border: 1px solid rgba(94, 234, 212, 0.26);
    /* Soft teal ambient glow + warm inner highlight for depth */
    box-shadow:
        0 4px 22px rgba(20, 184, 166, 0.12),
        inset 0 1px 0 rgba(255, 236, 195, 0.06);
    border-radius: 20px;
    border-bottom-left-radius: 6px;
}
.ezzy-v2-msg--user .ezzy-v2-msg__bubble {
    background: linear-gradient(135deg, var(--ez-teal-2) 0%, var(--ez-cyan-2) 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow:
        0 6px 22px rgba(20, 184, 166, 0.35),
        0 0 0 1px rgba(94, 234, 212, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
@keyframes ez-msg-in {
    0%   { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Avatar stays visible in conversation mode — it's the focal point */

/* Typing indicator lives inside a message row so the avatar sits beside it */
.ezzy-v2-typing {
    display: inline-flex;
    gap: 4px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(94, 234, 212, 0.22);
    padding: 13px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}
.ezzy-v2-typing span {
    width: 6px; height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: ez-typing 1.2s ease-in-out infinite;
}
.ezzy-v2-typing span:nth-child(2) { animation-delay: 0.15s; }
.ezzy-v2-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ez-typing {
    0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
    40%           { opacity: 1;   transform: translateY(-3px); }
}

/* Chip list */
.ezzy-v2-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 560px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    opacity: 0;
    transform: translateY(10px);
    animation: ez-slideup 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}
.ezzy-v2-hero.has-conversation .ezzy-v2-chips {
    /* Already visible, no entry animation on subsequent renders */
    animation: none;
    opacity: 1;
    transform: none;
}
.ezzy-v2-chip {
    appearance: none;
    border: 1px solid rgba(94, 234, 212, 0.45);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f0fdfa;
    padding: 10px 18px;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.22s ease, border-color 0.22s ease,
                color 0.22s ease, transform 0.22s cubic-bezier(0.22,1,0.36,1),
                box-shadow 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* Subtle always-on inner highlight — tactile "glass" feel */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
                inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.ezzy-v2-chip:hover {
    background: rgba(20, 184, 166, 0.28);
    border-color: var(--ez-teal-1);
    color: #fff;
    transform: translateY(-1px);
    /* Outer glow + inner lift — feels like it's picking up light */
    box-shadow:
        0 6px 24px rgba(20, 184, 166, 0.35),
        0 0 0 4px rgba(94, 234, 212, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 0 18px rgba(94, 234, 212, 0.15);
}
.ezzy-v2-chip:active {
    transform: translateY(0);
    box-shadow:
        0 2px 10px rgba(20, 184, 166, 0.25),
        inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Input row */
.ezzy-v2-input-row {
    display: flex;
    gap: 8px;
    max-width: 560px;
    width: 100%;
    margin-top: 4px;
    opacity: 0;
    transform: translateY(10px);
    animation: ez-slideup 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}
.ezzy-v2-hero.has-conversation .ezzy-v2-input-row {
    animation: none;
    opacity: 1;
    transform: none;
    margin-top: 0;
}
.ezzy-v2-input {
    flex: 1;
    border: 1px solid rgba(94, 234, 212, 0.35);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f0fdfa;
    padding: 13px 18px;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.22s, background 0.22s, box-shadow 0.22s;
}
.ezzy-v2-input::placeholder { color: rgba(241, 245, 249, 0.55); }
.ezzy-v2-input:focus {
    border-color: var(--ez-teal-1);
    background: rgba(15, 23, 42, 0.75);
    /* Inner glow + focus ring */
    box-shadow:
        0 0 0 4px rgba(94, 234, 212, 0.1),
        inset 0 0 24px rgba(94, 234, 212, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ezzy-v2-input:disabled { opacity: 0.5; cursor: not-allowed; }
.ezzy-v2-send {
    appearance: none;
    border: none;
    background: linear-gradient(135deg, var(--ez-teal-2) 0%, var(--ez-cyan-2) 100%);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}
.ezzy-v2-send:hover { transform: scale(1.06); box-shadow: 0 8px 24px rgba(20, 184, 166, 0.5); }
.ezzy-v2-send:disabled { opacity: 0.5; cursor: not-allowed; }
.ezzy-v2-send svg { width: 20px; height: 20px; }

/* Explore website button */
.ezzy-v2-explore {
    appearance: none;
    border: none;
    background: transparent;
    color: rgba(241, 245, 249, 0.65);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s, background 0.15s;
    margin-top: 4px;
    opacity: 0;
    animation: ez-slideup 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards;
}
.ezzy-v2-hero.has-conversation .ezzy-v2-explore {
    animation: none;
    opacity: 0.65;
    transform: none;
    margin-top: 0;
}
.ezzy-v2-explore:hover { color: #f0fdfa; background: rgba(148, 163, 184, 0.1); opacity: 1; }
.ezzy-v2-explore svg { width: 14px; height: 14px; }

@keyframes ez-slideup {
    to { opacity: 1; transform: translateY(0); }
}

/* Completion state */
.ezzy-v2-complete {
    text-align: center;
    padding: 24px 20px;
    color: #fff;
    align-self: center;
}
.ezzy-v2-complete h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.ezzy-v2-complete p {
    margin: 0 auto;
    color: rgba(241, 245, 249, 0.75);
    font-size: 14.5px;
    line-height: 1.55;
    max-width: 420px;
}

/* ═══════════════════════════════════════════════════════════════
   PERSONAL PILL — floating big Ezzy in the corner, with a detachable
   speech-bubble popup that appears ABOVE her when she has something
   to show (peek messages, last reply, etc.)
   ═══════════════════════════════════════════════════════════════ */
.ezzy-v2-pill {
    position: fixed;
    bottom: calc(18px + env(safe-area-inset-bottom));
    right: 18px;
    width: 104px;
    height: 104px;
    z-index: var(--ez-z-pill);
    display: none;
    animation: ez-pill-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.ezzy-v2-pill.is-visible { display: block; }
@keyframes ez-pill-in {
    0%   { opacity: 0; transform: translateY(20px) scale(0.92); }
    100% { opacity: 1; transform: translateY(0)    scale(1); }
}

/* The orb — fills the pill box, no frame */
.ezzy-v2-pill__avatar {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 14px 30px rgba(20, 184, 166, 0.25));
}
.ezzy-v2-pill__avatar:hover { transform: translateY(-3px) scale(1.04); }
.ezzy-v2-pill__avatar:active { transform: translateY(-1px) scale(1.01); }

/* Dismiss-entirely button — small × that appears on hover, sits on the avatar */
.ezzy-v2-pill__dismiss {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1e293b;
    border: 1px solid rgba(94, 234, 212, 0.3);
    color: #94a3b8;
    font-size: 13px;
    line-height: 0;
    font-weight: 600;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    z-index: 2;
}
.ezzy-v2-pill:hover .ezzy-v2-pill__dismiss { display: inline-flex; }
.ezzy-v2-pill__dismiss:hover { color: #f1f5f9; border-color: #5eead4; background: #0f172a; }

.ezzy-v2-pill__avatar .ezzy-av {
    --ezzy-size: 104px;
    width: 100%;
    height: 100%;
}

/* Speech-bubble popup — absolutely positioned ABOVE the orb with clear
   spacing. Right edge aligns with orb right edge; grows leftward. Tail
   points down at the centre of the orb. Visibility toggle avoids overlap. */
.ezzy-v2-pill__speech {
    position: absolute;
    bottom: calc(100% + 18px);       /* clear vertical gap above the orb */
    right: 0;
    min-width: 200px;
    max-width: 300px;
    width: max-content;
    padding: 12px 36px 12px 16px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(94, 234, 212, 0.25);
    border-radius: 16px;
    color: #e2e8f0;
    font: inherit;
    font-size: 13.5px;
    line-height: 1.5;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 14px 42px rgba(2, 6, 23, 0.5),
                0 2px 6px rgba(2, 6, 23, 0.25),
                0 0 0 3px rgba(20, 184, 166, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    visibility: hidden;
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    transition: opacity 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0.3s;
    white-space: normal;
}
.ezzy-v2-pill__speech.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0s;
}
/* Tail pointing DOWN from the bubble to the centre of the orb below */
.ezzy-v2-pill__speech::after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 44px;   /* roughly centre of 104px orb with 18px offset = 18+52-26 */
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, transparent 50%, #0f172a 50%);
    border-right: 1px solid rgba(94, 234, 212, 0.25);
    border-bottom: 1px solid rgba(94, 234, 212, 0.25);
    transform: rotate(45deg);
}
.ezzy-v2-pill__speech:hover {
    border-color: rgba(94, 234, 212, 0.45);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.6),
                0 0 0 3px rgba(20, 184, 166, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ezzy-v2-pill__speech-text {
    display: block;
    color: #f1f5f9;
    font-weight: 500;
    padding-right: 18px;   /* leave room for close button */
    /* Allow up to 2 lines, then ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ezzy-v2-pill__speech-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5eead4;
    margin-bottom: 3px;
}
.ezzy-v2-pill__speech-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #5eead4;
    border-radius: 50%;
    margin-right: 6px;
    animation: ez-pulse 1.6s ease-in-out infinite;
    vertical-align: 2px;
}
@keyframes ez-pulse {
    0%, 100% { opacity: 1;  transform: scale(1);   box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.55); }
    50%      { opacity: 0.8; transform: scale(1.2); box-shadow: 0 0 0 8px rgba(20, 184, 166, 0); }
}

.ezzy-v2-pill__speech-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    transition: color 0.15s;
}
.ezzy-v2-pill__speech-close:hover { color: #f1f5f9; }

/* When the profile completes, the speech bubble is muted teal */
.ezzy-v2-pill.is-complete .ezzy-v2-pill__speech-label { color: var(--ez-teal-3); }
.ezzy-v2-pill.is-complete .ezzy-v2-pill__speech-label::before { animation: none; background: var(--ez-teal-3); }


/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .ezzy-v2-hero,
    .ezzy-v2-hero *,
    .ezzy-v2-pill,
    .ezzy-v2-pill__dot,
    .ezzy-v2-typing span {
        animation: none !important;
        transition: opacity 0.2s ease !important;
        transform: none !important;
    }
    .ezzy-v2-hero__greeting,
    .ezzy-v2-hero__message,
    .ezzy-v2-chips,
    .ezzy-v2-input-row,
    .ezzy-v2-explore {
        opacity: 1 !important;
    }
}
