/* =========================================================
   APEX GAMES CHAT
========================================================= */

* {
    box-sizing: border-box;
}

:root {
    --bg: #05070b;
    --panel: #080b10;
    --panel-2: #0b0f16;
    --panel-3: #0f141d;

    --border: #171d27;
    --border-light: #222b38;

    --text: #f5f7fb;
    --muted: #7c8798;
    --muted-2: #4f5968;

    --blue: #1677ff;
    --blue-hover: #2785ff;
    --blue-soft: rgba(22, 119, 255, 0.13);

    --online: #3bd97f;
    --away: #f0b94a;
    --dnd: #ff5c5c;
    --offline: #59616d;

    --topbar-height: 72px;
}


html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}


body {
    min-height: 100vh;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 60% -10%,
            rgba(22, 119, 255, 0.08),
            transparent 34%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;
}


button,
input,
textarea {
    font: inherit;
}



/* =========================================================
   CHAT LOADING SCREEN
========================================================= */

.chat-loader {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        #040609;

    opacity: 1;

    visibility: visible;

    transition:
        opacity 0.42s ease,
        visibility 0.42s ease;
}


.chat-loader.hidden {
    opacity: 0;

    visibility: hidden;

    pointer-events: none;
}


.chat-loader-background {
    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(22, 119, 255, 0.13),
            transparent 28%
        ),
        radial-gradient(
            circle at 15% 85%,
            rgba(22, 119, 255, 0.035),
            transparent 30%
        ),
        radial-gradient(
            circle at 88% 10%,
            rgba(22, 119, 255, 0.035),
            transparent 30%
        );

    pointer-events: none;
}


.chat-loader-content {
    position: relative;

    width: min(90vw, 420px);

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}


.chat-loader-logo-wrap {
    position: relative;

    width: 100px;
    height: 100px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 26px;
}


.chat-loader-ring {
    position: absolute;

    inset: 0;

    border:
        1px solid rgba(255, 255, 255, 0.055);

    border-top-color:
        rgba(22, 119, 255, 0.9);

    border-right-color:
        rgba(22, 119, 255, 0.24);

    border-radius: 50%;

    animation:
        apexLoaderSpin 2.4s linear infinite;
}


.chat-loader-logo-wrap::before {
    content: "";

    position: absolute;

    width: 125px;
    height: 125px;

    border-radius: 50%;

    background:
        rgba(22, 119, 255, 0.12);

    filter:
        blur(38px);

    animation:
        apexLoaderGlow 2s ease-in-out infinite;
}


.chat-loader-logo {
    position: relative;

    width: 56px;
    height: 56px;

    object-fit: contain;

    animation:
        apexLoaderLogo 1.8s ease-in-out infinite;
}


.chat-loader-brand {
    margin-bottom: 8px;

    color: var(--blue);

    font-size: 9px;
    font-weight: 900;

    letter-spacing:
        0.24em;
}


.chat-loader h1 {
    margin: 0;

    color: white;

    font-size: 27px;
    font-weight: 900;

    letter-spacing:
        -0.04em;
}


.chat-loader p {
    margin:
        9px 0 0;

    color: #697587;

    font-size: 10px;
    font-weight: 650;
}


.chat-loader-dots {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    margin-top: 15px;
}


.chat-loader-dots span {
    width: 4px;
    height: 4px;

    border-radius: 50%;

    background:
        #536071;

    animation:
        apexLoaderDot 1.25s ease-in-out infinite;
}


.chat-loader-dots span:nth-child(2) {
    animation-delay:
        0.16s;
}


.chat-loader-dots span:nth-child(3) {
    animation-delay:
        0.32s;
}


.chat-loader-progress {
    width: 160px;
    height: 2px;

    margin-top: 26px;

    overflow: hidden;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.055);
}


.chat-loader-progress span {
    display: block;

    width: 45%;
    height: 100%;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--blue),
            #68a8ff,
            transparent
        );

    animation:
        apexLoaderProgress 1.45s ease-in-out infinite;
}


.chat-loader-retry {
    min-width: 100px;
    height: 38px;

    margin-top: 24px;

    padding:
        0 18px;

    border:
        1px solid rgba(22, 119, 255, 0.45);

    border-radius: 8px;

    background:
        rgba(22, 119, 255, 0.12);

    color: white;

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}


