.conference-chat [hidden] {
    display: none !important;
}

.conference-chat-floating {
    position: fixed;
    z-index: 1040;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: min(27rem, calc(100vw - 2rem));
    pointer-events: none;
    text-align: right;
}

.conference-chat-floating > * {
    pointer-events: auto;
}

.chat-launcher {
    max-width: 100%;
    box-shadow: 0 6px 20px rgba(16, 36, 56, .22);
}

.conference-chat-page {
    max-width: 45rem;
    margin: 1.5rem auto;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    max-height: min(42rem, 85vh);
    overflow: auto;
    text-align: left;
    color: #142d43;
    background: #fff;
    border: 1px solid #d6e0e8;
    border-radius: .9rem;
    box-shadow: 0 12px 36px rgba(16, 36, 56, .16);
}

.chat-header, .chat-composer {
    padding: .85rem 1rem;
}

.chat-header {
    border-bottom: 1px solid #d6e0e8;
}

.chat-title {
    margin: 0;
    font-size: 1.2rem;
    overflow-wrap: anywhere;
}

.chat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}

.chat-status {
    margin: .5rem 1rem;
}

.chat-status:empty {
    display: none;
}

.chat-messages {
    flex: 1 1 20rem;
    min-height: 4rem;
    overflow-y: auto;
    margin: 0;
    padding: .75rem 1rem;
    list-style: none;
}

.chat-messages li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: .75rem;
    overflow-wrap: anywhere;
}

.chat-messages li p {
    margin: .2rem 0 0;
    white-space: pre-wrap;
}

.chat-messages time {
    margin-left: .4rem;
    font-size: .75rem;
    color: #415c72;
}

.chat-avatar {
    position: relative;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #e5f0f9;
    font-size: .75rem;
    font-weight: 700;
}

.chat-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-composer {
    border-top: 1px solid #d6e0e8;
}

.chat-identity {
    margin: 0 0 .4rem;
    font-weight: 600;
}

.chat-composer textarea {
    display: block;
    width: 100%;
    margin-bottom: .5rem;
    padding: .4rem .55rem;
    color: inherit;
    border: 1px solid #667c90;
    border-radius: .4rem;
}
