/* Scoped to the explicit URL confirmation controls introduced by the new client. */
.mail-compose-write-area:has(> .mail-compose-translate-corner > section[aria-label="翻译前确认链接"]) {
  flex-direction: column;
  align-items: stretch;
}
.mail-compose-translate-corner:has(> section[aria-label="翻译前确认链接"]) {
  position: static;
  inset: auto;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mail-compose-translate-corner > section[aria-label="翻译前确认链接"] {
  box-sizing: border-box;
  width: 100%;
  text-align: left;
  overflow-wrap: anywhere;
}
.mail-compose-translate-corner .translation-url-part textarea {
  display: block;
  height: 96px !important;
  min-height: 72px !important;
  max-height: 240px;
  padding: 8px 10px;
  border: 1px solid #c2cede;
  border-radius: 8px;
  background: #fff;
  color: #17243b;
  font: 14px/1.55 system-ui, sans-serif;
  resize: vertical;
}
.mail-compose-translate-corner .translation-url-part #translation-url-subject {
  height: 64px !important;
  min-height: 48px !important;
}
.mail-compose-translate-corner .translation-url-part { margin: 10px 0; }
.mail-compose-translate-corner .translation-url-part ul { margin: 6px 0; padding-left: 20px; }
.mail-compose-translate-corner .translation-url-part li { overflow-wrap: anywhere; }
.mail-compose-translate-corner .translation-url-part code { white-space: pre-wrap; font-size: 12px; }
.mail-compose-translate-corner > section[aria-label="翻译前确认链接"] button,
.mail-compose-translate-corner-row > button {
  margin: 4px 6px 4px 0;
  padding: 6px 10px;
  border: 1px solid #bac9df;
  border-radius: 8px;
  background: #fff;
  color: #243b60;
  font: inherit;
  line-height: 1.4;
  cursor: pointer;
}
.mail-compose-translate-corner button:disabled { cursor: default; opacity: .5; }
.mail-compose-translate-corner button:focus-visible,
.mail-compose-translate-corner textarea:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.mail-compose-translate-corner:has(> section[aria-label="翻译前确认链接"]) > .mail-compose-translate-corner-row {
  position: static;
  top: auto;
  z-index: auto;
  align-self: stretch;
  padding: 4px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px #19396312;
}

.mail-compose-translate-corner:has(> section[aria-label="翻译前确认链接"]) > .mail-compose-translate-corner-row {
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}
.mail-compose-translate-corner:has(> section[aria-label="翻译前确认链接"]) > .mail-compose-translate-corner-row > button { flex: 0 0 auto; }
