body.wa-phone-open {
    overflow: hidden;
}

.wa-invite-preview-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.4rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: #1f4d3a;
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.wa-phone-preview {
    min-width: 0;
}

.wa-phone-preview.is-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(28, 22, 16, 0.42);
}

.wa-phone-preview.is-modal[hidden] {
    display: none;
}

.wa-phone-chrome {
    display: grid;
    gap: 0.7rem;
    justify-items: center;
    width: min(22rem, 100%);
    max-height: 100%;
}

.wa-phone-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.wa-phone-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.wa-phone-reset {
    border: 0;
    background: transparent;
    color: #1f4d3a;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.wa-phone-kicker,
.dash-invite-contents .wa-phone-kicker {
    margin: 0;
    color: #3f382f;
    font-size: 0.92rem;
    font-weight: 800;
}

.wa-phone-close {
    border: 0;
    background: transparent;
    color: #6a5c4b;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.wa-phone-shell {
    display: flex;
    justify-content: center;
}

.wa-phone-bezel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(20.5rem, calc(100vw - 2rem), calc((100dvh - 7.25rem) * 390 / 844));
    aspect-ratio: 390 / 844;
    height: auto;
    max-height: calc(100dvh - 7.25rem);
    overflow: hidden;
    border-radius: 2.55rem;
    background: #111;
    box-shadow: 0 18px 48px rgba(28, 22, 16, 0.18);
    padding: 0.62rem 0.42rem 0.42rem;
}

.wa-phone-notch {
    position: absolute;
    top: 0.28rem;
    left: 50%;
    z-index: 2;
    width: 5.4rem;
    height: 0.42rem;
    border-radius: 999px;
    background: #2a2a2a;
    transform: translateX(-50%);
    pointer-events: none;
}

.wa-phone-top,
.wa-phone-composer {
    flex: 0 0 auto;
    direction: rtl;
}

.wa-phone-top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.75rem 0.65rem;
    background: #fff;
    border-radius: 1.55rem 1.55rem 0 0;
}

.wa-phone-back {
    border: 0;
    padding: 0;
    background: transparent;
    color: #667781;
    font-size: 1.55rem;
    line-height: 1;
    cursor: default;
}

button.wa-phone-back {
    cursor: pointer;
}

.wa-phone-top img {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    object-fit: contain;
    background: #111;
}

.wa-phone-top strong,
.wa-phone-top small {
    display: block;
}

.wa-phone-top strong {
    color: #111;
    font-size: 0.92rem;
    line-height: 1.3;
}

.wa-phone-top small {
    color: #667781;
    font-size: 0.72rem;
}

.wa-phone-thread {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.7rem 0.65rem 0.85rem;
    direction: ltr;
    unicode-bidi: isolate;
    background-color: #efeae2;
    background-image:
        radial-gradient(circle at 14% 18%, rgba(120, 90, 40, 0.07) 1.1px, transparent 1.4px),
        radial-gradient(circle at 78% 36%, rgba(120, 90, 40, 0.06) 1px, transparent 1.3px),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'><g fill='none' stroke='%23c4b496' stroke-width='1.1' opacity='0.22'><path d='M10 18c6-8 16-8 22 0'/><path d='M48 14l4 7 8 1-6 5 2 8-8-4-8 4 2-8-6-5 8-1z'/><circle cx='18' cy='50' r='6'/></g></svg>");
    background-size: auto, auto, 72px 72px;
}

.wa-phone-lock {
    margin: 0 auto;
    max-width: 92%;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: #fff9c7;
    color: #5a5146;
    font-size: 0.72rem;
    line-height: 1.6;
    text-align: center;
    direction: rtl;
}

.wa-phone-incoming {
    display: grid;
    width: min(78%, 17.5rem);
    max-width: 100%;
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 0 auto 0 0;
    overflow: visible;
    border-radius: 4px 14px 14px 14px;
    background: #fff;
    box-shadow: 0 1px 1px rgba(17, 17, 17, 0.08);
}

.wa-phone-photo {
    margin: 0;
    overflow: hidden;
    border-radius: 4px 14px 0 0;
    background: #f7f3ec;
}

.wa-phone-photo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.wa-phone-incoming > :last-child {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.wa-phone-bubble {
    padding: 0.7rem 0.75rem 0.45rem;
    color: #111;
    text-align: start;
    direction: rtl;
}

.wa-invite-preview {
    display: grid;
    gap: 0.65rem;
    justify-items: start;
    margin: 0 0 1rem;
}

.wa-phone-bubble p {
    margin: 0 0 0.45rem;
    color: #111;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.wa-phone-bubble p:last-of-type {
    margin-bottom: 0.2rem;
}

.wa-phone-link,
.wa-phone-link a {
    color: #027a38;
    font-weight: 700;
}

.wa-phone-bubble time {
    display: block;
    margin-top: 0.35rem;
    color: #667781;
    font-size: 0.68rem;
}

.wa-phone-actions {
    display: grid;
    overflow: hidden;
    background: #fff;
    border-radius: 0 0 14px 14px;
}

.wa-phone-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.45rem;
    padding: 0.4rem 0.7rem;
    border: 0;
    border-top: 1px solid #ece7df;
    background: #fff;
    color: #111;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.wa-phone-action.is-accept {
    color: #027a38;
}

