﻿/* Existing translation result styling, shared with WID. */
    .message-translate-action{
      appearance:none;
      -webkit-appearance:none;
      display:block;
      width:max-content;
      margin:0 auto 0 2px;
      padding:1px 2px;
      border:0;
      background:transparent;
      color:#6f8fe8;
      font-size:9px;
      line-height:1.2;
      font-weight:800;
      text-decoration:underline;
      text-underline-offset:2px;
      cursor:pointer;
      opacity:.82;
    }
    .message-translate-action:hover{opacity:1}
    .message-translate-action:focus-visible{
      outline:2px solid rgba(111,143,232,.42);
      outline-offset:2px;
      border-radius:3px;
    }
    .message-translation-result{
      margin-top:5px;
      padding:7px 9px;
      border:1px solid rgba(111,143,232,.30);
      border-radius:10px;
      background:rgba(93,120,194,.10);
      color:var(--text);
      overflow-wrap:anywhere;
    }
    .message-translation-result-label{
      margin-bottom:3px;
      color:#91a9ec;
      font-size:8px;
      line-height:1.2;
      font-weight:900;
      letter-spacing:.02em;
    }
    .message-translation-result-text{
      white-space:pre-wrap;
      font-size:11px;
      line-height:1.55;
      /* v514: subtle dark halo keeps translated text readable on bright custom bubbles in dark mode. */
      text-shadow:0 1px 2px rgba(0,0,0,.72),0 0 2px rgba(0,0,0,.34);
    }
    body.local-light .message-translate-action{color:#3f64b6!important}
    body.local-light .message-translation-result{
      background:#f3f6ff!important;
      border-color:#cbd7f6!important;
      color:#111!important;
    }
    body.local-light .message-translation-result-label{color:#4668b5!important}
    body.local-light .message-translation-result-text{text-shadow:none!important}


.message-translation-actions{display:flex;width:100%;margin-top:3px;min-height:12px}
@media(max-width:360px){.message-translate-action{font-size:8px}.message-translation-result-text{font-size:10px}}

/* v638: a solid dark surface keeps translated text readable over custom backgrounds. */
body.local-dark .message-translation-result {
  background:#111827 !important;
  border-color:#43516a !important;
  color:#eef2f7 !important; -webkit-text-fill-color:#eef2f7 !important;
}
body.local-dark .message-translation-result-label {
  color:#b4c8ff !important; -webkit-text-fill-color:#b4c8ff !important;
  text-shadow:none !important;
}
body.local-dark .message-translation-result-text {
  color:#eef2f7 !important; -webkit-text-fill-color:#eef2f7 !important;
  text-shadow:none !important;
}
