/* ========================================================================
   Express Entry Hub - Guide Hand-off (dashboard / guided landing)
   A small note so the guide never silently vanishes when she hands the
   visitor over. On the DASHBOARD / ADMIN PANEL it is a calm arrival note
   (her line + a quieter place line) that dismisses itself; elsewhere it is
   a goodbye that speaks on first interaction.

   ★ PORTED FROM: confidence-talk/public/css/ct-guide-handoff.css
     CT v2026.09.25 · md5 ed0cce01f47efb1c586c85f8a4e0a08a
     Provenance recorded in CLONE_LEDGER.md -> "Pass S-HANDOFF / S-AVATAR".

   ── ★ SELECTORS ARE RENAMED FROM ct-, SPECIFICALLY BECAUSE THIS SHEET IS
      FRONT-END, NOT ADMIN.
   `.clinerules` §2 makes `ct-*` the ADMIN vocabulary. This surface is a
   FRONT-END-ONLY element with no admin counterpart, so `eeh-` is the correct
   prefix per §1 — and a `ct-` id here would be styled by nothing while
   colliding with any future admin rule of the same name.

   ── ★ THE PALETTE IS EEH'S, NOT CT'S
   CT hard-codes a bronze gradient (#2b2013 -> #4a3418, #cd853f border)
   because its brand IS bronze. EEH's guide surface is themed by the
   `eeh_orb_theme` palette, so the note reads the SAME custom properties the
   caption panel does (`--eeh-orb-*`, declared in `public/css/eeh-orb.css`),
   with the bronze literal kept as the FALLBACK so an un-themed page still
   paints correctly rather than transparent. 'Bronze' is one of the ten
   shipped palettes, so on that palette the result is deliberately identical
   to CT's.
   ======================================================================== */

#eeh-guide-handoff.eeh-guide-handoff {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 320px;
    padding: 12px 16px;
    background: var(--eeh-orb-panel, linear-gradient(135deg, #2b2013, #4a3418));
    border: 1px solid var(--eeh-orb-border, rgba(205, 133, 63, 0.55));
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color: var(--eeh-orb-ink, rgba(255, 255, 255, 0.92));
    font-size: 12px;
    line-height: 1.5;
    font-family: inherit;
    cursor: default;
}

/* ---- The note column: her line, then the quieter aside ------------------- */
.eeh-guide-handoff-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Her line — the one thing the visitor must read. */
.eeh-guide-handoff-text {
    flex: 0 0 auto;
}

/* ★ The place line is an ASIDE, not a second demand. Dimmer + smaller so the
   two ideas read as "I'm here" then "(and you are on the dashboard)". They
   used to be one long sentence, which is what made CT's pill a leaflet. */
.eeh-guide-handoff-aside {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1.45;
    color: var(--eeh-orb-dim, rgba(255, 255, 255, 0.62));
}

/* ★ THE CALL TO ACTION. Built by the JS ONLY when the server publishes a
   `ctaUrl`; EEH publishes '' today (see the JS header), so this rule is
   dormant rather than dead — it is what the fix would render into. */
.eeh-guide-handoff-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-height: 36px;
    margin-top: 2px;
    padding: 8px 12px;
    background: rgba(205, 133, 63, 0.18);
    border: 1px solid rgba(205, 133, 63, 0.62);
    border-radius: 10px;
    color: #ffd9a8;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.eeh-guide-handoff-cta:hover,
.eeh-guide-handoff-cta:focus-visible {
    background: rgba(205, 133, 63, 0.32);
    border-color: rgba(205, 133, 63, 0.95);
    color: #fff3e0;
}

/* Dismiss. Kept visually quiet — it is an exit, not an invitation. */
.eeh-guide-handoff-close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: -4px -6px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--eeh-orb-dim, rgba(255, 255, 255, 0.55));
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.eeh-guide-handoff-close:hover,
.eeh-guide-handoff-close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: var(--eeh-orb-ink, #fff);
}

.eeh-guide-handoff-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--eeh-orb-accent, #6b4a1f);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    /* ★ THE AVATAR IS THE ONLY WAY TO MAKE HER SPEAK ON THIS SURFACE, so it is
       a real control, not decoration — hence the pointer. */
    cursor: pointer;
}

#eeh-guide-handoff.eeh-guide-handoff-done {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (max-width: 640px) {
    #eeh-guide-handoff.eeh-guide-handoff {
        right: 12px;
        left: 12px;
        max-width: none;
        /* Clear the dashboard's mobile bottom tab bar and the iPhone home
           indicator, so the note never lands on top of the navigation the
           visitor needs to reach her. */
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        margin-bottom: 56px;
    }

    /* ★ THUMB-FIRST. On a phone the note is read at arm's length, so the dismiss
       gets a real touch target rather than the 24px desktop comfort size — the
       difference between a tap and a mis-tap. */
    #eeh-guide-handoff .eeh-guide-handoff-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    /* The avatar is the "talk to me" target here. On touch there is no hover to
       reveal intent, so it needs to be visibly, physically tappable — 44px. */
    #eeh-guide-handoff .eeh-guide-handoff-avatar {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    #eeh-guide-handoff .eeh-guide-handoff-cta {
        min-height: 44px;
        font-size: 13px;
    }
}

/* ★ KEYBOARD / SHORT LANDSCAPE. The dashboard is the one page with real form
   fields, so the soft keyboard is a normal state here, not an edge case. With
   the viewport at ~420px tall the note would otherwise push its own content out
   of view. Her words outrank the avatar: shrink the avatar, tighten the
   padding. */
@media (max-height: 520px) {
    #eeh-guide-handoff.eeh-guide-handoff {
        padding: 8px 12px;
        max-width: 90vw;
    }

    #eeh-guide-handoff .eeh-guide-handoff-avatar {
        flex: 0 0 28px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    #eeh-guide-handoff .eeh-guide-handoff-aside {
        display: none; /* the aside is optional; her line is not */
    }

    #eeh-guide-handoff .eeh-guide-handoff-cta {
        min-height: 36px;
    }
}
