/* ── Chat da Comunidade (home) ── */
.chat-card {
    background: var(--bns-surface);
    border: 1px solid var(--bns-border);
    border-radius: var(--bns-radius);
    box-shadow: var(--bns-shadow-sm);
    overflow: hidden;
}

.chat-header {
    align-items: center;
    background: var(--bns-bg-accent);
    border-bottom: 1px solid var(--bns-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
}

.chat-header-title {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.chat-header-title .material-icons {
    align-items: center;
    background: var(--bns-accent-soft);
    border-radius: 10px;
    color: var(--bns-accent);
    display: flex;
    font-size: 1.3rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.chat-header-title h5 {
    color: var(--bns-text);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.chat-header-title p {
    color: var(--bns-text-muted);
    font-size: 0.78rem;
    margin: 0;
}

.chat-online-badge {
    align-items: center;
    background: var(--bns-green-soft);
    border: 1px solid rgba(7, 133, 7, 0.35);
    border-radius: 999px;
    color: #4ade80;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    white-space: nowrap;
}

.chat-online-dot {
    animation: chat-pulse 2s infinite;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    height: 8px;
    width: 8px;
}

@keyframes chat-pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Layout em duas colunas */
.chat-layout {
    display: grid;
    grid-template-columns: 1fr 230px;
}

.chat-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

/* Mensagens */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 420px;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(var(--bns-accent-rgb), 0.35);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--bns-accent-rgb), 0.55);
}

.chat-loading,
.chat-empty {
    color: var(--bns-text-muted);
    font-size: 0.85rem;
    margin: auto;
    text-align: center;
}

.chat-message {
    border-radius: var(--bns-radius-sm);
    display: flex;
    gap: 0.7rem;
    padding: 0.45rem 0.6rem;
    position: relative;
    transition: background var(--bns-transition);
}

.chat-message:hover {
    background: var(--bns-surface-hover);
}

.chat-message-avatar {
    background: var(--bns-bg-accent);
    border: 2px solid var(--bns-border);
    border-radius: 50%;
    flex: 0 0 auto;
    height: 38px;
    overflow: hidden;
    width: 38px;
}

.chat-message-avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.chat-message--own .chat-message-avatar {
    border-color: rgba(var(--bns-accent-rgb), 0.6);
}

.chat-message-body {
    min-width: 0;
}

.chat-message-meta {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.chat-message-author {
    color: var(--bns-accent);
    font-size: 0.83rem;
    font-weight: 700;
}

.chat-message-author[data-player-trigger],
.chat-online-item .name[data-player-trigger] {
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.chat-message-author[data-player-trigger]:hover,
.chat-message-author[data-player-trigger]:focus-visible,
.chat-online-item .name[data-player-trigger]:hover,
.chat-online-item .name[data-player-trigger]:focus-visible {
    opacity: 0.85;
}

.chat-message-author[data-player-trigger]:focus-visible,
.chat-online-item .name[data-player-trigger]:focus-visible {
    outline: none;
}

.chat-name-effect--glow {
    text-shadow: 0 0 6px var(--chat-name-color, currentColor), 0 0 14px rgba(255, 255, 255, 0.25);
}

.chat-name-effect--shimmer {
    background: linear-gradient(
        110deg,
        var(--chat-name-color, #fff) 0%,
        #ffffff 45%,
        var(--chat-name-color, #fff) 60%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    animation: chat-name-shimmer 2.4s linear infinite;
}

.chat-name-effect--rainbow {
    background: linear-gradient(90deg, #ff6b6b, #fbbf24, #34d399, #60a5fa, #c084fc, #ff6b6b);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    animation: chat-name-rainbow 4s linear infinite;
}

.chat-name-effect--pulse {
    animation: chat-name-pulse 1.6s ease-in-out infinite;
}

@keyframes chat-name-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: -100% 50%; }
}

@keyframes chat-name-rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes chat-name-pulse {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.75; filter: brightness(1.25); }
}

.chat-message--own .chat-message-author::after {
    color: var(--bns-text-muted);
    content: " (você)";
    font-size: 0.72rem;
    font-weight: 500;
}

.chat-message-server {
    background: var(--bns-bg-accent);
    border: 1px solid var(--bns-border);
    border-radius: 999px;
    color: var(--bns-text-muted);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.05rem 0.45rem;
    text-transform: uppercase;
}

.chat-message-time {
    color: var(--bns-text-muted);
    font-size: 0.7rem;
}

.chat-message-text {
    color: var(--bns-text);
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0.1rem 0 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.chat-message-delete {
    align-items: center;
    background: rgba(220, 53, 69, 0.12);
    border: 0;
    border-radius: 7px;
    color: #ff6b6b;
    cursor: pointer;
    display: none;
    height: 26px;
    justify-content: center;
    position: absolute;
    right: 8px;
    top: 8px;
    transition: background var(--bns-transition);
    width: 26px;
}

.chat-message-delete .material-icons {
    font-size: 0.95rem;
}

.chat-message:hover .chat-message-delete {
    display: inline-flex;
}

.chat-message-delete:hover {
    background: rgba(220, 53, 69, 0.28);
}

/* Separador de dia */
.chat-day-divider {
    align-items: center;
    color: var(--bns-text-muted);
    display: flex;
    font-size: 0.7rem;
    font-weight: 600;
    gap: 0.75rem;
    margin: 0.5rem 0;
    text-transform: uppercase;
}

.chat-day-divider::before,
.chat-day-divider::after {
    background: var(--bns-border);
    content: '';
    flex: 1;
    height: 1px;
}

/* Campo de envio */
.chat-form {
    align-items: center;
    background: var(--bns-bg-accent);
    border-top: 1px solid var(--bns-border);
    display: flex;
    gap: 0.7rem;
    padding: 0.8rem 1.25rem;
}

.chat-form-avatar {
    border: 2px solid rgba(var(--bns-accent-rgb), 0.5);
    border-radius: 50%;
    flex: 0 0 auto;
    height: 34px;
    overflow: hidden;
    width: 34px;
}

.chat-form-avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.chat-form input {
    background: var(--bns-surface);
    border: 1px solid var(--bns-border);
    border-radius: 999px;
    color: var(--bns-text);
    flex: 1;
    font-family: inherit;
    font-size: 0.88rem;
    min-width: 0;
    outline: none;
    padding: 0.55rem 1.1rem;
    transition: border-color var(--bns-transition), box-shadow var(--bns-transition);
}

.chat-form input::placeholder {
    color: var(--bns-text-muted);
}

.chat-form input:focus {
    border-color: rgba(var(--bns-accent-rgb), 0.5);
    box-shadow: 0 0 0 3px var(--bns-accent-soft);
}

.chat-form button {
    align-items: center;
    background: linear-gradient(135deg, var(--bns-accent) 0%, color-mix(in srgb, var(--bns-accent) 75%, black) 100%);
    border: 0;
    border-radius: 50%;
    color: #17140a;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 40px;
    justify-content: center;
    transition: transform var(--bns-transition), box-shadow var(--bns-transition), opacity var(--bns-transition);
    width: 40px;
}

.chat-form button:hover {
    box-shadow: 0 4px 14px rgba(var(--bns-accent-rgb), 0.35);
    transform: translateY(-1px);
}

.chat-form button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.chat-form button .material-icons {
    font-size: 1.15rem;
}

.chat-feedback {
    background: var(--bns-bg-accent);
    color: #ff6b6b;
    font-size: 0.75rem;
    padding: 0 1.25rem 0.6rem;
}

/* Lateral: jogadores online */
.chat-sidebar {
    background: var(--bns-bg-accent);
    border-left: 1px solid var(--bns-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-sidebar-header {
    align-items: center;
    border-bottom: 1px solid var(--bns-border);
    color: var(--bns-text-muted);
    display: flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.45rem;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    text-transform: uppercase;
}

.chat-sidebar-header .material-icons {
    color: var(--bns-accent);
    font-size: 1rem;
}

.chat-online-list {
    flex: 1;
    list-style: none;
    margin: 0;
    overflow-y: auto;
    padding: 0.6rem;
}

.chat-online-list::-webkit-scrollbar {
    width: 6px;
}

.chat-online-list::-webkit-scrollbar-thumb {
    background: rgba(var(--bns-accent-rgb), 0.3);
    border-radius: 3px;
}

.chat-online-section {
    list-style: none;
    margin: 0 0 0.55rem;
    padding: 0;
}

.chat-online-section:last-child {
    margin-bottom: 0;
}

.chat-online-section--staff {
    background: rgba(244, 114, 182, 0.14);
    border: 1px solid rgba(244, 114, 182, 0.28);
    border-radius: var(--bns-radius-sm);
    padding: 0.45rem 0.4rem 0.35rem;
}

.chat-online-section__title {
    color: #f9a8d4;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 0.25rem 0.2rem;
    text-transform: uppercase;
}

.chat-online-section__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.chat-online-item {
    align-items: center;
    border-radius: var(--bns-radius-sm);
    display: flex;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    transition: background var(--bns-transition);
}

.chat-online-section--staff .chat-online-item:hover {
    background: rgba(244, 114, 182, 0.16);
}

.chat-online-section--staff .chat-online-item .player-avatar {
    border-color: rgba(244, 114, 182, 0.55);
}

.chat-online-item:hover {
    background: var(--bns-surface-hover);
}

.chat-online-item .player-avatar {
    background: var(--bns-surface);
    border: 2px solid rgba(var(--bns-accent-rgb), 0.4);
    border-radius: 50%;
    height: 30px;
    overflow: hidden;
    width: 30px;
}

.chat-online-item .player-avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.chat-online-item .name {
    color: var(--bns-text);
    font-size: 0.82rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-online-item .status-dot {
    background: #4ade80;
    border-radius: 50%;
    flex: 0 0 auto;
    height: 7px;
    margin-left: auto;
    width: 7px;
}

.chat-online-item.is-away .status-dot {
    background: #fbbf24;
}

.chat-online-item.is-muted .name {
    color: rgba(251, 191, 36, 0.85);
}

.chat-online-item.is-muted .player-avatar {
    border-color: rgba(251, 191, 36, 0.55);
    opacity: 0.9;
}

.chat-online-mute-badge {
    color: #fbbf24;
    flex: 0 0 auto;
    font-size: 1rem;
}

.chat-online-empty {
    color: var(--bns-text-muted);
    font-size: 0.78rem;
    padding: 0.75rem;
    text-align: center;
}

/* Responsivo */
@media (max-width: 991px) {
    .chat-layout {
        display: flex;
        flex-direction: column;
    }

    /* A lista de online vira uma faixa horizontal acima das mensagens */
    .chat-sidebar {
        border-bottom: 1px solid var(--bns-border);
        border-left: 0;
        flex-direction: row;
        order: -1;
        overflow: hidden;
    }

    .chat-sidebar-header {
        align-items: center;
        border-bottom: 0;
        border-right: 1px solid var(--bns-border);
        flex: 0 0 auto;
        flex-direction: column;
        gap: 0.2rem;
        justify-content: center;
        letter-spacing: 0;
        padding: 0.5rem 0.75rem;
        text-align: center;
    }

    .chat-sidebar-header .material-icons {
        font-size: 1.1rem;
    }

    .chat-online-list {
        align-items: stretch;
        display: flex;
        flex-wrap: nowrap;
        gap: 0.45rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem 0.65rem;
        -webkit-overflow-scrolling: touch;
    }

    .chat-online-list::-webkit-scrollbar {
        height: 5px;
        width: auto;
    }

    .chat-online-section {
        display: flex;
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 0.35rem;
        margin: 0;
    }

    .chat-online-section--staff {
        padding: 0.3rem 0.4rem;
    }

    .chat-online-section__title {
        margin: 0;
        writing-mode: horizontal-tb;
    }

    .chat-online-section__list {
        align-items: center;
        display: flex;
        flex-direction: row;
        gap: 0.25rem;
    }

    .chat-online-item {
        flex: 0 0 auto;
        padding: 0.25rem;
        position: relative;
    }

    .chat-online-item .player-avatar {
        height: 36px;
        width: 36px;
    }

    /* No mobile mostramos só o avatar; nome fica no title (toque longo) */
    .chat-online-item .name {
        display: none;
    }

    .chat-online-item .status-dot {
        border: 2px solid var(--bns-bg-accent);
        bottom: 2px;
        height: 11px;
        margin-left: 0;
        position: absolute;
        right: 2px;
        width: 11px;
    }

    /* Sem o nome visível, o selo de mutado migra para o canto do avatar,
       no mesmo estilo do status-dot. */
    .chat-online-mute-badge {
        background: rgba(17, 24, 39, 0.92);
        border-radius: 50%;
        font-size: 0.8rem;
        left: -3px;
        line-height: 1;
        padding: 1px;
        position: absolute;
        top: -3px;
    }

    .chat-online-empty {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }

    .chat-messages {
        height: min(55vh, 420px);
        padding: 0.75rem 0.8rem;
    }
}

@media (max-width: 575px) {
    .chat-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.8rem 1rem;
    }

    .chat-header-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .chat-header-title p {
        display: none;
    }

    .chat-card.is-disconnected .chat-header-title p {
        display: block;
    }

    .chat-online-badge {
        align-self: flex-start;
        font-size: 0.72rem;
    }

    .chat-messages {
        height: 50vh;
    }

    .chat-message {
        gap: 0.55rem;
        padding: 0.4rem 0.45rem;
    }

    .chat-message-avatar {
        height: 32px;
        width: 32px;
    }

    .chat-message-text {
        font-size: 0.85rem;
    }

    /* No mobile o botão de excluir fica sempre visível (não existe hover) */
    .chat-message-delete {
        display: inline-flex;
        opacity: 0.7;
    }

    .chat-form {
        gap: 0.5rem;
        padding: 0.65rem 0.8rem;
    }

    .chat-form-avatar {
        display: none;
    }

    .chat-form input {
        font-size: 16px; /* evita zoom automático do iOS ao focar */
        padding: 0.5rem 0.95rem;
    }

    .chat-form button {
        height: 38px;
        width: 38px;
    }

    .chat-feedback {
        padding: 0 0.8rem 0.5rem;
    }
}

/* ── Moderação do chat ── */
.chat-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.chat-card.is-disconnected .chat-header {
    border-bottom: 0;
}

/* Estado desconectado via classe (cookie/localStorage) — sem esperar o chat.js */
.chat-card.is-disconnected .chat-layout,
.chat-card.is-disconnected #chatOnlineBadge,
.chat-card.is-disconnected #chatDisconnectBtn,
.chat-card.is-disconnected .chat-audit-toggle {
    display: none !important;
}

.chat-card.is-disconnected #chatReconnectBtn {
    display: inline-flex !important;
}

.chat-connection-btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--bns-border);
    border-radius: 999px;
    color: var(--bns-text-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    transition: background var(--bns-transition), color var(--bns-transition), border-color var(--bns-transition);
}

.chat-connection-btn .material-icons {
    font-size: 1rem;
}

.chat-connection-btn--disconnect:hover {
    background: rgba(248, 113, 113, 0.14);
    border-color: rgba(248, 113, 113, 0.45);
    color: #f87171;
}

.chat-connection-btn--reconnect {
    background: rgba(var(--bns-accent-rgb), 0.14);
    border-color: rgba(var(--bns-accent-rgb), 0.4);
    color: var(--bns-accent);
}

.chat-connection-btn--reconnect:hover {
    background: rgba(var(--bns-accent-rgb), 0.24);
    color: var(--bns-accent);
}

.chat-connection-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

.chat-audit-toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--bns-border);
    border-radius: 999px;
    color: var(--bns-text-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    transition: background var(--bns-transition), color var(--bns-transition), border-color var(--bns-transition);
}

.chat-audit-toggle .material-icons {
    font-size: 1rem;
}

.chat-audit-toggle.is-active,
.chat-audit-toggle:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.45);
    color: #93c5fd;
}

.chat-ban-overlay {
    align-items: center;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    inset: 0;
    justify-content: center;
    padding: 2rem;
    position: absolute;
    text-align: center;
    z-index: 5;
}

.chat-ban-overlay .material-icons {
    color: #f87171;
    font-size: 2.5rem;
}

.chat-ban-overlay h6 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
}

.chat-ban-overlay p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    margin: 0;
    max-width: 28rem;
}

