/* 메시지방 글 번역(message_translate.js) — 메시지 창(message_dock.js)과 메시지 화면(messages.html)이 함께 쓴다.
   말풍선 안 번역 자리는 말풍선의 글자색(currentColor)으로만 칠한다 — 내 파랑 말풍선·남의 옅은 말풍선, 밝은·어두운 테마를
   따로 맞출 일이 없다. 머리 아래 띠와 설정 줄은 사이트 토큰과 브랜드 파랑(--primary-color). */

/* ── 말풍선 안: 원문 아래 가는 가름줄 + 번역 + 꼬리표 ── */
.mt-slot {
    display: block;
    white-space: normal;
}
.mt-slot:not(.is-shown):not(.is-loading):not(.is-collapsed) { display: none; }
.mt-slot.is-shown,
.mt-slot.is-loading {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}
.mt-text {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
}
.mt-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    opacity: .68;
    cursor: pointer;
}
.mt-slot.is-collapsed .mt-tag { margin-top: 5px; }
.mt-tag:hover,
.mt-tag:focus-visible { opacity: 1; outline: none; text-decoration: underline; text-underline-offset: 2px; }
.mt-tag svg,
.mt-row__label svg,
.mt-banner__pill svg {
    flex: none;
    width: 13px;
    height: 13px;
}
.mt-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    opacity: .72;
}
.mt-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: mt-pulse 1s ease-in-out infinite;
}
@keyframes mt-pulse {
    0%, 100% { opacity: .25; }
    50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .mt-dot { animation: none; opacity: .6; }
}

/* ── 머리 아래 띠: '자동 번역 · 한국어 [끄기]' ── */
.mt-banner {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    padding: 8px 12px 2px;
}
.mt-banner[hidden] { display: none; }
.mt-banner__pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 4px 4px 4px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
}
.mt-banner__off {
    flex: none;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color) 14%, transparent);
    color: inherit;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.mt-banner__off:hover,
.mt-banner__off:focus-visible { background: color-mix(in srgb, var(--primary-color) 24%, transparent); outline: none; }

/* ── 방 메뉴·서랍의 두 줄: 이름은 왼쪽, 스위치·언어는 오른쪽 ── */
.mt-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.mt-row__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.mt-row__value {
    flex: none;
    color: var(--text-muted);
    font-weight: 500;
}
.mt-switch {
    position: relative;
    flex: none;
    width: 32px;
    height: 19px;
    border-radius: 999px;
    background: var(--border-color);
    transition: background .15s;
}
.mt-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    transition: transform .15s;
}
.mt-switch.is-on { background: var(--primary-color); }
.mt-switch.is-on::after { transform: translateX(13px); }
@media (prefers-reduced-motion: reduce) {
    .mt-switch,
    .mt-switch::after { transition: none; }
}

/* 메시지 창 서랍의 '채팅방 도구' 줄(msg-drawer__row)과 같은 크기·색으로 — 둘째 줄 아래에도 가름줄을 둔다. */
.mt-settings { display: contents; }
.msg-drawer__row.mt-row .mt-row__label {
    gap: 12px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
}
.msg-drawer__row.mt-row .mt-row__label svg {
    width: 21px;
    height: 21px;
    color: var(--text-muted);
}
.mt-settings > .msg-drawer__row:last-child { border-bottom: 1px solid var(--border-color); }
.msg-drawer__row.mt-row .mt-row__value { font-size: 13px; }

/* ── 번역할 언어 고르기(말풍선 메뉴와 같은 모양) — 지금 언어에 표시 ── */
.summet-safety-menu .mt-lang { justify-content: space-between; gap: 16px; }
.summet-safety-menu .mt-lang.is-current { color: var(--primary-color); font-weight: 600; }
.summet-safety-menu .mt-lang.is-current::after { content: '✓'; }

/* 내 글의 ⋯ — 손가락 화면에서는 늘 떠 있는 ⋯ 가 줄마다 붙지 않게 숨긴다(남의 글의 ⋯ 와 길게 누르기는 그대로). */
@media (hover: none) {
    .summet-safety-more.mt-more--mine { display: none; }
}
