﻿/* =========================================================================
   TalkApp — Premium WhatsApp-Style Group Call UI (group-call.css)
   ========================================================================= */

#wa-gc-screen {
    position: fixed;
    inset: 0;
    z-index: 10050;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    background: radial-gradient(circle at 50% 0%, #15232b 0%, #0b141a 55%, #070d11 100%);
    color: #e9edef;
    display: none;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    user-select: none;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Top Header --- */
.wa-gc-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    background: linear-gradient(180deg, rgba(7, 13, 17, 0.88) 0%, rgba(7, 13, 17, 0.2) 100%);
    z-index: 5;
}

.wa-gc-header-btn {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e9edef;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s;
    backdrop-filter: blur(10px);
}

    .wa-gc-header-btn:hover {
        background: rgba(255, 255, 255, 0.16);
    }

    .wa-gc-header-btn:active {
        transform: scale(0.92);
    }

.wa-gc-header-info {
    text-align: center;
    flex: 1;
    min-width: 0;
    padding: 0 10px;
}

.wa-gc-group-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-gc-status-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    color: #8696a0;
    margin-top: 2px;
    font-weight: 500;
}

    .wa-gc-status-sub i {
        font-size: 10px;
        color: #00a884;
    }

.wa-gc-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    color: #e9edef;
    backdrop-filter: blur(10px);
}

/* --- Full-Height Responsive WhatsApp Grid --- */
#wa-gc-grid {
    flex: 1;
    min-height: 0;
    width: 100%;
    padding: 6px 10px 8px;
    display: grid;
    gap: 8px;
    align-content: stretch;
    align-items: stretch;
    justify-items: stretch;
    overflow: hidden;
    box-sizing: border-box;
}

    #wa-gc-grid.gc-count-1 {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    #wa-gc-grid.gc-count-2 {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }

@media (min-width: 768px) {
    #wa-gc-grid.gc-count-2 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
    }
}

#wa-gc-grid.gc-count-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

    #wa-gc-grid.gc-count-3 .wa-gc-tile:nth-child(3) {
        grid-column: 1 / -1;
    }

@media (min-width: 900px) {
    #wa-gc-grid.gc-count-3 {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 1fr;
    }

        #wa-gc-grid.gc-count-3 .wa-gc-tile:nth-child(3) {
            grid-column: auto;
        }
}

#wa-gc-grid.gc-count-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

#wa-gc-grid.gc-count-5 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
}

    #wa-gc-grid.gc-count-5 .wa-gc-tile:nth-child(5) {
        grid-column: 1 / -1;
    }

@media (min-width: 900px) {
    #wa-gc-grid.gc-count-5 {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: 1fr 1fr;
    }

        #wa-gc-grid.gc-count-5 .wa-gc-tile:nth-child(1),
        #wa-gc-grid.gc-count-5 .wa-gc-tile:nth-child(2),
        #wa-gc-grid.gc-count-5 .wa-gc-tile:nth-child(3) {
            grid-column: span 2;
        }

        #wa-gc-grid.gc-count-5 .wa-gc-tile:nth-child(4),
        #wa-gc-grid.gc-count-5 .wa-gc-tile:nth-child(5) {
            grid-column: span 3;
        }
}

#wa-gc-grid.gc-count-6 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
}

@media (min-width: 900px) {
    #wa-gc-grid.gc-count-6 {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 1fr 1fr;
    }
}

#wa-gc-grid.gc-count-many {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: minmax(180px, 1fr);
    overflow-y: auto;
}

/* --- Spotlight / Pinned Tile Mode --- */
#wa-gc-grid.is-spotlight {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
}

    #wa-gc-grid.is-spotlight .wa-gc-tile.is-pinned {
        flex: 1 1 74%;
        min-height: 0;
        width: 100%;
    }

    #wa-gc-grid.is-spotlight .wa-gc-strip-wrap {
        flex: 0 0 24%;
        min-height: 110px;
        display: flex;
        gap: 8px;
        overflow-x: auto;
    }

        #wa-gc-grid.is-spotlight .wa-gc-strip-wrap .wa-gc-tile {
            flex: 1 1 0;
            min-width: 110px;
            height: 100%;
        }

