/**
 * Pre-meeting nudge card — "Weekly sync starts in 2 min", Join, Dismiss.
 *
 * Themed only through tokens the base sheet (css/style.css) defines and every theme redefines — --panel-bg,
 * --border, --text-primary, --text-muted, --accent-cta — so dark and light need no per-theme block. Only
 * opacity/transform animate.
 */

.meeting-nudge {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--panel-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    font-size: 0.85rem;
    animation: meeting-nudge-in 160ms ease-out;
}

@keyframes meeting-nudge-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .meeting-nudge { animation: none; }
}

.meeting-nudge-text {
    flex: 1 1 auto;
    min-width: 0;                 /* the title is arbitrary content: let it ellipsize, never widen the card */
}

.meeting-nudge-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meeting-nudge-when {
    margin-top: 2px;
    font-size: 0.75rem;
    /* Primary text, dimmed. --text-muted (~2.6:1) and --text-secondary (~4.1:1) both miss AA on --panel-bg in
       dark at this size; this measures ~8:1 dark and ~6:1 light. */
    color: var(--text-primary);
    opacity: 0.72;
}

.meeting-nudge-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meeting-nudge-join,
.meeting-nudge-notes,
.meeting-nudge-dismiss {
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: opacity 120ms ease;
}

/* Two classes on purpose: `html.light-theme a` (light.css) outranks a single class and would paint the label
   blue on the blue button. */
.meeting-nudge .meeting-nudge-join {
    background: var(--accent-cta);
    color: #fff;                  /* --accent-cta is specified for WHITE text in every theme */
    border: none;
}

/* "Join and take notes" is the primary action when offered; plain Join then steps down to an outline. */
.meeting-nudge .meeting-nudge-notes {
    background: var(--accent-cta);
    color: #fff;
    border: none;
}

.meeting-nudge-notes ~ .meeting-nudge-join {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.meeting-nudge-dismiss {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.meeting-nudge-join:hover,
.meeting-nudge-join:focus-visible,
.meeting-nudge-notes:hover,
.meeting-nudge-notes:focus-visible,
.meeting-nudge-dismiss:hover,
.meeting-nudge-dismiss:focus-visible {
    opacity: 0.85;
}

/* Mobile-first: a full-width sheet-like card above the bottom safe area, with 44px touch targets. */
@media (max-width: 768px) {
    .meeting-nudge {
        left: 16px;
        right: 16px;
        bottom: calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));   /* the injected var: env() is 0 on Android WebViews */
        max-width: none;
        flex-wrap: wrap;
    }
    .meeting-nudge-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .meeting-nudge-join,
    .meeting-nudge-notes,
    .meeting-nudge-dismiss {
        min-height: 44px;
    }
}

/* The MISSED variant — "your meeting started and nothing is recording".
   Same card, one visual difference: a left edge in the accent colour, so a glance tells the two
   apart without reading. Deliberately NOT a warning/error colour — nothing has gone wrong, and
   dressing a missed meeting as a failure would overstate what we actually know (only that no
   capture is running; the user may be taking notes elsewhere, or not in the meeting at all). */
.meeting-nudge.meeting-nudge-missed {
    border-left: 3px solid var(--accent-cta);
}

/* The CONNECT variant — an offer, not a reminder about a meeting that exists.
   Neutral: no accent edge, because nothing is happening and nothing needs attention. It is the
   quietest of the three on purpose — an unsolicited offer earns less emphasis than a meeting the
   user asked to be reminded about. */
.meeting-nudge.meeting-nudge-connect {
    border-left: 3px solid var(--border);
}