.chat-ban-countdown {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

.chat-ban-countdown strong {
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
}

.chat-mute-notice {
    align-items: center;
    background: rgba(251, 191, 36, 0.12);
    border-top: 1px solid rgba(251, 191, 36, 0.35);
    color: #fbbf24;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 600;
    gap: 0.4rem 0.75rem;
    padding: 0.55rem 1rem;
}

.chat-mute-notice .material-icons {
    font-size: 1rem;
}

.chat-mute-notice__countdown {
    margin-left: auto;
    white-space: nowrap;
}

.chat-mute-notice__countdown strong {
    font-variant-numeric: tabular-nums;
}

.chat-online-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.35rem;
    margin-left: auto;
    position: relative;
}

.chat-online-menu-btn {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--bns-text-muted);
    cursor: pointer;
    display: inline-flex;
    height: 24px;
    justify-content: center;
    padding: 0;
    width: 24px;
}

.chat-online-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--bns-text);
}

.chat-online-menu-btn .material-icons {
    font-size: 1.1rem;
}

.chat-online-item .status-dot {
    margin-left: 0;
}

.chat-user-menu {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--bns-radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    min-width: 150px;
    overflow: hidden;
    /* Fixed no body (JS) — não herda overflow da faixa online no mobile. */
    position: fixed;
    z-index: 1300;
}