/* --- Video / Avatar Tile --- */
.wa-gc-tile {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: radial-gradient(circle at 50% 42%, var(--tile-tint, rgba(0, 168, 132, 0.2)) 0%, #18252d 56%, #111b21 100%);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
    border: 2px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.18s ease;
    cursor: pointer;
}

    .wa-gc-tile.is-speaking {
        border-color: #00a884;
        box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.28), 0 8px 24px rgba(0, 0, 0, 0.45);
    }

    .wa-gc-tile video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        background: transparent;
    }

    .wa-gc-tile.self-mirror video {
        transform: scaleX(-1);
    }

    .wa-gc-tile.video-hidden video {
        opacity: 0;
        pointer-events: none;
    }

/* --- Avatar Card (Camera Off / Voice Call) --- */
.wa-gc-avatar-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    text-align: center;
}

.wa-gc-avatar-ring {
    position: relative;
    padding: 5px;
    border-radius: 50%;
    transition: box-shadow 0.25s ease;
}

.wa-gc-tile.is-speaking .wa-gc-avatar-ring {
    box-shadow: 0 0 0 4px rgba(0, 168, 132, 0.45), 0 0 0 11px rgba(0, 168, 132, 0.16);
}

.wa-gc-avatar-circle {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.16);
}

#wa-gc-grid.gc-count-1 .wa-gc-avatar-circle {
    width: 112px;
    height: 112px;
    font-size: 38px;
}

.wa-gc-tile-state-txt {
    font-size: 11.5px;
    font-weight: 500;
    color: #aebac1;
    background: rgba(11, 20, 26, 0.52);
    padding: 3px 10px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
}

    .wa-gc-tile-state-txt:empty {
        display: none;
    }

/* --- Tile Footer & Soundwave --- */
.wa-gc-tile-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 22px 10px 9px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.68) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    pointer-events: none;
}

.wa-gc-name-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(11, 20, 26, 0.62);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 14px;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-gc-wave {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 11px;
    flex-shrink: 0;
}

.wa-gc-tile.is-speaking .wa-gc-wave {
    display: inline-flex;
}

.wa-gc-wave span {
    width: 2.5px;
    background: #00e676;
    border-radius: 2px;
    animation: waGcBar 0.7s infinite ease-in-out alternate;
}

    .wa-gc-wave span:nth-child(1) {
        height: 5px;
        animation-delay: 0s;
    }

    .wa-gc-wave span:nth-child(2) {
        height: 11px;
        animation-delay: 0.2s;
    }

    .wa-gc-wave span:nth-child(3) {
        height: 7px;
        animation-delay: 0.4s;
    }

@keyframes waGcBar {
    0% {
        transform: scaleY(0.35);
    }

    100% {
        transform: scaleY(1);
    }
}

.wa-gc-muted-badge {
    background: rgba(234, 0, 56, 0.92);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.wa-gc-tile.is-muted .wa-gc-muted-badge {
    display: flex;
}

.wa-gc-pin-badge {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 3;
    background: rgba(11, 20, 26, 0.65);
    color: #00a884;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.wa-gc-tile.is-pinned .wa-gc-pin-badge {
    display: flex;
}

/* --- Bottom Control Dock --- */
.wa-gc-controls-wrap {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    padding: 8px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(0deg, rgba(7, 13, 17, 0.92) 0%, rgba(7, 13, 17, 0) 100%);
}

.wa-gc-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 18px;
    background: rgba(31, 44, 52, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.52);
}

