.chat-workspace {
    display: grid;
    grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr) minmax(14rem, 21rem);
    min-height: min(76vh, 58rem);
    width: min(100%, 94rem);
    margin-inline: auto;
    border: 1px solid #342936;
    border-radius: 20px;
    overflow: hidden;
    background: #151118;
    color: #f6edf6;
}

.chat-title,.chat-header h2,.chat-call h2 {
    margin: 0;
    color: #fff4fb;
    font-size: 1.15rem;
}

.chat-sidebar,.chat-call {
    background: #1c161e;
    padding: 1rem;
}

.chat-sidebar {
    border-right: 1px solid #342936;
}

.chat-call {
    border-left: 1px solid #342936;
}

.chat-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #342936;
}

.chat-header p,.chat-call p,.chat-empty {
    margin: .5rem 0;
    color: #c3b4c6;
    font-size: .88rem;
}

.chat-channels,.chat-settings form {
    display: grid;
    gap: .45rem;
    margin-top: 1rem;
}

.chat-channels a {
    display: flex;
    align-items: center;
    gap: .65rem;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: .65rem .7rem;
    color: #d5c6d6;
    text-decoration: none;
}

.chat-channels a[aria-current],.chat-channels a:hover {
    background: #322239;
    border-color: #55405a;
    color: #fff3fa;
}

.chat-settings {
    margin-top: 1.25rem;
}

.chat-settings summary {
    cursor: pointer;
    color: #ecd1e7;
}

.chat-settings form,.chat-report {
    font-size: .85rem;
    padding: .65rem;
    border: 1px solid #362b3b;
    border-radius: 8px;
    margin: .65rem 0;
}

.chat-settings label {
    display: grid;
    gap: .2rem;
}

.chat-settings .chat-check {
    display: flex;
    align-items: center;
}

.chat-settings input:not([type=checkbox]),.chat-composer textarea {
    border: 1px solid #4d3e51;
    border-radius: 8px;
    background: #231b26;
    color: inherit;
    padding: .45rem;
    width: 100%;
    font: inherit;
}

.chat-main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(17rem, 1fr) auto;
}

.chat-stream {
    height: clamp(21rem,56vh,45rem);
    overflow: auto;
    padding: .75rem 1.2rem;
    overscroll-behavior: contain;
}