.chat-loader-retry:hover {
    background:
        rgba(22, 119, 255, 0.22);

    border-color:
        rgba(22, 119, 255, 0.8);
}


.chat-loader-retry[hidden] {
    display: none;
}


@keyframes apexLoaderSpin {

    to {
        transform:
            rotate(360deg);
    }

}


@keyframes apexLoaderGlow {

    0%,
    100% {
        opacity: 0.55;

        transform:
            scale(0.9);
    }

    50% {
        opacity: 1;

        transform:
            scale(1.08);
    }

}


@keyframes apexLoaderLogo {

    0%,
    100% {
        transform:
            scale(0.96);

        opacity: 0.78;
    }

    50% {
        transform:
            scale(1.03);

        opacity: 1;
    }

}


@keyframes apexLoaderDot {

    0%,
    100% {
        opacity: 0.25;

        transform:
            translateY(0);
    }

    50% {
        opacity: 1;

        transform:
            translateY(-3px);
    }

}


@keyframes apexLoaderProgress {

    0% {
        transform:
            translateX(-130%);
    }

    100% {
        transform:
            translateX(330%);
    }

}



/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 100;

    height: var(--topbar-height);

    display: grid;

    grid-template-columns:
        auto minmax(0, 1fr) auto;

    align-items: center;

    gap: 30px;

    padding:
        0 28px;

    background:
        rgba(5, 7, 11, 0.94);

    border-bottom:
        1px solid var(--border);

    backdrop-filter:
        blur(18px);
}


.brand {
    display: flex;
    align-items: center;

    gap: 11px;

    color: white;

    text-decoration: none;
}


.brand-logo {
    width: 35px;
    height: 35px;

    object-fit: contain;
}


.brand-name {
    font-size: 13px;
    font-weight: 900;

    letter-spacing:
        0.13em;

    white-space: nowrap;
}



/* =========================================================
   MAIN NAV
========================================================= */

.main-nav {
    display: flex;
    align-items: center;

    gap: 5px;
}


.main-nav a {
    position: relative;

    min-height: 38px;

    display: flex;
    align-items: center;

    padding:
        0 13px;

    border-radius: 8px;

    color: #7d8795;

    text-decoration: none;

    font-size: 12px;
    font-weight: 750;

    transition:
        color 0.15s ease,
        background 0.15s ease;
}


.main-nav a:hover {
    color: white;

    background:
        rgba(255, 255, 255, 0.045);
}


.main-nav a.active {
    color: white;

    background:
        var(--blue-soft);
}


.main-nav a.active::after {
    content: "";

    position: absolute;

    left: 13px;
    right: 13px;
    bottom: -17px;

    height: 2px;

    border-radius: 99px;

    background:
        var(--blue);
}



/* =========================================================
   ACCOUNT
========================================================= */

.nav-right {
    display: flex;
    align-items: center;
}


.account-button {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 9px;

    padding:
        6px 10px 6px 7px;

    border:
        1px solid transparent;

    border-radius: 9px;

    color: white;

    text-decoration: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}


.account-button:hover {
    background:
        rgba(255, 255, 255, 0.045);

    border-color:
        var(--border-light);
}


.account-avatar-wrap {
    position: relative;

    width: 32px;
    height: 32px;

    flex:
        0 0 32px;
}


.account-avatar {
    display: block;

    width: 32px;
    height: 32px;

    object-fit: cover;

    border:
        1px solid #2b3440;

    border-radius: 50%;
}


.account-presence {
    position: absolute;

    right: -1px;
    bottom: -1px;

    width: 10px;
    height: 10px;

    border:
        2px solid #070a0e;

    border-radius: 50%;

    background:
        var(--offline);
}


.account-gamertag {
    max-width: 140px;

    overflow: hidden;

    font-size: 11px;
    font-weight: 800;

    white-space: nowrap;
    text-overflow: ellipsis;
}



/* =========================================================
   APP SHELL
========================================================= */

.chat-shell {
    position: fixed;

    top: var(--topbar-height);
    left: 0;
    right: 0;
    bottom: 0;

    display: grid;

    grid-template-columns:
        310px minmax(0, 1fr);

    overflow: hidden;
}



/* =========================================================
   CONVERSATIONS PANEL
========================================================= */

.conversations-panel {
    min-width: 0;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            #090d13,
            #070a0f
        );

    border-right:
        1px solid var(--border);
}