.wa-gc-ctrl-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s, color 0.2s;
}

    .wa-gc-ctrl-btn:hover {
        background: rgba(255, 255, 255, 0.18);
    }

    .wa-gc-ctrl-btn:active {
        transform: scale(0.9);
    }

    .wa-gc-ctrl-btn.active-state {
        background: #ffffff;
        color: #111b21;
    }

    .wa-gc-ctrl-btn.btn-end-call {
        background: linear-gradient(135deg, #f15c6d, #d90429);
        color: #fff;
        width: 56px;
        height: 56px;
        font-size: 21px;
        box-shadow: 0 4px 16px rgba(234, 0, 56, 0.45);
    }

        .wa-gc-ctrl-btn.btn-end-call:hover {
            filter: brightness(1.08);
        }

/* --- Incoming Group Call Modal --- */
#wa-gc-incoming-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: radial-gradient(circle at 50% 25%, rgba(0, 168, 132, 0.18), rgba(7, 13, 17, 0.95) 65%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wa-gc-incoming-card {
    width: 100%;
    max-width: 340px;
    background: rgba(31, 44, 52, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 26px;
    padding: 30px 24px 26px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.wa-gc-incoming-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #00e676;
    letter-spacing: 0.4px;
    background: rgba(0, 168, 132, 0.14);
    padding: 4px 11px;
    border-radius: 14px;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.wa-gc-incoming-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #00a884, #007a60);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    box-shadow: 0 0 0 8px rgba(0, 168, 132, 0.2), 0 8px 24px rgba(0, 0, 0, 0.45);
}

    .wa-gc-incoming-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.wa-gc-incoming-actions {
    display: flex;
    justify-content: space-around;
    margin-top: 28px;
}

.wa-gc-inc-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}

    .wa-gc-inc-btn:active {
        transform: scale(0.92);
    }

.wa-gc-inc-decline {
    background: linear-gradient(135deg, #f15c6d, #d90429);
    box-shadow: 0 6px 18px rgba(234, 0, 56, 0.4);
}

.wa-gc-inc-accept {
    background: linear-gradient(135deg, #25d366, #00a884);
    animation: waGcPulse 1.5s infinite;
}

@keyframes waGcPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.65);
    }

    70% {
        box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* --- Premium Floating Bottom Minimized Call Pill (Chat Input ke bilkul upar) --- */
/* --- Premium Top Minimized Call Bar (Flat Edge, Full Width — Group Name ke ekdam upar) --- */
#wa-gc-pip-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10040;
    width: 100%;
    height: 44px;
    background: linear-gradient(90deg, #072820 0%, #0d3f33 50%, #072820 100%);
    border-bottom: 1px solid rgba(37, 211, 102, 0.38);
    border-radius: 0;
    color: #ffffff;
    padding: 0 14px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
    box-sizing: border-box;
    animation: waGcTopBarSlide 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes waGcTopBarSlide {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wa-gc-pip-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.wa-gc-pip-icon-wrap {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #25d366, #00a884);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.22);
    animation: waGcLiveDot 1.8s infinite;
}

@keyframes waGcLiveDot {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.wa-gc-pip-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    line-height: 1.2;
}

.wa-gc-pip-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-gc-pip-sub {
    font-size: 12px;
    font-weight: 500;
    color: #7ef2a6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-gc-pip-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wa-gc-pip-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.14s, background 0.18s;
}

    .wa-gc-pip-action-btn:active {
        transform: scale(0.9);
    }

    .wa-gc-pip-action-btn.is-muted {
        background: #ffffff;
        color: #111b21;
    }

.wa-gc-pip-leave {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #f15c6d, #d90429);
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(234, 0, 56, 0.4);
    transition: transform 0.14s;
}

    .wa-gc-pip-leave:active {
        transform: scale(0.9);
    }

/* --- Premium Top Ongoing Call "Join" Strip (Flat Edge — Group Name ke ekdam upar) --- */
#wa-gc-join-banner {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(90deg, #072820 0%, #0e4437 50%, #072820 100%);
    border-bottom: 1px solid rgba(37, 211, 102, 0.38);
    border-radius: 0;
    padding: 9px 14px;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
    box-sizing: border-box;
    animation: waGcTopBarSlide 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.wa-gc-join-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.wa-gc-join-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #25d366, #00a884);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.22);
    animation: waGcLiveDot 1.8s infinite;
}

.wa-gc-join-meta {
    min-width: 0;
    flex: 1;
    line-height: 1.25;
}

.wa-gc-join-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-gc-join-sub {
    font-size: 11.5px;
    font-weight: 500;
    color: #7ef2a6;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-gc-join-btn {
    background: linear-gradient(135deg, #25d366, #00a884);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.25px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 168, 132, 0.4);
    transition: transform 0.14s, filter 0.18s;
}

    .wa-gc-join-btn:hover {
        filter: brightness(1.08);
    }

    .wa-gc-join-btn:active {
        transform: scale(0.95);
    }


/* --- Toast Notification --- */
#wa-gc-toast {
    position: fixed;
    bottom: 112px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10070;
    background: rgba(24, 34, 41, 0.94);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 500;
    display: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
}

/* =========================================================================
   Clickable Count Pill + Premium Add Participants Bottom Sheet
   ========================================================================= */
.wa-gc-count-pill {
    cursor: pointer;
    transition: background 0.18s, transform 0.15s, border-color 0.18s;
}

    .wa-gc-count-pill:hover {
        background: rgba(0, 168, 132, 0.22);
        border-color: rgba(37, 211, 102, 0.45);
    }

    .wa-gc-count-pill:active {
        transform: scale(0.94);
    }

.wa-gc-pill-sep {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.22);
    margin: 0 2px;
}

.wa-gc-pill-plus {
    color: #25d366;
    font-size: 13.5px;
}

/* Backdrop & Sheet Container */
#wa-gc-add-overlay {
    position: fixed;
    inset: 0;
    z-index: 10055;
    background: rgba(5, 10, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: flex-end;
    justify-content: center;
}

    #wa-gc-add-overlay.open {
        display: flex;
    }