.chat-user-menu button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #e5e7eb;
    cursor: pointer;
    display: flex;
    font-size: 0.78rem;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    text-align: left;
}

.chat-user-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.chat-user-menu button .material-icons {
    font-size: 1rem;
}

.chat-online-section--banned {
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--bns-radius-sm);
    margin-top: 0.55rem;
    padding: 0.45rem 0.4rem 0.35rem;
}

.chat-online-section--banned .chat-online-section__title {
    color: #fca5a5;
}

.chat-online-item--banned .player-avatar {
    border-color: rgba(248, 113, 113, 0.55);
    opacity: 0.85;
}

.chat-online-banned-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.chat-online-banned-info .name {
    color: #fecaca;
}

.chat-online-banned-info .ban-reason {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.65rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-message--deleted {
    opacity: 0.72;
}

.chat-message--deleted .chat-message-text {
    text-decoration: line-through;
}

.chat-message-deleted-badge {
    color: #f87171;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.chat-message-deleted-reason,
.chat-message-deleted-by {
    color: var(--bns-text-muted);
    font-size: 0.72rem;
    margin: 0.15rem 0 0;
}

.chat-mod-modal {
    inset: 0;
    position: fixed;
    z-index: 1200;
}

.chat-mod-modal__backdrop {
    background: rgba(0, 0, 0, 0.65);
    inset: 0;
    position: absolute;
}

.chat-mod-modal__dialog {
    background: var(--bns-surface);
    border: 1px solid var(--bns-border);
    border-radius: var(--bns-radius);
    box-shadow: var(--bns-shadow-sm);
    left: 50%;
    max-width: 420px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 2rem);
}

.chat-mod-modal__header {
    align-items: center;
    border-bottom: 1px solid var(--bns-border);
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 1rem;
}

.chat-mod-modal__header h6 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.chat-mod-modal__close {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--bns-text-muted);
    cursor: pointer;
    display: inline-flex;
    padding: 0;
}