.wa-phone-action.is-decline {
    color: #4b5563;
}

.wa-phone-outgoing {
    flex: 0 0 auto;
    align-self: flex-end;
    width: max-content;
    max-width: min(78%, 17.5rem);
    margin: 0 0 0 auto;
    padding: 0.55rem 0.7rem 0.4rem;
    overflow: visible;
    border-radius: 14px 4px 14px 14px;
    background: #d9fdd3;
    box-shadow: 0 1px 1px rgba(17, 17, 17, 0.08);
    direction: rtl;
    text-align: start;
}

.wa-phone-outgoing p {
    margin: 0;
    color: #111;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.6;
}

.wa-phone-outgoing time {
    display: block;
    margin-top: 0.25rem;
    color: #667781;
    font-size: 0.68rem;
}

.wa-phone-preview-note {
    margin: 0.15rem 0 0;
    color: #8a3a32;
    font-size: 0.78rem;
    font-weight: 700;
    direction: rtl;
    text-align: start;
}

.wa-phone-pass {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    overflow: hidden;
    background: #fbf9f5;
}

.wa-phone-preview.is-pass .wa-phone-thread,
.wa-phone-preview.is-pass .wa-phone-composer,
.wa-phone-preview.is-pass [data-wa-chat-back] {
    display: none;
}

.wa-phone-preview.is-pass .wa-phone-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    background: transparent;
    border-radius: 0;
}

.wa-phone-preview.is-pass .wa-phone-top img,
.wa-phone-preview.is-pass .wa-phone-top div {
    display: none;
}

.wa-phone-preview.is-pass .wa-phone-back {
    color: #2a241d;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.wa-phone-preview.is-pass .wa-phone-pass {
    display: block;
    flex: 1 1 auto;
    height: 100%;
    border-radius: 2.05rem;
}

.wa-phone-pass .gp-page {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 390px;
    height: 844px;
    min-height: 844px;
    padding: 67px 19px;
    justify-content: center;
    overflow: hidden;
    transform: translate(-50%, -50%) scale(var(--wa-pass-scale, 0.4));
    transform-origin: center center;
}

.wa-phone-pass .gp-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.wa-phone-pass .gp-wrap {
    width: min(100%, 21.5rem);
}

.wa-phone-pass .gp-card--pass {
    color: #111;
}

.wa-phone-pass .gp-card--pass .gp-kicker,
.wa-phone-pass .gp-card--pass h1,
.wa-phone-pass .gp-count span,
.wa-phone-pass .gp-count strong,
.wa-phone-pass .gp-support,
.wa-phone-pass .gp-support a,
.wa-phone-pass .gp-countdown p,
.wa-phone-pass .gp-countdown strong {
    color: #111;
}

.wa-phone-pass .gp-help {
    color: #3f1d1d;
}

.wa-phone-pass .gp-help.is-note {
    color: #b71c1c;
}

.wa-phone-notes {
    display: grid;
    gap: 0.2rem;
}

.wa-phone-isolation {
    margin: 0;
    color: #5c5348;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
}

.wa-phone-composer {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.6rem 0.55rem;
    background: #f0f2f5;
    border-radius: 0 0 1.55rem 1.55rem;
    pointer-events: none;
    user-select: none;
}

.wa-phone-composer span,
.wa-phone-composer b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: #d1d7db;
    color: #54656f;
    font-size: 1.05rem;
    font-style: normal;
}

.wa-phone-composer em {
    flex: 1;
    min-width: 0;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    color: #8696a0;
    font-size: 0.82rem;
    font-style: normal;
}

.wa-phone-disclaimer {
    margin: 0;
    color: #7a7166;
    font-size: 0.78rem;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 640px) {
    .wa-phone-preview,
    .wa-phone-preview.is-modal {
        width: 100%;
        min-height: 100dvh;
        height: auto;
        max-height: none;
        padding: 0.55rem;
        align-items: center;
        overflow: auto;
        box-sizing: border-box;
    }

    .wa-phone-chrome {
        width: min(22rem, 100%);
        height: auto;
        max-height: none;
    }

    .wa-phone-shell,
    .wa-phone-bezel {
        width: min(20.5rem, calc(100vw - 2rem), calc((100dvh - 7.25rem) * 390 / 844));
        height: auto;
        max-height: calc(100dvh - 7.25rem);
    }

    .wa-phone-bezel {
        aspect-ratio: 390 / 844;
        border-radius: 2.55rem;
    }
}