.wa-gc-add-sheet {
    width: 100%;
    max-width: 480px;
    max-height: 82dvh;
    background: linear-gradient(180deg, #1b2830 0%, #111b21 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px 24px 0 0;
    color: #e9edef;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.65);
    animation: waGcSheetUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
    #wa-gc-add-overlay {
        align-items: center;
        padding: 20px;
    }

    .wa-gc-add-sheet {
        max-width: 440px;
        max-height: 78vh;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 22px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    }
}

@keyframes waGcSheetUp {
    from {
        opacity: 0;
        transform: translateY(36px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wa-gc-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
    margin: 10px auto 4px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .wa-gc-sheet-handle {
        display: none;
    }
}

.wa-gc-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.wa-gc-sheet-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #ffffff;
}

.wa-gc-sheet-subtitle {
    font-size: 12px;
    color: #8696a0;
    margin-top: 1px;
}

.wa-gc-sheet-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.09);
    color: #e9edef;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.16s;
}

    .wa-gc-sheet-close:hover {
        background: rgba(255, 255, 255, 0.18);
    }

/* Search Bar */
.wa-gc-sheet-search-wrap {
    padding: 12px 16px 8px;
    flex-shrink: 0;
}

.wa-gc-sheet-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(11, 20, 26, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 9px 13px;
    transition: border-color 0.18s;
}

    .wa-gc-sheet-search-box:focus-within {
        border-color: rgba(37, 211, 102, 0.55);
    }

    .wa-gc-sheet-search-box i {
        color: #8696a0;
        font-size: 14px;
    }

    .wa-gc-sheet-search-box input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        color: #ffffff;
        font-size: 13.5px;
    }

        .wa-gc-sheet-search-box input::placeholder {
            color: #6f818c;
        }

/* Scrollable List Body */
.wa-gc-sheet-body {
    flex: 1;
    min-height: 180px;
    overflow-y: auto;
    padding: 4px 12px 18px;
}

.wa-gc-sheet-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #00a884;
    padding: 12px 8px 6px;
}

.wa-gc-person-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 11px;
    padding: 9px 8px;
    border-radius: 14px;
    transition: background 0.15s;
}

    .wa-gc-person-row:hover {
        background: rgba(255, 255, 255, 0.05);
    }

.wa-gc-person-left {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    flex: 1;
}

.wa-gc-person-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: visible;
}

    .wa-gc-person-avatar img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }

.wa-gc-online-dot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #25d366;
    border: 2px solid #131f26;
}

.wa-gc-person-info {
    min-width: 0;
    flex: 1;
}

.wa-gc-person-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-gc-person-sub {
    font-size: 11.5px;
    color: #8696a0;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-gc-guest-tag {
    font-size: 10px;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 1px 6px;
    border-radius: 8px;
    flex-shrink: 0;
}

.wa-gc-in-call-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: #25d366;
    background: rgba(37, 211, 102, 0.12);
    padding: 4px 10px;
    border-radius: 14px;
    flex-shrink: 0;
}