.chat-mod-modal__body {
    padding: 1rem;
}

.chat-mod-modal__target {
    color: var(--bns-text-muted);
    font-size: 0.82rem;
    margin: 0 0 0.75rem;
}

.chat-mod-modal__label {
    color: var(--bns-text);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.chat-mod-modal__input {
    background: var(--bns-bg);
    border: 1px solid var(--bns-border);
    border-radius: var(--bns-radius-sm);
    color: var(--bns-text);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.7rem;
    width: 100%;
}

.chat-mod-modal__footer {
    border-top: 1px solid var(--bns-border);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 0.85rem 1rem;
}

.chat-mod-modal__cancel,
.chat-mod-modal__confirm {
    border-radius: var(--bns-radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
}

.chat-mod-modal__cancel {
    background: transparent;
    border: 1px solid var(--bns-border);
    color: var(--bns-text-muted);
}

/* ── Cartão de jogador (hover/clique no nick) ──
 * position: fixed + morando no <body> (via JS), mesmo esquema do tooltip
 * de emblemas — nunca é cortado pelo overflow/backdrop-filter do chat. */
.chat-player-tooltip {
    backdrop-filter: blur(12px);
    background: linear-gradient(165deg, rgba(28, 31, 40, 0.97), rgba(15, 17, 23, 0.97));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    max-width: min(16rem, calc(100vw - 1.5rem));
    min-width: 11rem;
    opacity: 0;
    padding: 0.75rem 0.85rem;
    pointer-events: none;
    position: fixed;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 1100;
}

.chat-player-tooltip.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chat-player-tooltip__header {
    align-items: center;
    display: flex;
    gap: 0.6rem;
}

.chat-player-tooltip__avatar {
    background: var(--bns-surface);
    border: 2px solid rgba(var(--bns-accent-rgb), 0.4);
    border-radius: 50%;
    flex: 0 0 auto;
    height: 42px;
    overflow: hidden;
    width: 42px;
}

.chat-player-tooltip.is-staff .chat-player-tooltip__avatar {
    border-color: rgba(244, 114, 182, 0.6);
}

.chat-player-tooltip__avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.chat-player-tooltip__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.chat-player-tooltip__name {
    color: var(--bns-text);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-player-tooltip__meta {
    color: var(--bns-text-muted);
    font-size: 0.7rem;
    font-weight: 600;
}

.chat-player-tooltip.is-staff .chat-player-tooltip__meta {
    color: #f4a8d6;
}

.chat-player-tooltip__link {
    align-items: center;
    background: var(--bns-accent-soft);
    border: 1px solid rgba(var(--bns-accent-rgb), 0.35);
    border-radius: var(--bns-radius-sm);
    color: var(--bns-accent);
    display: flex;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.65rem;
    padding: 0.4rem 0.6rem;
    text-decoration: none;
    transition: background var(--bns-transition), border-color var(--bns-transition);
}

.chat-player-tooltip__link:hover,
.chat-player-tooltip__link:focus-visible {
    background: var(--bns-accent);
    border-color: var(--bns-accent);
    color: #0f172a;
}

.chat-player-tooltip__link:focus-visible {
    outline: none;
}

.chat-player-tooltip__link .material-icons {
    font-size: 1rem;
}

.chat-mod-modal__confirm {
    background: var(--bns-accent);
    border: 1px solid var(--bns-accent);
    color: #fff;
}