.conversations-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding:
        26px 18px 17px;
}


.eyebrow {
    display: block;

    margin-bottom: 5px;

    color: var(--blue);

    font-size: 8px;
    font-weight: 900;

    letter-spacing:
        0.18em;
}


.conversations-heading h1 {
    margin: 0;

    font-size: 28px;
    font-weight: 900;

    letter-spacing:
        -0.04em;
}


.new-chat-button {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid var(--border-light);

    border-radius: 9px;

    background:
        var(--panel-3);

    color: #8a95a5;

    font-size: 21px;

    cursor: pointer;

    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}


.new-chat-button:hover {
    color: white;

    border-color:
        rgba(22, 119, 255, 0.55);

    background:
        var(--blue-soft);
}



/* =========================================================
   SEARCH
========================================================= */

.search-wrap {
    position: relative;

    margin:
        0 14px;
}


.search-wrap input {
    width: 100%;
    height: 42px;

    padding:
        0 12px 0 39px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    outline: none;

    background:
        #0d1118;

    color: white;

    font-size: 11px;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}


.search-wrap input::placeholder {
    color: #566170;
}


.search-wrap input:focus {
    border-color:
        rgba(22, 119, 255, 0.55);

    background:
        #0f141d;
}


.search-icon {
    position: absolute;

    top: 50%;
    left: 13px;

    width: 15px;
    height: 15px;

    transform:
        translateY(-50%);

    color: #566170;

    pointer-events: none;
}



/* =========================================================
   FRIEND LABEL
========================================================= */

.friends-label {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin:
        20px 17px 8px;

    color: #697485;

    font-size: 9px;
    font-weight: 900;

    letter-spacing:
        0.07em;

    text-transform: uppercase;
}


.friend-count {
    min-width: 22px;

    padding:
        3px 7px;

    border:
        1px solid var(--border);

    border-radius: 999px;

    background:
        #0c1016;

    color: #687383;

    text-align: center;

    font-size: 8px;
}



/* =========================================================
   FRIEND LIST
========================================================= */

.friends-list {
    min-height: 0;

    flex: 1;

    overflow-y: auto;

    padding:
        0 8px 16px;
}


.list-state {
    padding:
        28px 12px;

    color: #596474;

    font-size: 10px;

    line-height: 1.6;

    text-align: center;
}


.friend-item {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 11px;

    padding:
        9px;

    border:
        1px solid transparent;

    border-radius: 10px;

    background:
        transparent;

    color: white;

    text-align: left;

    cursor: pointer;

    transition:
        background 0.14s ease,
        border-color 0.14s ease;
}


.friend-item:hover {
    background:
        rgba(255, 255, 255, 0.035);
}


.friend-item.active {
    background:
        rgba(22, 119, 255, 0.11);

    border-color:
        rgba(22, 119, 255, 0.25);
}


.friend-avatar-wrap {
    position: relative;

    width: 43px;
    height: 43px;

    min-width: 43px;
}


.friend-avatar {
    display: block;

    width: 43px;
    height: 43px;

    object-fit: cover;

    border:
        1px solid #28313d;

    border-radius: 11px;

    background:
        #10151c;
}


.friend-status {
    position: absolute;

    right: -2px;
    bottom: -2px;

    width: 13px;
    height: 13px;

    border:
        3px solid #090d12;

    border-radius: 50%;

    background:
        var(--offline);
}


.friend-info {
    min-width: 0;

    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 4px;
}


.friend-name {
    overflow: hidden;

    color: #f0f3f8;

    font-size: 11px;
    font-weight: 850;

    white-space: nowrap;
    text-overflow: ellipsis;
}


.friend-presence {
    overflow: hidden;

    color: #657080;

    font-size: 9px;
    font-weight: 650;

    white-space: nowrap;
    text-overflow: ellipsis;
}



/* =========================================================
   PRESENCE
========================================================= */

.online {
    background:
        var(--online);
}


.away {
    background:
        var(--away);
}


.dnd {
    background:
        var(--dnd);
}


.offline {
    background:
        var(--offline);
}



/* =========================================================
   CONVERSATION PANEL
========================================================= */

.conversation-panel {
    position: relative;

    min-width: 0;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(22, 119, 255, 0.055),
            transparent 34%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(22, 119, 255, 0.025),
            transparent 30%
        ),
        #05070b;
}



/* =========================================================
   EMPTY STATE
========================================================= */