.wa-gc-invite-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    border-radius: 18px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    background: linear-gradient(135deg, #25d366, #00a884);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 168, 132, 0.35);
    transition: transform 0.14s, filter 0.16s, background 0.18s;
}

    .wa-gc-invite-btn:hover {
        filter: brightness(1.08);
    }

    .wa-gc-invite-btn:active {
        transform: scale(0.93);
    }

    .wa-gc-invite-btn.is-ringing {
        background: rgba(255, 255, 255, 0.12);
        color: #aebac1;
        box-shadow: none;
        cursor: default;
    }

.wa-gc-sheet-empty {
    text-align: center;
    padding: 28px 16px;
    color: #8696a0;
    font-size: 13px;
}
/* =========================================================================
   Premium Inviter-Only Ringing Placeholder Tile
   ========================================================================= */
.wa-gc-avatar-circle {
    overflow: hidden;
}

    .wa-gc-avatar-circle img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.wa-gc-tile.is-ringing-tile {
    border-color: rgba(37, 211, 102, 0.48);
    animation: waGcTilePopIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.wa-gc-tile.wa-gc-tile-leaving {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

@keyframes waGcTilePopIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wa-gc-ringing-top-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(11, 20, 26, 0.72);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(37, 211, 102, 0.4);
    color: #7ef2a6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    border-radius: 14px;
}

.wa-gc-ring-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #25d366;
    animation: waGcRingDotBlink 1s infinite ease-in-out;
}

@keyframes waGcRingDotBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(0.75);
    }
}

.wa-gc-avatar-ring.wa-gc-ringing-pulse {
    animation: waGcAvatarRingWave 1.6s infinite ease-out;
}

@keyframes waGcAvatarRingWave {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55), 0 0 0 0 rgba(37, 211, 102, 0.25);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(37, 211, 102, 0), 0 0 0 24px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.wa-gc-ringing-label {
    color: #7ef2a6 !important;
    background: rgba(0, 168, 132, 0.18) !important;
    border: 1px solid rgba(37, 211, 102, 0.32);
    font-weight: 600 !important;
}

.wa-gc-dots::after {
    content: '';
    animation: waGcDotsAnim 1.4s steps(4, end) infinite;
}

@keyframes waGcDotsAnim {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }

    100% {
        content: '';
    }
}
/* Calling state (jab tak target device online confirm na ho) */
.wa-gc-tile.is-calling-only {
    border-color: rgba(255, 255, 255, 0.22);
}

    .wa-gc-tile.is-calling-only .wa-gc-ringing-top-badge {
        border-color: rgba(255, 255, 255, 0.22);
        color: #d1d7db;
    }

    .wa-gc-tile.is-calling-only .wa-gc-ring-dot {
        background: #aebac1;
    }

    .wa-gc-tile.is-calling-only .wa-gc-ringing-label {
        color: #d1d7db !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.16);
    }

    .wa-gc-tile.is-calling-only .wa-gc-avatar-ring.wa-gc-ringing-pulse {
        animation: waGcCallingSoftPulse 1.8s infinite ease-out;
    }

@keyframes waGcCallingSoftPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.32);
    }

    70% {
        box-shadow: 0 0 0 14px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}
/* =========================================================================
   External Invited User — Global Flat Top Join Strip
   ========================================================================= */
#wa-gc-ext-join-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10038;
    width: 100%;
    min-height: 46px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(90deg, #072820 0%, #0e4437 50%, #072820 100%);
    border-bottom: 1px solid rgba(37, 211, 102, 0.42);
    border-radius: 0;
    padding: 7px 14px;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    animation: waGcTopBarSlide 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Avatar fallback initials (jab DP na ho ya image fail ho) */
.wa-gc-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/*Update new changes for z-index for call*/
/* =========================================================================
   TalkApp — Always-On-Top Call Layering (Above Group Info / Add Members / Modals)
   + Premium Glassmorphic Incoming Call Look
   ========================================================================= */

/* 1. Strict Global Z-Index Hierarchy (Higher than Group Info 99990 & Add Sheet 99995) */
#wa-gc-pip-bar {
    z-index: 2147482900 !important;
}

#wa-gc-screen {
    z-index: 2147483000 !important;
}

