/* /connect landing — light, Google-style entry.
 *
 * One value-prop line, one search box (the only real interaction), and a quiet
 * row of illustrative surface icons below. Visual language matches the rest of
 * /connect — eve-surface background, electric accent (#50FB60), line/line2
 * borders, brand type (Barlow Condensed headings / Source Sans 3 body, set in
 * landing.css). The search box itself is styled with Tailwind utilities in
 * landing.html; this file owns the lighter hero, the example-prompt chips, and
 * the surface-icon row.
 */

/* ── Left-aligned brand hero (mirrors platform.ev.energy) ──
 * Anatomy: tag → headline → body. The Barlow face + uppercase come from the
 * global connect heading rule (landing.css); here we set alignment, the
 * landing's own size/leading/tracking (tuned to the live site: leading ~0.92,
 * tracking ~0.01em), and the tag/body styles. (0,2,1) out-specifies the
 * connect-wide h2 rule and the `body.connect-body *` body rule. */
/* Widen the shared layout column (default max-w 560px) so the two-column hero
   has room; (0,1,2) beats the Tailwind max-w utility. */
body.connect-hero-wide main > div {
    max-width: 1040px;
}

/* On the wide two-column entry pages, the shared icon row left-aligns so it
   tucks under the left hero (instead of centering mid-page). */
body.connect-hero-wide .connect-app-icons-wrap {
    justify-content: flex-start;
}
body.connect-hero-wide .connect-app-icons {
    align-items: flex-start;
}

/* Two-column hero: copy + search (left) · Eve-in-action card (right). Stacks to
   one column below 900px, with the card dropping under the copy. */
body.connect-hero-wide .connect-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.75rem;
    align-items: center;
    text-align: left;
}
/* Grid items default to min-width:auto, so a nowrap child (the referral link
   box) would size the track to the full URL and push the page past the viewport.
   Letting both columns shrink keeps the QR pair and links inside a phone. */
body.connect-hero-wide .connect-hero-copy,
body.connect-hero-wide .connect-hero-card {
    min-width: 0;
}
/* chat.js adds `.hidden` to #introHero (the grid) on the first message — this
   must beat the grid `display:grid` above (Tailwind's `.hidden` alone loses on
   specificity), or the intro hero would never fade out. */
body.connect-hero-wide .connect-hero-grid.hidden {
    display: none;
}
body.connect-hero-wide .connect-hero-copy .connect-ask {
    margin-top: 1.6rem;
}
@media (max-width: 900px) {
    body.connect-hero-wide .connect-hero-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
    body.connect-hero-wide .connect-hero-card {
        order: 2;
    }
}

body.connect-hero-wide .connect-landing-tag {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #50FB60;
    font-size: 0.9rem;
    margin: 0 0 0.65rem;
}
body.connect-hero-wide .connect-landing-headline {
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    line-height: 0.92;
    letter-spacing: 0.01em;
    color: #fff;
    margin: 0;
}
body.connect-hero-wide .connect-landing-sub {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.45;
    color: #a7b4b8;
    max-width: 30rem;
    margin: 0.9rem 0 0;
}
body.connect-hero-wide .connect-landing-sub strong {
    color: #fff;
    font-weight: 600;
}
/* Voice's subtext is a touch longer; let it fill the left column so it lands on
   two lines rather than three. */
body.connect-voice-body .connect-landing-sub {
    max-width: 33rem;
}

/* ── "Eve in action" card (right column) ──
 * A recreated chat exchange — brand-compliant interface graphic (no stock
 * imagery) over the brand dot-grid texture. Decorative; the real interaction
 * is the search box on the left. */
.connect-hero-card {
    position: relative;
    overflow: hidden;
    background: #11353a;
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    border-radius: 16px;
    padding: 1.4rem;
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
}
/* Brand dot-grid: pure CSS, 1px dots on a 32px grid at 7% white. */
.connect-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}
.connect-hero-card > * {
    position: relative;
    z-index: 1;
}
.connect-hero-card__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
}
.connect-hero-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #50FB60;
    box-shadow: 0 0 10px rgba(80, 251, 96, 0.7);
}
/* Voice page: the delivery dropdown sits to the right of the card head. */
.connect-hero-card__head .connect-voice-delivery {
    margin-left: auto;
}
.connect-hero-card__msg {
    font-size: 0.92rem;
    line-height: 1.45;
    border-radius: 13px;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.6rem;
    max-width: 92%;
}
.connect-hero-card__msg--you {
    margin-left: auto;
    background: #163e44;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.connect-hero-card__msg--eve {
    background: rgba(80, 251, 96, 0.1);
    border: 1px solid rgba(80, 251, 96, 0.25);
    color: #e7f0e9;
    border-bottom-left-radius: 4px;
    margin-bottom: 0;
}
.connect-hero-card__msg--eve strong {
    color: #50FB60;
    font-weight: 700;
}