.conversation-empty {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 40px;

    text-align: center;
}


.empty-mark {
    position: relative;

    width: 74px;
    height: 74px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 21px;

    border:
        1px solid #1f2936;

    border-radius: 19px;

    background:
        linear-gradient(
            145deg,
            #101722,
            #080c12
        );

    box-shadow:
        0 22px 70px rgba(0, 0, 0, 0.45);
}


.empty-mark::before {
    content: "";

    position: absolute;

    width: 130px;
    height: 130px;

    border-radius: 50%;

    background:
        rgba(22, 119, 255, 0.08);

    filter:
        blur(35px);

    pointer-events: none;
}


.empty-mark img {
    position: relative;

    width: 42px;
    height: 42px;

    object-fit: contain;
}


.conversation-empty h2 {
    margin: 0;

    font-size: 24px;
    font-weight: 900;

    letter-spacing:
        -0.035em;
}


.conversation-empty p {
    margin:
        8px 0 0;

    color: #707b8b;

    font-size: 11px;
}


.empty-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 8px;

    margin-top: 25px;
}


.empty-features span {
    padding:
        7px 10px;

    border:
        1px solid var(--border);

    border-radius: 7px;

    background:
        rgba(255, 255, 255, 0.018);

    color: #647081;

    font-size: 8px;
    font-weight: 800;
}



/* =========================================================
   CONVERSATION
========================================================= */

.conversation {
    width: 100%;
    height: 100%;

    display: grid;

    grid-template-rows:
        70px minmax(0, 1fr) auto;
}


.conversation[hidden] {
    display: none;
}



/* =========================================================
   CONVERSATION HEADER
========================================================= */

.conversation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding:
        0 19px;

    border-bottom:
        1px solid var(--border);

    background:
        rgba(6, 9, 14, 0.92);

    backdrop-filter:
        blur(15px);
}


.conversation-header-left {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 11px;
}


.conversation-back {
    display: none;
}


.conversation-avatar-wrap {
    position: relative;

    width: 42px;
    height: 42px;

    flex:
        0 0 42px;
}


.conversation-avatar {
    display: block;

    width: 42px;
    height: 42px;

    object-fit: cover;

    border:
        1px solid #293342;

    border-radius: 11px;

    background:
        #10151c;
}


.presence-dot {
    position: absolute;

    right: -2px;
    bottom: -2px;

    width: 13px;
    height: 13px;

    border:
        3px solid #080b10;

    border-radius: 50%;
}


.conversation-info {
    min-width: 0;
}


.conversation-info h2 {
    max-width: 380px;

    margin: 0;

    overflow: hidden;

    color: #f5f7fa;

    font-size: 13px;
    font-weight: 900;

    white-space: nowrap;
    text-overflow: ellipsis;
}


.conversation-presence {
    display: block;

    margin-top: 3px;

    color: #687485;

    font-size: 9px;
    font-weight: 700;
}


.conversation-actions {
    display: flex;

    gap: 6px;
}


.conversation-action {
    width: 37px;
    height: 37px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border:
        1px solid var(--border);

    border-radius: 9px;

    background:
        #0b1017;

    color: #707b8b;

    cursor: pointer;

    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}


.conversation-action svg {
    width: 16px;
    height: 16px;
}


.conversation-action:hover {
    color: white;

    border-color:
        rgba(22, 119, 255, 0.45);

    background:
        var(--blue-soft);
}


.more-button {
    font-size: 13px;
    font-weight: 900;

    letter-spacing:
        0.03em;
}



/* =========================================================
   MESSAGES
========================================================= */

.messages {
    min-height: 0;

    display: flex;
    flex-direction: column;

    gap: 5px;

    overflow-y: auto;

    padding:
        25px 26px 20px;

    scroll-behavior: smooth;
}


.messages-empty {
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #566170;

    text-align: center;
}


.messages-empty strong {
    color: #8390a1;

    font-size: 12px;
}


.messages-empty span {
    margin-top: 5px;

    font-size: 9px;
}


.message-row {
    width: 100%;

    display: flex;
}


.message-row.mine {
    justify-content: flex-end;
}


.message-row.theirs {
    justify-content: flex-start;
}


.message {
    max-width:
        min(70%, 650px);

    padding:
        10px 12px 8px;

    border-radius: 12px;

    font-size: 11px;

    line-height: 1.52;

    word-break: break-word;

    white-space: pre-wrap;
}