.chat-messages,.chat-participants {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chat-message {
    padding: .75rem 0;
    border-bottom: 1px solid #2e2531;
    min-width: 0;
}

.chat-message header {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}

.chat-message time {
    color: #b4a6b8;
    font-size: .77rem;
}

.chat-message p {
    margin: .25rem 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-message audio,.chat-composer audio {
    width: min(100%,21rem);
    height: 34px;
    margin-top: .4rem;
}

.chat-message button {
    font: inherit;
    font-size: .75rem;
    background: none;
    color: #cab6cc;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
    margin-left: auto;
}

.chat-composer {
    padding: .8rem 1.2rem;
    border-top: 1px solid #342936;
}

.chat-composer textarea {
    resize: vertical;
    min-height: 3.3rem;
}

.chat-compose-actions,.chat-call-actions {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}

.chat-compose-actions {
    justify-content: space-between;
}

.chat-participants li {
    padding: .55rem 0;
    border-bottom: 1px solid #342936;
    overflow-wrap: anywhere;
}

.chat-share article {
    margin-top: .7rem;
    overflow: hidden;
    border-radius: 10px;
    background: #100e12;
}

.chat-share h3 {
    margin: .5rem;
    color: #e8cee6;
    font-size: .85rem;
}

.chat-share video {
    max-width: 100%;
    display: block;
}

.chat-notice {
    grid-column: 1/-1;
    margin: 0;
    padding: .65rem 1rem;
    background: #3a2540;
    color: #fff0fd;
}

.chat-workspace [hidden] {
    display: none!important;
}

@media(max-width:980px) {
    .chat-workspace {
        grid-template-columns: minmax(10rem, 14rem) minmax(0,1fr);
    }
    .chat-call {
        grid-column: 1/-1;
        border-left: 0;
        border-top: 1px solid #342936;
    }
    .chat-share {
        display: grid;
        grid-template-columns: repeat(auto-fit,minmax(12rem,1fr));
        gap: .5rem;
    }
}

@media(max-width:570px) {
    .chat-workspace {
        grid-template-columns: minmax(0,1fr);
    }
    .chat-sidebar {
        border-right: 0;
        border-bottom: 1px solid #342936;
    }
    .chat-channels {
        display: flex;
        flex-wrap: wrap;
        margin-top: .55rem;
    }
    .chat-channels a {
        padding: .35rem .5rem;
    }
    .chat-stream,.chat-header,.chat-composer {
        padding-inline: .75rem;
    }
}


.chat-workspace {
    grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr);
    min-height: min(80vh, 58rem);
    background: #100d12;
}
.chat-sidebar {
    display: flex;
    flex-direction: column;
    padding: .8rem;
    background: #19141b;
}
.chat-title {
    padding: .45rem .4rem .8rem;
    border-bottom: 1px solid #342936;
}
.chat-main {
    grid-template-rows: auto auto minmax(16rem, 1fr) auto;
}
.chat-header {
    background: #171219;
}
.chat-header h2 {
    font-size: 1rem;
}
.chat-channels {
    margin-top: .6rem;
}
.chat-channels a {
    padding: .5rem .65rem;
}
.chat-call {
    margin-top: auto;
    border: 0;
    border-top: 1px solid #3c2d40;
    padding: .85rem .3rem .6rem;
    background: transparent;
}
.chat-call h2 {
    font-size: .9rem;
}
.chat-account {
    display: flex;
    gap: .45rem;
    align-items: center;
    justify-content: space-between;
    padding: .65rem .25rem .25rem;
    border-top: 1px solid #3c2d40;
}
.chat-profile-link {
    display: flex;
    gap: .5rem;
    align-items: center;
    min-width: 0;
    color: #f5eaf5;
    text-decoration: none;
}
.chat-profile-link span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-profile-link small {
    display: block;
    color: #bcaabd;
    font-size: .73rem;
}
.chat-avatar, .profile-photo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-avatar {
    display: grid;
    place-items: center;
    flex: none;
    color: #ffdef5;
    background: #3c2440;
    font-size: .75rem;
    font-weight: 700;
}
.chat-message {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    align-items: start;
    gap: .65rem;
    border: 0;
    border-radius: 10px;
    padding: .65rem .35rem;
}
.chat-message:hover {
    background: #1b151e;
}
.chat-message header strong {
    color: #efd0e8;
}
.chat-message-content {
    min-width: 0;
}
.chat-message-pending .chat-message-content {
    color: #c8b7c8;
}
.chat-delivery {
    color: #b7a5bc;
    font-size: .7rem;
}
.chat-msg-notice {
    color: #efd0e8;
}
.chat-share {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: .5rem;
    padding-inline: .8rem;
}
.chat-share:empty {
    display: none;
}
.chat-share video {
    max-height: 34vh;
}
.chat-composer {
    margin: .4rem .7rem .75rem;
    padding: .55rem;
    border: 1px solid #443249;
    border-radius: 12px;
    background: #1d1521;
}
.chat-composer textarea {
    border: 0;
    background: transparent;
}
.chat-dialog {
    width: min(28rem, calc(100vw - 2rem));
    max-height: 90vh;
    color: #f6edf6;
    border-radius: 15px;
    border: 1px solid #523957;
    background: #211824;
}
.chat-dialog::backdrop {
    background: #0c0811bf;
}
.chat-voice-form {
    display: grid;
    gap: .6rem;
}
.chat-voice-form h2 {
    margin: 0 0 .4rem;
}
.chat-voice-form select {
    background: #2b2130;
    color: inherit;
    border: 1px solid #58415d;
    border-radius: 8px;
    padding: .45rem;
}
.chat-option {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.chat-dialog-actions {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
}
.profile-photo {
    width: 48px;
    height: 48px;
}
@media (max-width: 655px) {
    .chat-workspace {
        grid-template-columns: minmax(0, 1fr);
    }
    .chat-sidebar {
        border-right: 0;
    }
    .chat-channels {
        display: flex;
        flex-wrap: wrap;
    }
    .chat-account {
        justify-content: flex-start;
    }
    .chat-call {
        padding-top: .65rem;
    }
}

.chat-main {
    height: clamp(32rem, 76vh, 58rem);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.chat-main > .chat-header { grid-row: 1; }
.chat-main > .chat-stage { grid-row: 2; }
.chat-main > .chat-stream { grid-row: 3; }
.chat-main > .chat-composer { grid-row: 4; }
.chat-stream {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.chat-stream > * { flex: none; }
.chat-stream [data-chat-older] { align-self: flex-start; }
.chat-stream > .chat-messages { margin-top: auto; }

.chat-mic-meter meter {
    display: block;
    width: 100%;
    margin-top: .25rem;
}

.chat-participants .chat-speaking {
    color: #b6efc8;
}

.chat-header-tools {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}
.chat-header-tools > div { min-width: 0; overflow-wrap: anywhere; }
.chat-header-tools > .button { flex: 0 0 auto; }
.chat-reply-preview,
.chat-message-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}
.chat-reply-preview {
    justify-content: space-between;
    gap: .55rem;
    color: #e9cbe8;
    font-size: .83rem;
    padding-bottom: .4rem;
}
.chat-message-actions button,
.chat-message button.chat-reply {
    margin: 0;
    padding: .18rem .42rem;
    border: 1px solid #443349;
    border-radius: 6px;
    background: #231a27;
    color: #ecd3ec;
    text-decoration: none;
    min-height: 28px;
}
.chat-message button.chat-reply {
    max-width: 100%;
    margin: .25rem 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}
.chat-message-actions button:hover,
.chat-message-actions button[aria-pressed=true],
.chat-message .chat-reply:hover {
    background: #4a2b52;
    border-color: #9f619a;
}
.chat-message-actions .chat-reaction {
    min-width: 31px;
}
.chat-message.chat-first-unread {
    position: relative;
    border-top: 1px solid #b45c80;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: .55rem;
}
.chat-first-unread::before {
    content: 'Okunmamış';
    color: #ffafcb;
    grid-column: 1 / -1;
    font-size: .72rem;
}
.chat-message.chat-jump { background: #3c233f; }
.chat-search-dialog h2 { margin: 0 0 .75rem; }
.chat-search-dialog form[data-chat-search-form] { display: flex; gap: .55rem; }
.chat-search-dialog input {
    min-width: 0;
    flex: 1 1 auto;
    border: 1px solid #604465;
    border-radius: 8px;
    padding: .55rem;
    color: #f6edf6;
    background: #2a1e2d;
}
.chat-search-results {
    list-style: none;
    max-height: 45vh;
    overflow: auto;
    padding: 0;
    display: grid;
    gap: .45rem;
}
.chat-search-results button {
    display: block;
    width: 100%;
    border: 1px solid #5b3e62;
    border-radius: 8px;
    padding: .5rem;
    color: #f6edf6;
    background: #352539;
    text-align: left;
    overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) {
    .chat-message-actions { opacity: .48; }
    .chat-message:hover .chat-message-actions,
    .chat-message:focus-within .chat-message-actions { opacity: 1; }
}
@media (max-width: 430px) {
    .chat-header-tools { flex-wrap: wrap; }
    .chat-message-actions { gap: .25rem; }
}

.chat-stage {
    min-width: 0;
    max-height: 42vh;
    overflow: auto;
    border-bottom: 1px solid #39253d;
    background: #100e15;
    padding: .65rem .8rem .8rem;
}
.chat-stage-header,
.chat-cast header,
.chat-cast-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .45rem;
}
.chat-stage-header h2 { margin: 0; font-size: .92rem; }
.chat-stage-header p { color: #bda9c0; font-size: .73rem; margin: .15rem 0 0; }
.chat-stage .chat-share {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    align-items: start;
    padding: 0;
}
.chat-stage .chat-cast {
    border: 1px solid #3c2a43;
    min-width: 0;
    padding: .4rem;
    background: #17111c;
}
.chat-cast header { padding-inline: .35rem; }
.chat-cast h3 { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.chat-cast-state {
    color: #f5b5d8;
    font-size: .72rem;
}
.chat-stage .chat-cast video {
    width: 100%;
    margin: .35rem 0;
    border-radius: 6px;
    background: #09070e;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    max-height: 25vh;
}
.chat-cast-actions { justify-content: flex-start; }
.chat-cast-actions button {
    background: #2d2035;
    color: #f2deee;
    border: 1px solid #594461;
    border-radius: 6px;
    padding: .28rem .42rem;
    min-height: 28px;
    font-size: .75rem;
}
.chat-cast-actions button:hover { background: #4a2d4d; }
.chat-cast-actions button:disabled { opacity: .60; cursor: default; }
.chat-stage-expanded { max-height: min(57vh, 30rem); }
.chat-stage-expanded .chat-cast video { max-height: 40vh; }
.chat-stage .chat-cast-focus { grid-column: 1 / -1; order: -1; }
.chat-stage .chat-cast:fullscreen {
    background: #100e15;
    display: flex;
    flex-direction: column;
    padding: .85rem;
}
.chat-stage .chat-cast:fullscreen video {
    flex: 1;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
}
.chat-voice-form h3 { margin: .3rem 0 0; font-size: .98rem; }
