.guest-chat-shell {
    min-height: 100vh;
    background: #0f141b;
    color: #f4f7fb;
}

.guest-chat-main {
    min-height: 100vh;
}

.guest-join {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.guest-join-panel {
    width: min(100%, 420px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 28px;
    background: #161d26;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.guest-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    font-weight: 700;
}

.guest-join h1 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.guest-chat-room {
    position: relative;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    background: #0f141b;
}

.guest-chat-alert {
    position: absolute;
    top: 14px;
    left: min(340px, 34vw);
    right: 18px;
    z-index: 10;
}

.guest-chat-shell .guest-chat-room {
    height: 100vh;
}

.guest-chat-sidebar {
    min-height: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: #141b24;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.guest-chat-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c8d3df;
    text-decoration: none;
}

.guest-chat-person {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.guest-chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

.guest-chat-person h1 {
    font-size: 1.08rem;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guest-chat-person p {
    margin: 2px 0 0;
    color: #91a0b3;
    overflow-wrap: anywhere;
    font-size: 0.9rem;
}

.guest-chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aab7c7;
    font-size: 0.9rem;
}

.presence-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #64748b;
}

.presence-dot.online {
    background: #22c55e;
}

.guest-chat-pane {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #101720;
}

.guest-chat-header {
    min-height: 64px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.guest-chat-messages {
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guest-message {
    display: flex;
}

.guest-message-own {
    justify-content: flex-end;
}

.guest-message-bubble {
    width: fit-content;
    max-width: min(720px, 78%);
    border-radius: 8px;
    padding: 10px 12px;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.guest-message-own .guest-message-bubble {
    background: #174ea6;
}

.guest-message-meta {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    margin-bottom: 4px;
}

.guest-message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.guest-message-read {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
    text-align: right;
}

.guest-chat-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #141b24;
}

.guest-chat-compose textarea {
    min-height: 44px;
    max-height: 140px;
    resize: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0f141b;
    color: #f8fafc;
    padding: 10px 12px;
    outline: none;
}

.guest-chat-compose textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

@media (max-width: 760px) {
    .guest-chat-room {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .guest-chat-alert {
        left: 12px;
        right: 12px;
    }

    .guest-chat-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 12px 14px;
        gap: 10px;
    }

    .guest-chat-sidebar form {
        display: none;
    }

    .guest-chat-person h1 {
        font-size: 1rem;
    }

    .guest-chat-messages {
        padding: 12px;
    }

    .guest-message-bubble {
        max-width: 88%;
    }
}
