/* SOC MESSAGES CENTER V7.1 2026-08-12 */

.soc-messages-panel {
    min-height: 0;
}

#moderatorMessagesMount {
    min-height: 0;
}

.moderator-messages-shell {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 14px;
    min-height: 590px;
    height: calc(100vh - 190px);
    max-height: 820px;
}

.modmail-sidebar,
.modmail-thread {
    min-height: 0;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(8,10,16,.9);
    border-radius: 18px;
    overflow: hidden;
}

.modmail-sidebar {
    display: grid;
    grid-template-rows: auto auto minmax(0,1fr);
}

.modmail-toolbar {
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.modmail-toolbar strong,
.modmail-thread-title strong {
    display: block;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .02em;
}

.modmail-toolbar small,
.modmail-thread-title small {
    display: block;
    color: rgba(255,255,255,.55);
    margin-top: 4px;
}

.modmail-search {
    width: 100%;
    margin-top: 12px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.04);
    color: #fff;
    padding: 0 12px;
    outline: none;
}

.modmail-search:focus {
    border-color: rgba(137,92,255,.7);
    box-shadow: 0 0 0 3px rgba(137,92,255,.12);
}

.modmail-tabs {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.modmail-tab {
    min-width: 0;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.045);
    color: rgba(255,255,255,.68);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.modmail-tab.active {
    color: #fff;
    background: linear-gradient(135deg,rgba(116,73,255,.85),rgba(190,69,255,.68));
}

.modmail-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
}

.modmail-empty {
    display: grid;
    place-items: center;
    min-height: 220px;
    color: rgba(255,255,255,.5);
    text-align: center;
    padding: 30px;
}

.modmail-item {
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px;
    margin-bottom: 6px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.modmail-item:hover {
    background: rgba(255,255,255,.045);
}

.modmail-item.active {
    border-color: rgba(143,91,255,.45);
    background: rgba(119,70,255,.12);
}

.modmail-item.has-new {
    background: rgba(35,197,94,.06);
}

.modmail-avatar,
.modmail-thread-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    overflow: hidden;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.modmail-avatar img,
.modmail-thread-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modmail-item-copy {
    min-width: 0;
}

.modmail-item-line {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.modmail-item-name {
    font-size: 13px;
    font-weight: 900;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.modmail-source,
.modmail-status,
.modmail-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .04em;
}

.modmail-source.gz {
    background: rgba(181,75,255,.14);
    color: #dcadff;
}

.modmail-source.gb {
    background: rgba(35,174,255,.13);
    color: #8fdcff;
}

.modmail-new-badge {
    background: rgba(34,197,94,.15);
    color: #79f2a4;
}

.modmail-status.pending {
    background: rgba(245,158,11,.15);
    color: #ffd27a;
}

.modmail-status.closed {
    background: rgba(148,163,184,.13);
    color: #cbd5e1;
}

.modmail-status.open {
    background: rgba(34,197,94,.12);
    color: #8ef0ae;
}

.modmail-item-preview {
    margin-top: 5px;
    color: rgba(255,255,255,.55);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modmail-item-meta {
    color: rgba(255,255,255,.35);
    font-size: 10px;
    text-align: right;
}

.modmail-thread {
    display: grid;
    grid-template-rows: auto auto minmax(0,1fr) auto;
}

.modmail-thread-empty {
    display: grid;
    place-items: center;
    height: 100%;
    color: rgba(255,255,255,.45);
    text-align: center;
    padding: 30px;
}

.modmail-thread-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.modmail-thread-person {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.modmail-thread-title {
    min-width: 0;
}

.modmail-thread-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.modmail-action {
    min-height: 34px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;
    background: rgba(255,255,255,.045);
    color: #fff;
    padding: 0 10px;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
}

.modmail-action.primary {
    border-color: rgba(126,80,255,.5);
    background: rgba(126,80,255,.18);
}

.modmail-action.done {
    border-color: rgba(34,197,94,.35);
    color: #95f1b3;
}

.modmail-action.release {
    color: rgba(255,255,255,.6);
}

.modmail-contextbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    padding: 9px 15px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.02);
    color: rgba(255,255,255,.55);
    font-size: 10px;
}

.modmail-contextbar strong {
    color: rgba(255,255,255,.82);
}

.modmail-messages {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
}

.modmail-message-row {
    display: flex;
    margin-bottom: 10px;
}

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

.modmail-bubble {
    max-width: min(74%,720px);
    border-radius: 14px 14px 14px 4px;
    background: rgba(255,255,255,.065);
    border: 1px solid rgba(255,255,255,.07);
    padding: 10px 12px;
}

.modmail-message-row.moderator .modmail-bubble {
    border-radius: 14px 14px 4px 14px;
    background: linear-gradient(135deg,rgba(93,58,205,.32),rgba(125,57,157,.25));
    border-color: rgba(151,95,255,.25);
}

.modmail-bubble-head {
    display: flex;
    gap: 7px;
    align-items: center;
    margin-bottom: 5px;
    color: rgba(255,255,255,.55);
    font-size: 9px;
    font-weight: 800;
}

.modmail-bubble-head strong {
    color: rgba(255,255,255,.82);
}

.modmail-bubble-content {
    color: #fff;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.modmail-composer {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 9px;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.07);
    background: rgba(4,6,11,.97);
}

.modmail-composer textarea {
    resize: none;
    min-height: 48px;
    max-height: 130px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.045);
    color: #fff;
    padding: 12px;
    font: inherit;
    outline: none;
}

.modmail-composer textarea:focus {
    border-color: rgba(137,92,255,.65);
}

.modmail-send {
    min-width: 94px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg,#7446ff,#ad42f5);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.modmail-send:disabled,
.modmail-action:disabled {
    opacity: .45;
    cursor: wait;
}

@media (max-width: 1100px) {
    .moderator-messages-shell {
        grid-template-columns: 300px minmax(0,1fr);
    }
}
