/* GameSpec sidebar should never cover the pre-generation chat column. */
@media (min-width: 1000px) {
    .inspire-view.has-profile-sidebar {
        --gamespec-sidebar-width: clamp(260px, 17vw, 320px);
        --gamespec-sidebar-gap: clamp(32px, 3.4vw, 72px);
        --gamespec-sidebar-edge: clamp(0.75rem, 1.25vw, 1.5rem);
        --profile-chat-stage-width: min(820px, calc(100vw - var(--gamespec-sidebar-width) - var(--gamespec-sidebar-gap) - var(--gamespec-sidebar-edge) - clamp(96px, 10vw, 220px)));
    }

    .inspire-view.has-profile-sidebar .chat-profile-sidebar {
        box-sizing: border-box;
        width: var(--gamespec-sidebar-width) !important;
        min-width: 0 !important;
        max-width: var(--gamespec-sidebar-width) !important;
        right: var(--gamespec-sidebar-edge) !important;
        overflow-x: hidden;
    }

    .inspire-view.has-profile-sidebar .chat-profile-sidebar *,
    .inspire-view.has-profile-sidebar .inspire-profile-card,
    .inspire-view.has-profile-sidebar .gamespec-sidebar-card {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
    }

    .inspire-view.has-profile-sidebar .chat-history {
        --chat-stage-width: var(--profile-chat-stage-width) !important;
        padding-right: calc(var(--gamespec-sidebar-width) + var(--gamespec-sidebar-gap) + var(--gamespec-sidebar-edge)) !important;
    }

    .inspire-view.has-profile-sidebar .chat-message,
    .inspire-view.has-profile-sidebar .chat-options-container {
        width: var(--profile-chat-stage-width) !important;
        max-width: var(--profile-chat-stage-width) !important;
        margin-left: auto !important;
        margin-right: 0 !important;
    }

    .inspire-view.has-profile-sidebar .chat-message.user {
        align-self: flex-end !important;
    }

    .inspire-view.has-profile-sidebar .user .chat-bubble {
        max-width: min(100%, 620px) !important;
    }

    .inspire-view.has-profile-sidebar .chat-input-wrapper {
        padding-right: calc(var(--gamespec-sidebar-width) + var(--gamespec-sidebar-gap) + var(--gamespec-sidebar-edge)) !important;
    }

    .inspire-view.has-profile-sidebar .chat-input-bar.unified-pill {
        width: min(100%, var(--profile-chat-stage-width)) !important;
        max-width: var(--profile-chat-stage-width) !important;
        margin-left: auto !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 999px) {
    .inspire-view.has-profile-sidebar .chat-profile-sidebar {
        display: none !important;
    }
}