.message-row.mine .message {
    background:
        linear-gradient(
            135deg,
            #1677ff,
            #1268e6
        );

    color: white;

    border-bottom-right-radius:
        4px;

    box-shadow:
        0 8px 25px rgba(22, 119, 255, 0.12);
}


.message-row.theirs .message {
    border:
        1px solid #1b2430;

    background:
        #0c1118;

    color: #e6ebf2;

    border-bottom-left-radius:
        4px;
}


.message-time {
    display: block;

    margin-top: 5px;

    font-size: 7px;
    font-weight: 700;

    opacity: 0.55;
}



/* =========================================================
   FEATURE NOTICE
========================================================= */

.feature-notice {
    position: absolute;

    right: 18px;
    bottom: 85px;

    z-index: 30;

    max-width: 360px;

    display: flex;
    align-items: center;

    gap: 14px;

    padding:
        11px 11px 11px 13px;

    border:
        1px solid #263244;

    border-radius: 9px;

    background:
        #0e141d;

    color: #9ca7b7;

    box-shadow:
        0 18px 55px rgba(0, 0, 0, 0.5);

    font-size: 9px;
    font-weight: 700;
}


.feature-notice[hidden] {
    display: none;
}


.feature-notice button {
    border: 0;

    background:
        transparent;

    color: #707c8c;

    font-size: 18px;

    cursor: pointer;
}



/* =========================================================
   EMOJI PICKER
========================================================= */

.emoji-picker {
    position: absolute;

    left: 18px;
    bottom: 82px;

    z-index: 40;

    width: 286px;

    padding: 12px;

    border:
        1px solid #263140;

    border-radius: 12px;

    background:
        #0b1017;

    box-shadow:
        0 22px 75px rgba(0, 0, 0, 0.62);
}


.emoji-picker[hidden] {
    display: none;
}


.emoji-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;

    color: #697586;

    font-size: 8px;
}


.emoji-header strong {
    color: #a5afbd;

    font-size: 9px;
}


.emoji-grid {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    gap: 3px;
}


.emoji-item {
    width: 33px;
    height: 33px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid transparent;

    border-radius: 7px;

    background:
        transparent;

    font-size: 17px;

    cursor: pointer;
}


.emoji-item:hover {
    border-color:
        #293545;

    background:
        #121923;
}



/* =========================================================
   COMPOSER
========================================================= */

.composer {
    display: grid;

    grid-template-columns:
        auto minmax(0, 1fr);

    align-items: flex-end;

    gap: 8px;

    padding:
        12px 14px;

    border-top:
        1px solid var(--border);

    background:
        rgba(7, 10, 15, 0.96);
}


.composer-tools {
    display: flex;

    gap: 5px;
}


.composer-tool {
    width: 39px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid #202a37;

    border-radius: 9px;

    background:
        #0d1219;

    color: #788494;

    font-size: 17px;
    font-weight: 900;

    cursor: pointer;

    transition:
        color 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}


.composer-tool:hover {
    color: white;

    border-color:
        rgba(22, 119, 255, 0.42);

    background:
        var(--blue-soft);
}


.gif-button {
    font-size: 9px;

    letter-spacing:
        0.03em;
}


.message-form {
    min-width: 0;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr) auto;

    align-items: flex-end;

    gap: 8px;
}


.message-form textarea {
    width: 100%;
    min-height: 43px;
    max-height: 130px;

    resize: none;

    padding:
        13px 14px;

    border:
        1px solid #202a37;

    border-radius: 10px;

    outline: none;

    overflow-y: auto;

    background:
        #0d1219;

    color: white;

    font-size: 11px;

    line-height: 1.45;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}


.message-form textarea::placeholder {
    color: #596575;
}


.message-form textarea:focus {
    border-color:
        rgba(22, 119, 255, 0.58);

    background:
        #0f151e;
}


.send-button {
    min-width: 70px;
    height: 43px;

    padding:
        0 16px;

    border: 0;

    border-radius: 9px;

    background:
        var(--blue);

    color: white;

    font-size: 10px;
    font-weight: 850;

    cursor: pointer;

    transition:
        background 0.15s ease,
        opacity 0.15s ease,
        transform 0.15s ease;
}


.send-button:hover:not(:disabled) {
    background:
        var(--blue-hover);

    transform:
        translateY(-1px);
}


