.event-chat-body .ms-stars {
    display: none;
}

.event-chat-body {
    overflow: hidden;
}

.event-chat-screen .event-dashboard-inner {
    width: min(100% - 1.25rem, 640px);
    height: 100%;
    min-height: 0;
}

.event-chat-screen {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding-bottom: env(safe-area-inset-bottom);
}

.event-chat-screen .event-dashboard-header {
    height: clamp(8rem, 18vh, 11rem);
    margin-bottom: .35rem;
}

.event-chat-screen .event-dashboard-topbar {
    left: max(.625rem, calc((100vw - 640px) / 2));
}

.event-chat-window {
    display: flex;
    min-height: 0;
    flex: 1 1 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(224, 218, 208, .22);
    border-radius: 1.1rem;
    background: rgba(9, 14, 20, .82);
    box-shadow: 0 18px 54px rgba(0, 0, 0, .38);
    backdrop-filter: blur(10px);
}

.event-chat-room-bar {
    display: flex;
    min-height: 4.15rem;
    align-items: center;
    gap: .7rem;
    padding: .65rem .9rem;
    border-bottom: 1px solid rgba(224, 218, 208, .16);
    background: rgba(24, 33, 40, .92);
}

.event-chat-room-avatar {
    display: block;
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 auto;
    border: 1px solid rgba(220, 204, 177, .4);
    border-radius: 50%;
    background-color: rgba(7, 13, 22, .7);
    background-image: url("../images/swing-resolution/portal-icons.png");
    background-position: 50% 0;
    background-repeat: no-repeat;
    background-size: 300% 300%;
}

.event-chat-room-bar h2 {
    margin: 0;
    color: #f4f2ed;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.portal-chat.event-chat-messages {
    display: flex;
    height: auto;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: .42rem;
    overflow-y: auto;
    padding: .8rem;
    border-radius: 0;
    background: rgba(5, 9, 15, .24);
    overscroll-behavior: contain;
    scrollbar-color: rgba(220, 204, 177, .42) transparent;
}

.event-chat-message-row {
    display: flex;
    width: 100%;
    align-items: flex-end;
    gap: .42rem;
}

.event-chat-message-row.is-mine {
    flex-direction: row-reverse;
}

.event-chat-message-avatar {
    display: block;
    width: 1.85rem;
    height: 1.85rem;
    flex: 0 0 1.85rem;
    border: 1px solid rgba(220, 204, 177, .34);
    border-radius: 50%;
    background: #182126;
    object-fit: cover;
}

.event-chat-message-avatar--initial {
    display: grid;
    place-items: center;
    color: #f1e5ce;
    font-size: .72rem;
    font-weight: 750;
}

.event-chat-messages .portal-message {
    max-width: min(78%, 34rem);
    min-width: 0;
    padding: .48rem .68rem .52rem;
    border: 1px solid rgba(255, 255, 255, .035);
    border-radius: .9rem .9rem .9rem .2rem;
    background: #263238;
    color: #f2f5f4;
    font-size: .89rem;
    line-height: 1.42;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .15);
}

.event-chat-messages .portal-message.mine {
    align-self: flex-end;
    border-color: rgba(120, 220, 190, .08);
    border-radius: .9rem .9rem .2rem .9rem;
    background: #075e54;
    color: #effbf7;
}

.event-chat-messages .portal-message small {
    display: block;
    margin: 0 0 .2rem;
    color: #b7c2be;
    font-size: .63rem;
    font-weight: 650;
    line-height: 1.15;
}

.event-chat-messages .portal-message.mine small {
    color: rgba(231, 255, 247, .68);
    text-align: right;
}

.event-chat-status {
    min-height: 0;
    margin: 0;
    padding: 0 .85rem;
    color: #bec7c4;
    font-size: .76rem;
    line-height: 1.4;
    text-align: center;
}

.event-chat-status:not(:empty) {
    padding-top: .45rem;
    padding-bottom: .25rem;
}

.event-chat-composer {
    display: flex;
    align-items: flex-end;
    gap: .55rem;
    margin: 0;
    padding: .65rem .7rem;
    border-top: 1px solid rgba(224, 218, 208, .14);
    background: rgba(24, 33, 40, .96);
}

.event-chat-composer #chat-body {
    min-height: 2.75rem;
    max-height: 7rem;
    flex: 1;
    resize: vertical;
    padding: .65rem 1rem;
    border: 1px solid #3d494d;
    border-radius: 1.5rem;
    background: #202a2e;
    color: #f4f6f5;
    font-size: 1rem;
    line-height: 1.35;
    box-shadow: none;
}

.event-chat-composer #chat-body::placeholder {
    color: #aeb9b6;
}

.event-chat-composer #chat-body:focus {
    border-color: #6fae9e;
    box-shadow: 0 0 0 .15rem rgba(37, 155, 126, .18);
}

.event-chat-composer button {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #00a884;
    color: #f4fffb;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    transition: background-color .16s ease, transform .16s ease;
}

.event-chat-composer button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #11b895;
}

.event-chat-composer button:disabled {
    opacity: .55;
}

.event-chat-signin-wrap {
    padding: .75rem;
    border-top: 1px solid rgba(224, 218, 208, .14);
    background: rgba(24, 33, 40, .96);
}

.event-chat-signin {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 168, 132, .65);
    border-radius: 1.5rem;
    background: rgba(0, 168, 132, .12);
    color: #d9fff4;
    font-size: .9rem;
    font-weight: 650;
    text-decoration: none;
}

.event-chat-signin:hover {
    background: rgba(0, 168, 132, .22);
    color: #fff;
}

.event-chat-screen a:focus-visible,
.event-chat-screen button:focus-visible,
.event-chat-screen textarea:focus-visible {
    outline: 3px solid #e5c56d;
    outline-offset: 3px;
}

@media (min-width: 760px) {
    .event-chat-screen .event-dashboard-inner {
        width: min(100% - 2rem, 760px);
    }

    .event-chat-screen .event-dashboard-topbar {
        left: max(1rem, calc((100vw - 760px) / 2));
    }

    .portal-chat.event-chat-messages {
        padding: 1rem 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-chat-composer button {
        transition: none;
    }
}