/* ── Account: big referral QR (RHS) + share actions + Plug-Eve-in pull-in ── */
.connect-qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.connect-qr-tile {
    background: #fff;
    border: 2px solid hsla(0, 0%, 100%, 0.16);
    border-radius: 16px;
    padding: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.connect-qr-tile:hover,
.connect-qr-tile:focus-visible {
    border-color: #50FB60;
    box-shadow: 0 4px 18px rgba(80, 251, 96, 0.25);
    outline: none;
}
.connect-qr-caption {
    color: #a7b4b8;
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
}

.connect-qr-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    min-width: 0;
}
/* Kept as a paired override even though nothing ships this class hidden today:
   `.connect-qr-figure` sets `display`, surfaces.css loads after app.css, and both
   selectors are one class, so a future hidden use would lose the cascade to the
   rule above. Pinned by test_hidden_beats_display_in_connect_css.py. */
.connect-qr-figure.hidden {
    display: none;
}
.connect-qr-img {
    display: block;
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1 / 1;
}
.connect-share-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 30rem;
    margin-top: 1.5rem;
}

/* The two referral entry vectors (connect flow / web flow) on the account
   hero. Two equal tiles side by side so neither reads as the "real" one —
   they carry the same code and convert identically. Stacks on narrow. */
/* One copyable link box per entry vector, stacked. Each row is caption + the
   box/button pair. The `.hidden` override is MANDATORY alongside `display`
   here — surfaces.css loads after app.css and both selectors are one class, so
   a bare Tailwind `.hidden` loses the cascade and the row would ship visible
   with an empty box. Enforced by
   tests/unit/connect/test_hidden_beats_display_in_connect_css.py. */
.connect-copy-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.connect-copy-row.hidden {
    display: none;
}
.connect-copy-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #a7b4b8;
}
.connect-copy-label.hidden {
    display: none;
}

/* Plug Eve in — collapsible pull-in below the share hero (open by default). */
.connect-plug {
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    background: rgba(17, 53, 58, 0.6);
    border-radius: 16px;
    padding: 0 1.25rem 1.25rem;
}
.connect-plug__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0 0.85rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #fff;
}
body.connect-body .connect-plug__title {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 1.1rem;
}
.connect-plug__chevron {
    color: #a7b4b8;
    transition: transform 0.15s ease;
}
.connect-plug__head[aria-expanded="false"] .connect-plug__chevron {
    transform: rotate(-90deg);
}


/* ── Search box sizing ──
 * The box's layout/colour comes from Tailwind utilities in landing.html, but a
 * few size tweaks (pl-3/pr-1.5/px-1/text-[1.05rem]/w-12) aren't in the prebuilt
 * app.css bundle and would purge to no-ops. Pin them here so the box renders as
 * intended without a Tailwind rebuild. */
.connect-ask {
    padding-left: 0.75rem;
    padding-right: 0.375rem;
}

.connect-ask input {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    font-size: 1.05rem;
}

.connect-ask .connect-cta {
    width: 3rem;
    height: 3rem;
}

/* ── Example-prompt chips under the search box ── */
.connect-hints {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.connect-hint {
    font: inherit;
    font-size: 0.8rem;
    color: #a7b4b8;
    background: transparent;
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    border-radius: 999px;
    padding: 0.42rem 0.85rem;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.connect-hint:hover {
    color: #fff;
    border-color: #50FB60;
}

.connect-hint:focus-visible {
    outline: 2px solid #50FB60;
    outline-offset: 2px;
}


@media (prefers-reduced-motion: reduce) {
    .connect-hint {
        transition: none;
    }
}

/* ---------------------------------------------------------------------------
   Connected apps (/connect/account#connected-apps)

   Every MCP client the driver has approved, with a disconnect per row. One
   plain form per row, no JS — the CSP omits 'unsafe-inline', and a native
   submit cannot drift from the endpoint it posts to.
   --------------------------------------------------------------------------- */

.connect-apps {
    padding: 0 1.5rem 3rem;
}

.connect-apps__inner {
    max-width: 60rem;
    margin: 0 auto;
}

.connect-apps__title {
    font-size: 1.25rem;
    margin: 0 0 0.35rem;
}

.connect-apps__intro,
.connect-apps__empty {
    margin: 0 0 1rem;
    opacity: 0.75;
    font-size: 0.9rem;
}

.connect-apps__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.connect-apps__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(128, 128, 128, 0.28);
    border-radius: 0.6rem;
}

.connect-apps__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    /* Let a long client_id shrink rather than push the button off-screen. */
    min-width: 0;
}

.connect-apps__name {
    font-weight: 600;
}

.connect-apps__id {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    opacity: 0.6;
    overflow-wrap: anywhere;
}

.connect-apps__form {
    margin: 0;
    flex: 0 0 auto;
}

.connect-apps__disconnect {
    cursor: pointer;
    padding: 0.45rem 0.9rem;
    border-radius: 0.45rem;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.85rem;
}

.connect-apps__disconnect:hover,
.connect-apps__disconnect:focus-visible {
    background: rgba(200, 60, 60, 0.12);
    border-color: rgb(200, 60, 60);
    color: rgb(200, 60, 60);
}

@media (max-width: 30rem) {
    .connect-apps__item {
        flex-direction: column;
        align-items: stretch;
    }

    .connect-apps__disconnect {
        width: 100%;
    }
}