.send-button:disabled {
    opacity: 0.34;

    cursor: default;
}



/* =========================================================
   SCROLLBARS
========================================================= */

.friends-list::-webkit-scrollbar,
.messages::-webkit-scrollbar,
.message-form textarea::-webkit-scrollbar {
    width: 7px;
}


.friends-list::-webkit-scrollbar-thumb,
.messages::-webkit-scrollbar-thumb,
.message-form textarea::-webkit-scrollbar-thumb {
    background:
        #1a2330;

    border-radius: 99px;
}



/* =========================================================
   MEDIUM
========================================================= */

@media (max-width: 900px) {

    .brand-name {
        display: none;
    }


    .topbar {
        gap: 18px;

        padding:
            0 18px;
    }


    .main-nav {
        gap: 1px;
    }


    .main-nav a {
        padding:
            0 9px;

        font-size: 11px;
    }


    .account-gamertag {
        display: none;
    }


    .chat-shell {
        grid-template-columns:
            275px minmax(0, 1fr);
    }

}



/* =========================================================
   PHONE
========================================================= */

@media (max-width: 700px) {

    :root {
        --topbar-height: 60px;
    }


    .topbar {
        display: flex;
        justify-content: space-between;

        gap: 12px;

        padding:
            0 14px;
    }


    .brand-logo {
        width: 32px;
        height: 32px;
    }


    .brand-name {
        display: inline;

        font-size: 10px;
    }


    .main-nav {
        display: none;
    }


    .account-button {
        padding: 4px;
    }


    .account-avatar-wrap,
    .account-avatar {
        width: 34px;
        height: 34px;
    }


    .account-avatar-wrap {
        flex-basis: 34px;
    }


    .chat-shell {
        display: block;
    }


    .conversations-panel {
        width: 100%;
        height: 100%;
    }


    .conversation-panel {
        display: none;

        position: absolute;

        inset: 0;

        z-index: 20;

        width: 100%;
        height: 100%;
    }


    .chat-shell.mobile-conversation-open
    .conversations-panel {
        display: none;
    }


    .chat-shell.mobile-conversation-open
    .conversation-panel {
        display: block;
    }


    .conversation-back {
        width: 36px;
        height: 36px;

        display: flex;
        align-items: center;
        justify-content: center;

        padding: 0;

        border:
            1px solid var(--border);

        border-radius: 9px;

        background:
            #0c1118;

        color: #9aa5b5;

        font-size: 17px;

        cursor: pointer;
    }


    .conversation-header {
        padding:
            0 12px;
    }


    .conversation-header-left {
        gap: 8px;
    }


    .conversation-avatar-wrap,
    .conversation-avatar {
        width: 38px;
        height: 38px;
    }


    .conversation-avatar-wrap {
        flex-basis: 38px;
    }


    .conversation-info h2 {
        max-width: 145px;
    }


    .messages {
        padding:
            20px 13px 15px;
    }


    .message {
        max-width: 84%;
    }


    .composer {
        grid-template-columns:
            auto minmax(0, 1fr);

        padding:
            9px;
    }


    .composer-tools {
        gap: 3px;
    }


    .composer-tool {
        width: 35px;
        height: 42px;
    }


    .message-form {
        gap: 6px;
    }


    .send-button {
        min-width: 58px;

        padding:
            0 11px;
    }


    .emoji-picker {
        left: 8px;
        right: 8px;
        bottom: 72px;

        width: auto;
    }


    .emoji-grid {
        grid-template-columns:
            repeat(7, 1fr);
    }


    .emoji-item {
        width: 100%;
    }


    .feature-notice {
        left: 10px;
        right: 10px;
        bottom: 74px;

        max-width: none;
    }

}



/* =========================================================
   VERY SMALL PHONE
========================================================= */

@media (max-width: 430px) {

    .brand-name {
        font-size: 9px;
    }


    .conversations-heading {
        padding:
            22px 15px 15px;
    }


    .conversations-heading h1 {
        font-size: 26px;
    }


    .conversation-actions {
        gap: 4px;
    }


    .conversation-action {
        width: 34px;
        height: 34px;
    }


    .gif-button {
        display: none;
    }


    .message {
        max-width: 88%;
    }

}



/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration:
            0.001ms !important;

        animation-duration:
            0.001ms !important;
    }

}