#wa-gc-add-overlay {
    z-index: 2147483010 !important;
}

/* 1-to-1 Call Modals Safety (Group Info open hone par 1-to-1 call bhi upar dikhe) */
#incoming-call-modal,
#incomingCallModal,
#call-modal,
#callModal,
#video-call-modal,
#videoCallModal,
#audio-call-modal,
#audioCallModal,
#active-call-modal,
#call-screen,
.incoming-call-modal,
.call-screen-overlay {
    z-index: 2147483015 !important;
}

#wa-gc-incoming-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483020 !important;
    background: radial-gradient(circle at 50% 28%, rgba(0, 168, 132, 0.20), rgba(7, 14, 20, 0.86) 72%) !important;
    backdrop-filter: blur(16px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(135%) !important;
    padding: 20px !important;
    animation: waGcBackdropFade 0.22s ease-out;
}

#wa-gc-toast {
    z-index: 2147483030 !important;
}

/* 2. Premium Incoming Call Card Upgrade (Zero HTML/JS Breakage) */
#wa-gc-incoming-modal > div {
    background: linear-gradient(165deg, rgba(28, 41, 49, 0.94) 0%, rgba(15, 24, 30, 0.97) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 28px !important;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    animation: waGcIncomingPop 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Pulsing Ring Around Group / Caller Avatar */
#wa-gc-incoming-modal img {
    border: 2.5px solid rgba(0, 212, 166, 0.72) !important;
    box-shadow: 0 0 0 0 rgba(0, 168, 132, 0.55);
    animation: waGcRingPulse 1.85s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

/* Crisp Tactile Press Feedback on Join & Decline Buttons */
#wa-gc-incoming-modal button {
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease !important;
}

    #wa-gc-incoming-modal button:hover {
        filter: brightness(1.08);
        transform: translateY(-2px);
    }

    #wa-gc-incoming-modal button:active {
        transform: scale(0.94) !important;
    }

@keyframes waGcBackdropFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes waGcIncomingPop {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes waGcRingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 168, 132, 0.58), 0 0 0 0 rgba(0, 168, 132, 0.28);
    }

    70% {
        box-shadow: 0 0 0 16px rgba(0, 168, 132, 0), 0 0 0 28px rgba(0, 168, 132, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 168, 132, 0), 0 0 0 0 rgba(0, 168, 132, 0);
    }
}


/*Call-Top Pill issue*/
/* =========================================================================
   TalkApp — Pure CSS 50px Top Call Pill + All Overlays (My Profile / Contact / Group Info)
   ========================================================================= */
html body.wa-gc-pip-visible #wa-gc-pip-bar:not([style*="display: none"]):not([hidden]) {
    display: flex !important;
    align-items: center !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(90deg, #092e28 0%, #0e4a3e 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22) !important;
    box-sizing: border-box !important;
}

/* Full-Screen Fixed Overlays (Group Info, Add Members, Other Contact Info, Own My Profile) */
html body.wa-gc-pip-visible #wa-group-info-page,
html body.wa-gc-pip-visible #wa-add-member-sheet,
html body.wa-gc-pip-visible #dynamicProfileModal .contact-info-modal-wrapper,
html body.wa-gc-pip-visible .contact-info-modal-wrapper,
html body.wa-gc-pip-visible .wa-gc-pip-pushed {
    top: 50px !important;
    bottom: 0 !important;
    height: calc(100vh - 50px) !important;
    height: calc(100dvh - 50px) !important;
    max-height: calc(100dvh - 50px) !important;
}
/* =========================================================================
   TalkApp — Direct Offset for 1-to-1 Contact Info Modal (.contact-info-modal-wrapper)
   ========================================================================= */
/*body.wa-gc-pip-visible #dynamicProfileModal .contact-info-modal-wrapper,
body.wa-gc-pip-visible .contact-info-modal-wrapper {
    top: var(--wa-gc-pip-offset, 50px) !important;
    height: calc(100vh - var(--wa-gc-pip-offset, 50px)) !important;
    height: calc(100dvh - var(--wa-gc-pip-offset, 50px)) !important;
    transition: top 0.14s ease, height 0.14s ease !important;
}*/
/*Update new changes for z-index for call*/
