/*
 * Peekopals web app, group chats: the phone's group screens (composeApp/.../groupChats/*) in CSS.
 * Colours are the phone's Material roles (--md-* in web-app.css) under short --wa-group-* names;
 * sizes are the phone's dp as px (dimens.kt). Small screens get the phone layout; wide screens keep
 * the same screens centred at a readable width (sheets are the shared bottom sheet at every width).
 */

:root {
    /* the phone's Material roles come from web-app.css (--md-*); the fallbacks are the phone's light values */
    --wa-group-background: var(--md-background, #FFFFFF);
    --wa-group-on-surface: var(--md-on-surface, #1B1A1A);
    --wa-group-on-surface-variant: var(--md-on-surface-variant, #534342);
    --wa-group-surface: var(--md-surface, #FFE7E7);
    --wa-group-surface-container: var(--md-surface-container, #FFEFEF);
    --wa-group-surface-container-high: var(--md-surface-container-high, #FFE7E7);
    --wa-group-surface-container-highest: var(--md-surface-container-highest, #FFDEDE);
    --wa-group-outline-variant: var(--md-outline-variant, #E4CECC);
    --wa-group-primary: var(--md-primary, #BD0C23);
    --wa-group-on-primary: var(--md-on-primary, #FFFFFF);
    --wa-group-secondary: var(--md-secondary, #DBC826);
    --wa-group-on-secondary: var(--md-on-secondary, #0C0C0C);
    --wa-group-readable-width: 600px;

    /* colours the phone keeps outside the Material roles (Color.kt) */
    --wa-group-insights: #07B70E;
    --wa-group-success-container: rgba(76, 175, 80, 0.10);
    --wa-group-on-success-container: #005E04;
    --wa-group-speaker-oliver: #BD0C23;
    --wa-group-speaker-meera: #6E6200;
    --wa-group-speaker-daria: #A84C00;
    --wa-group-speaker-seo-yeon: #006FB5;
    --wa-group-speaker-amara: #067A0B;
    --wa-group-speaker-mark: #5B45C4;
    --wa-group-speaker-other: var(--wa-group-on-surface);
    --wa-mention: #067A0B;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --wa-group-success-container: rgba(102, 187, 106, 0.10);
        --wa-group-on-success-container: #A5D6A7;
        --wa-group-speaker-oliver: #FF8A95;
        --wa-group-speaker-meera: #DBC826;
        --wa-group-speaker-daria: #FF9A4D;
        --wa-group-speaker-seo-yeon: #5CB8FF;
        --wa-group-speaker-amara: #4CD653;
        --wa-group-speaker-mark: #B3A3FF;
        --wa-mention: #4CD653;
    }
}

:root[data-theme="dark"] {
    --wa-group-success-container: rgba(102, 187, 106, 0.10);
    --wa-group-on-success-container: #A5D6A7;
    --wa-group-speaker-oliver: #FF8A95;
    --wa-group-speaker-meera: #DBC826;
    --wa-group-speaker-daria: #FF9A4D;
    --wa-group-speaker-seo-yeon: #5CB8FF;
    --wa-group-speaker-amara: #4CD653;
    --wa-group-speaker-mark: #B3A3FF;
    --wa-mention: #4CD653;
}

/* ==================== group picture (the phone's GroupChatCollageAvatar) ==================== */

.wa-group-avatar { position: relative; display: inline-block; flex: none; }
.wa-group-avatar-face {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 999px;
    background: var(--wa-group-surface-container-highest);
    color: var(--wa-group-on-surface);
    font-weight: 700;
    font-size: calc(10px * var(--wa-text-scale, 1));
    /* the phone's 1 dp outline around each face */
    box-shadow: 0 0 0 1px var(--wa-group-on-surface-variant);
}
.wa-group-avatar-face::before { content: attr(data-initial); }
.wa-group-avatar-face--user {
    z-index: 1;
    /* the background-coloured gap ring, then the outline */
    box-shadow: 0 0 0 2px var(--wa-group-background), 0 0 0 3px var(--wa-group-on-surface-variant);
}
.wa-group-avatar--participants .wa-group-avatar-face { font-size: calc(24px * var(--wa-text-scale, 1)); }
.wa-group-avatar--empty-thread .wa-group-avatar-face { font-size: calc(14px * var(--wa-text-scale, 1)); }

/* the person's own photo with a letter tile when they have none */
.wa-group-letter-tile { background: var(--wa-group-secondary); color: var(--wa-group-on-secondary); }

/* ==================== group rows in the chats list (GroupChatListRow) ==================== */

.wa-chat-row.wa-chat-row--group {
    position: relative;
    align-items: center;
    gap: 12px;
    margin: 4px 8px;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
}
/* the same press/hover card as the 1:1 pal rows (.wa-pal-row-card), clipped to the row's rounded shape */
.wa-chat-row.wa-chat-row--group:hover { background: var(--md-surface-container-low); }
.wa-chat-row.wa-chat-row--group:focus-visible { outline: none; box-shadow: var(--wa-focus-ring); }
/* the phone's inset divider under each group row, in line with the pal rows' dividers */
.wa-chat-row--group::after {
    content: "";
    position: absolute;
    left: 76px;
    right: -8px;
    bottom: -4px;
    height: 1px;
    background: color-mix(in srgb, var(--wa-group-outline-variant) 50%, transparent);
}
/* the name and up to two lines of preview; the row grows instead of cropping the second line */
.wa-group-row-text { flex: 1; min-width: 0; min-height: 56px; display: flex; flex-direction: column; }
.wa-group-row-title {
    font-size: calc(16px * var(--wa-text-scale, 1));
    line-height: calc(24px * var(--wa-text-scale, 1));
    font-weight: 600;
    color: var(--wa-group-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* the same grey preview as the 1:1 pal rows (the phone's surfaceVariant), unread or not */
.wa-chat-row--group .wa-group-row-preview,
.wa-chat-row--group.wa-chat-row--unread .wa-group-row-preview {
    /* flex: 1 on .wa-chat-row-preview would shrink this box inside a short column and slice the second line */
    flex: 0 0 auto;
    margin-top: 2px;
    font-size: calc(14px * var(--wa-text-scale, 1));
    line-height: calc(20px * var(--wa-text-scale, 1));
    font-weight: 400;
    color: var(--wa-pal-surface-variant);
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* "Meera is typing…" in the 1:1 pal rows' bold success green */
.wa-chat-row--group .wa-group-row-typing {
    margin-top: 2px;
    font-size: calc(14px * var(--wa-text-scale, 1));
    line-height: calc(20px * var(--wa-text-scale, 1));
    color: var(--md-success);
    font-weight: 700;
}
.wa-group-row-side { flex: none; height: 56px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.wa-group-row-time { font-size: calc(11px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); font-weight: 500; color: var(--wa-group-on-surface); }
.wa-group-row-signs { display: flex; align-items: center; gap: 4px; }
.wa-group-row-notification-sign { display: inline-flex; color: var(--wa-group-on-surface-variant); }
.wa-chat-row--group .wa-group-row-unread-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--wa-group-secondary);
    color: #000000;
    font-size: calc(11px * var(--wa-text-scale, 1));
    font-weight: 500;
}

/* ==================== shared group screen chrome ==================== */

.wa-group-screen { background: var(--wa-group-background); color: var(--wa-group-on-surface); }
.wa-group-screen-body {
    width: 100%;
    max-width: var(--wa-group-readable-width);
    margin: 0 auto;
    padding: 0 16px 64px;
}

/* the phone's floating round icon buttons (back, ✕, ⋮): background fill and a hairline outline */
.wa-group-floating-button {
    width: 40px;
    height: 40px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 0.5px solid var(--wa-group-outline-variant);
    background: var(--wa-group-background);
    color: var(--wa-group-on-surface);
    text-decoration: none;
    cursor: pointer;
}
.wa-group-floating-button:hover { background: var(--wa-group-surface-container); }

.wa-group-floating-top-bar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    padding-top: max(8px, env(safe-area-inset-top));
    /* no fade under the bar, like the phone; only the status bar strip is solid */
    background: linear-gradient(var(--wa-group-background), var(--wa-group-background)) top / 100% env(safe-area-inset-top, 0px) no-repeat;
}

.wa-group-close-button { position: absolute; top: 8px; right: 16px; z-index: 2; }
.wa-group-close-button .wa-icon svg { width: 20px; height: 20px; }

/* ==================== group thread (GroupChatScreenComposable) ==================== */

.wa-group-thread-page { background: var(--wa-group-background); }

.wa-group-thread-header {
    gap: 0;
    padding: 0;
    padding-top: env(safe-area-inset-top);
    background: var(--wa-group-background);
    border-bottom: 0;
}
.wa-group-thread-header .wa-thread-back { margin: 8px; }
/* wide screens: the header already sits on the bubbles' column (web-app-chat.css), so the back button starts on its edge */
@media (min-width: 900px) {
    .wa-group-thread-header .wa-thread-back { margin-left: 0; }
}
.wa-group-title-pill {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 0.5px solid var(--wa-group-outline-variant);
    background: var(--wa-group-background);
    color: var(--wa-group-on-surface);
    text-decoration: none;
}
.wa-group-title-pill:hover { background: var(--wa-group-surface-container); }
.wa-group-title-pill-text { font-size: calc(16px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-group-title-pill-chevron { margin-left: 6px; flex: none; }
.wa-group-header-picture { margin-left: auto; padding: 8px; display: inline-flex; }

.wa-group-thread .wa-day-separator span,
.wa-unread-line span {
    background: var(--wa-group-surface-container);
    border: 0;
    color: var(--wa-group-on-surface-variant);
    font-size: calc(11px * var(--wa-text-scale, 1));
    line-height: calc(16px * var(--wa-text-scale, 1));
    font-weight: 500;
    padding: 4px 12px;
}
.wa-unread-line { display: flex; justify-content: center; margin: 16px 0; }
.wa-unread-line span { background: var(--wa-group-surface-container-high); border-radius: 999px; }

.wa-group-message .wa-bubble:focus { outline: none; }
.wa-group-message.wa-message--from-pal { max-width: min(86%, 620px); }
.wa-group-message-row { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.wa-group-message-column { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.wa-group-message-face { flex: none; width: 32px; display: inline-flex; text-decoration: none; }
.wa-avatar--group-sender { width: 32px; height: 32px; font-size: calc(13px * var(--wa-text-scale, 1)); }
/* only the last bubble of a run shows the face; the others keep its slot so the bubbles line up */
.wa-group-message:not(.is-last-in-run) .wa-group-message-face { visibility: hidden; }
/* tight 3 px gaps inside a run of one pal, like the phone */
.wa-group-thread .wa-group-message.wa-message--from-pal:not(.is-first-in-run) { margin-top: -1px; }

.wa-group-speaker-name {
    display: block;
    margin-bottom: 2px;
    font-size: calc(12px * var(--wa-text-scale, 1));
    line-height: calc(16px * var(--wa-text-scale, 1));
    font-weight: 600;
    color: var(--wa-group-speaker-other);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-group-message:not(.is-first-in-run) .wa-group-speaker-name { display: none; }
.wa-group-speaker--oliver_bren { color: var(--wa-group-speaker-oliver); }
.wa-group-speaker--meera_rathore { color: var(--wa-group-speaker-meera); }
.wa-group-speaker--daria_van { color: var(--wa-group-speaker-daria); }
.wa-group-speaker--seo_yeon { color: var(--wa-group-speaker-seo-yeon); }
.wa-group-speaker--amara_williams { color: var(--wa-group-speaker-amara); }
.wa-group-speaker--mark_hayes { color: var(--wa-group-speaker-mark); }

.wa-mention { color: var(--wa-mention); font-weight: 600; text-decoration: none; }
a.wa-mention:hover { text-decoration: underline; }
.wa-message--from-user .wa-mention { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.wa-group-quote { cursor: pointer; }
.wa-group-message.is-quote-target .wa-bubble { box-shadow: 0 0 0 3px var(--wa-group-secondary); transition: box-shadow 200ms ease; }

/* the long-press tray (web-app-chat.css) opens over the pal's bubble column, not over their face */
.wa-group-message.wa-message--from-pal .wa-message-menu { left: 38px; }

/* the phone's EmptyGroupChatStarter */
.wa-group-empty-starter {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
    padding: 32px 24px;
    max-width: 420px;
    color: var(--wa-group-on-surface);
}
.wa-group-empty-starter-title { margin: 16px 0 0; font-size: calc(16px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 500; text-align: center; }
.wa-group-empty-starter-subtitle { margin: 8px 0 16px; font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); color: var(--wa-group-on-surface-variant); text-align: center; }
.wa-group-starter {
    margin: 4px 0;
    padding: 8px 16px;
    border-radius: 999px;
    border: 0.5px solid var(--wa-group-outline-variant);
    background: var(--wa-group-surface-container-high);
    color: var(--wa-group-on-surface);
    font: inherit;
    font-size: calc(14px * var(--wa-text-scale, 1));
    text-align: center;
    cursor: pointer;
}
.wa-group-starter:hover { background: var(--wa-group-surface-container-highest); }


/* ==================== input bar (GroupChatTextInputBar) ==================== */

.wa-group-composer-area { position: relative; background: var(--wa-group-background); }

/* the phone's round green @ button (successContainer), inside the field's start like the 1:1 plus */
.wa-group-mention-button {
    width: 48px;
    height: 48px;
    flex: none;
    align-self: flex-end;
    margin-left: 4px;
    border: 0;
    border-radius: 999px;
    background: var(--wa-group-success-container);
    color: var(--wa-group-on-success-container);
    font: inherit;
    font-size: calc(16px * var(--wa-text-scale, 1));
    font-weight: 700;
    cursor: pointer;
}
.wa-group-composer.is-editing .wa-group-mention-button { display: none; }
/* while editing, the photo and microphone buttons step aside and the round button saves (a check) */
.wa-group-composer.is-editing .wa-composer-field-end,
.wa-group-composer.is-editing .wa-composer-fab--microphone { display: none; }
.wa-group-composer.is-editing .wa-composer-fab--send { display: inline-flex; }
.wa-group-composer.is-editing .wa-composer-text { padding-left: 16px; }
.wa-group-composer-save-icon { display: none; }
.wa-group-composer.is-editing .wa-group-composer-send-icon { display: none; }
.wa-group-composer.is-editing .wa-group-composer-save-icon { display: inline-flex; }

/* the phone's ReplySnapshot / EditSnapshot: a floating card with an accent bar, label and one-line preview */
.wa-group-snapshot-card {
    display: flex;
    align-items: stretch;
    margin: 4px 8px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--wa-group-surface-container-high);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.wa-group-snapshot-card[hidden] { display: none; }
.wa-group-snapshot-card::before { content: ""; width: 4px; flex: none; background: var(--wa-group-primary); }
.wa-group-snapshot-text { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 8px 12px; font-size: calc(13px * var(--wa-text-scale, 1)); }
.wa-group-snapshot-label { font-weight: 700; color: var(--wa-group-primary); }
.wa-group-snapshot-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--wa-group-on-surface-variant); }
/* the reply card's words scroll back to the quoted message; the quoted photo (or story) sits on the right */
.wa-group-snapshot-text[data-group-scroll-to-reply-target] { cursor: pointer; }
.wa-group-snapshot-text[data-group-scroll-to-reply-target]:focus-visible { outline: none; box-shadow: inset var(--wa-focus-ring); }
.wa-group-snapshot-preview-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.wa-group-snapshot-kind-icon { flex: none; display: inline-flex; color: var(--wa-group-on-surface-variant); }
.wa-group-snapshot-kind-icon[hidden] { display: none; }
.wa-group-snapshot-kind-icon svg { width: 14px; height: 14px; }
.wa-group-snapshot-preview { min-width: 0; }
.wa-group-snapshot-thumbnail { flex: none; align-self: center; width: 40px; height: 40px; margin: 4px 0 4px 8px; border-radius: 8px; object-fit: cover; }
.wa-group-snapshot-thumbnail--story { width: 48px; height: 80px; }
.wa-group-snapshot-thumbnail[hidden] { display: none; }
.wa-group-snapshot-close {
    width: 36px;
    flex: none;
    border: 0;
    background: transparent;
    color: var(--wa-group-on-surface-variant);
    cursor: pointer;
}
.wa-group-snapshot-close .wa-icon svg { width: 16px; height: 16px; }

/* the phone's tag panel: 80% wide, 30% tall, names scroll, All pinned at the bottom */
.wa-group-mention-picker {
    position: absolute;
    left: 6px;
    bottom: calc(100% + 4px);
    z-index: 5;
    width: min(80%, 420px);
    max-height: 30vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--wa-group-surface-container-high);
    border: 1px solid var(--wa-group-outline-variant);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}
.wa-group-mention-picker[hidden] { display: none; }
.wa-group-mention-names { flex: 1; min-height: 0; overflow-y: auto; }
.wa-group-mention-row { display: flex; align-items: center; }
.wa-group-mention-row[hidden] { display: none; }
.wa-group-mention-names .wa-group-mention-row + .wa-group-mention-row,
.wa-group-mention-picker > .wa-group-mention-row { border-top: 1px solid var(--wa-group-outline-variant); }
.wa-group-mention-option {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--wa-group-on-surface);
    font: inherit;
    font-size: calc(14px * var(--wa-text-scale, 1));
    font-weight: 500;
    text-align: start;
    cursor: pointer;
}
.wa-group-mention-option:hover,
.wa-group-mention-option.is-active { background: var(--wa-group-surface-container-highest); }
.wa-avatar--mention { width: 36px; height: 36px; font-size: calc(14px * var(--wa-text-scale, 1)); }
.wa-group-mention-everyone-icon {
    width: 36px;
    height: 36px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--wa-group-insights);
    color: #FFFFFF;
}
/* the phone's checkbox: tag without closing, green when ticked */
.wa-group-mention-check {
    width: 48px;
    height: 48px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: transparent;
}
.wa-group-mention-check .wa-icon {
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 2px solid var(--wa-group-on-surface-variant);
}
.wa-group-mention-check[aria-pressed="true"] { color: #FFFFFF; }
.wa-group-mention-check[aria-pressed="true"] .wa-icon { background: var(--wa-group-insights); border-color: var(--wa-group-insights); }

/* ==================== participants (GroupChatParticipantsComposable) ==================== */

.wa-group-participants-hero { display: flex; flex-direction: column; align-items: center; padding-top: 8px; }
.wa-group-name-pill {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 16px;
    background: var(--wa-group-surface);
    color: var(--wa-group-on-surface);
    text-decoration: none;
}
.wa-group-name-pill-text { margin: 0; font-size: calc(24px * var(--wa-text-scale, 1)); line-height: calc(32px * var(--wa-text-scale, 1)); font-weight: 400; text-align: center; overflow-wrap: anywhere; }
.wa-group-name-pill-icon { color: var(--wa-group-on-surface-variant); }
.wa-group-participant-count { margin: 4px 0 0; font-size: calc(14px * var(--wa-text-scale, 1)); color: var(--wa-group-on-surface-variant); text-align: center; }

.wa-group-card-label { margin: 24px 0 8px; font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); font-weight: 500; color: var(--wa-group-on-surface-variant); }
.wa-group-card { border-radius: 16px; overflow: hidden; background: var(--wa-group-surface-container-high); }
.wa-group-participant-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--wa-group-on-surface);
    text-decoration: none;
    position: relative;
}
.wa-group-participant-row:hover { background: var(--wa-group-surface-container-highest); }
.wa-group-participant-row + .wa-group-participant-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 80px;
    right: 0;
    height: 0.5px;
    background: var(--wa-group-outline-variant);
}
.wa-avatar--participant { width: 48px; height: 48px; font-size: calc(18px * var(--wa-text-scale, 1)); }
.wa-group-participant-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wa-group-participant-name { font-size: calc(16px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-group-participant-subtitle { font-size: calc(14px * var(--wa-text-scale, 1)); color: var(--wa-group-on-surface-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-group-participant-chevron { color: var(--wa-group-on-surface-variant); }

/* ==================== the ⋮ and delete sheets (inside the shared bottom sheet) ==================== */

.wa-group-sheet .wa-group-sheet-content { padding: 32px 16px; }
.wa-group-sheet-title { margin: 0; font-size: calc(16px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 500; }
.wa-group-sheet-subtitle { margin: 8px 0 16px; font-size: calc(12px * var(--wa-text-scale, 1)); color: var(--wa-group-on-surface-variant); }
.wa-group-sheet-divider { height: 1px; background: var(--wa-group-outline-variant); margin: 16px 0 0; }

/* the phone's SelectableCardRadio: chosen card yellow with a round dark tick */
.wa-group-notification-form { margin: 0; }
.wa-group-radio-cards { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.wa-group-radio-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--wa-group-surface);
    color: var(--wa-group-on-surface);
    cursor: pointer;
    transition: background 160ms ease;
}
.wa-group-radio-card:has(input:checked) { background: var(--wa-group-secondary); color: var(--wa-group-on-secondary); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16); }
.wa-group-radio-card:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--wa-group-primary); }
.wa-group-radio-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wa-group-radio-card-title { font-size: calc(16px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 500; }
.wa-group-radio-card-description { font-size: calc(12px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); color: var(--wa-group-on-surface-variant); }
.wa-group-radio-card:has(input:checked) .wa-group-radio-card-description { color: color-mix(in srgb, var(--wa-group-on-secondary) 70%, transparent); }
.wa-group-radio-card-tick {
    width: 24px;
    height: 24px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #FFFFFF;
    visibility: hidden;
}
.wa-group-radio-card:has(input:checked) .wa-group-radio-card-tick { visibility: visible; background: var(--wa-group-on-secondary); }

/* the phone's delete row (GroupChatOptionRow) */
.wa-group-option-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: var(--wa-group-on-surface);
    font: inherit;
    text-align: start;
    cursor: pointer;
}
.wa-group-option-row-text { flex: 1; display: flex; flex-direction: column; }
.wa-group-option-row-title { font-size: calc(16px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 500; }
.wa-group-option-row-description { font-size: calc(12px * var(--wa-text-scale, 1)); color: var(--wa-group-on-surface-variant); }
.wa-group-option-row-chevron { color: var(--wa-group-on-surface-variant); }

/* the phone's DrawBottomSheetAlert: centred title, then full-width text buttons between dividers */
.wa-group-sheet--alert { padding-bottom: max(6px, var(--wa-bottom-inset)); }
.wa-group-alert-title { margin: 0; padding: 24px 16px; font-size: calc(16px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 500; text-align: center; }
.wa-group-sheet--alert .wa-group-sheet-divider { margin: 0; }
.wa-group-alert-button {
    width: 100%;
    padding: 18px 16px;
    border: 0;
    background: transparent;
    color: var(--wa-group-on-surface);
    font: inherit;
    font-size: calc(16px * var(--wa-text-scale, 1));
    font-weight: 500;
    cursor: pointer;
}
.wa-group-alert-button--positive { color: var(--wa-group-primary); }
.wa-group-alert-button:hover { background: var(--wa-group-surface-container); }

/* ==================== rename (GroupChatRenameGroupComposable) ==================== */

.wa-group-rename-screen { position: relative; }
.wa-group-rename-body { display: flex; flex-direction: column; align-items: center; padding-top: 64px; }
.wa-group-rename-badge {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--wa-group-secondary);
    color: #000000;
}
.wa-group-rename-title { margin: 16px 0 0; font-size: calc(28px * var(--wa-text-scale, 1)); line-height: calc(36px * var(--wa-text-scale, 1)); font-weight: 400; text-align: center; }
.wa-group-rename-helper { margin: 8px 0 16px; font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); color: var(--wa-group-on-surface-variant); text-align: center; }
.wa-group-rename-form { width: 100%; display: flex; flex-direction: column; }
/* the phone's outlined text field with a floating label and a leading pencil */
.wa-group-outlined-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid var(--wa-group-on-surface-variant);
    border-radius: 12px;
    color: var(--wa-group-on-surface-variant);
}
.wa-group-outlined-field:focus-within { border: 2px solid var(--wa-group-primary); padding: 0 15px; }
.wa-group-outlined-field-label {
    position: absolute;
    top: -9px;
    left: 12px;
    padding: 0 4px;
    background: var(--wa-group-background);
    font-size: calc(12px * var(--wa-text-scale, 1));
    line-height: calc(16px * var(--wa-text-scale, 1));
}
.wa-group-outlined-field:focus-within .wa-group-outlined-field-label { color: var(--wa-group-primary); }
.wa-group-outlined-field-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--wa-group-on-surface);
    font: inherit;
    font-size: calc(16px * var(--wa-text-scale, 1));
}
.wa-group-characters-left { margin: 8px 0 16px; font-size: calc(11px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); color: var(--wa-group-on-surface-variant); text-align: end; }
.wa-group-wide-button { width: 100%; }

/* a group photo's corner chips (candid eye-off, "kept safe" shield): the phone's group screen shows them without a tap action */
.wa-group-thread .wa-media-card { position: relative; overflow: hidden; }
.wa-photo-corner-chip.wa-photo-corner-chip--still { cursor: default; }
