@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 400;
  src: url("/static/fonts/material-symbols-outlined.ttf") format("truetype");
}

:root {
  --bg: #ffffff;
  --panel-bg: #f3f6fb;
  --surface: #ffffff;
  --border: #dadce0;
  --text: #202124;
  --muted: #5f6368;
  --blue: #1a73e8;
  --blue-dark: #0b57d0;
  --blue-soft: #d2e3fc;
  --green: #188038;
  --red: #d93025;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-y: scroll;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: "Google Sans", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  display: flex;
  align-items: center;
  height: 66px;
  padding: 8px 18px;
  background: var(--surface);
}

.icon-button,
.plain-icon,
.apps-button,
.swap-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.icon-button,
.plain-icon,
.apps-button {
  width: 40px;
  height: 40px;
}

.icon-button {
  flex-direction: column;
  gap: 4px;
  margin-right: 10px;
}

.icon-button span {
  width: 18px;
  height: 2px;
  background: var(--muted);
  border-radius: 999px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
}






.brand-title {
  color: var(--text);
  font-weight: 400;
}

.topbar-spacer {
  flex: 1;
}

.plain-icon {
  margin-right: 8px;
  font-size: 22px;
}

.apps-button {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  grid-auto-rows: 4px;
  gap: 3px;
  margin-right: 12px;
}

.apps-button span {
  width: 4px;
  height: 4px;
  background: var(--muted);
  border-radius: 50%;
}

.signin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  height: 40px;
  padding: 0 18px;
  color: #fff;
  background: #0b57d0;
  border: 0;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 500;
}

.signin-button.account-avatar {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.account-popover[hidden] {
  display: none;
}

.account-popover {
  position: fixed;
  top: 56px;
  right: 18px;
  z-index: 90;
  width: 260px;
  padding: 12px 0 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(60, 64, 67, 0.28);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 140ms ease, transform 160ms ease;
}

.account-popover.open {
  opacity: 1;
  transform: translateY(0);
}

.account-popover-email {
  overflow: hidden;
  padding: 0 18px 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-logout-button {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 0 18px;
  color: var(--text);
  background: transparent;
  border: 0;
  font-size: 14px;
  text-align: left;
}

.account-logout-button:hover {
  background: #f1f3f4;
}

.page-shell {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0 28px;
}

.mode-tabs {
  display: flex;
  gap: 10px;
  margin: 2px 0 18px 12px;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  color: var(--blue-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.mode-tab span {
  color: var(--blue-dark);
  font-size: 16px;
  line-height: 1;
}

.mode-tab.active {
  background: var(--blue-soft);
  border-color: var(--blue-soft);
}

.mode-tab:disabled {
  opacity: 1;
}

.translator {
  width: 100%;
}

.language-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: end;
  gap: 4px;
  min-height: 40px;
}

.language-side {
  display: flex;
  align-items: end;
  gap: 24px;
  min-width: 0;
  height: 40px;
  padding: 0 20px;
  overflow: hidden;
}

.language-tab {
  position: relative;
  flex: 0 0 auto;
  height: 40px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.language-tab.active {
  color: var(--blue-dark);
}

.language-tab.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--blue);
  content: "";
}

.language-select {
  flex: 0 0 34px;
  width: 34px;
  height: 40px;
  color: transparent;
  text-indent: -999px;
  background: transparent;
  border: 0;
  outline: 0;
  cursor: pointer;
}

.swap-button {
  width: 42px;
  height: 40px;
  color: var(--muted);
  font-size: 24px;
}

.panel-row {
  --panel-height: 166px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  min-height: var(--panel-height);
}

.input-panel,
.output-panel {
  min-height: var(--panel-height);
  border-radius: var(--radius);
}

.input-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
}

.output-panel {
  position: relative;
  overflow: visible;
  background: var(--panel-bg);
  border: 1px solid transparent;
}

textarea {
  flex: 1 1 auto;
  width: 100%;
  min-height: 104px;
  padding: 18px 52px 8px 20px;
  overflow: hidden;
  resize: none;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 22px;
  line-height: 1.45;
}

#sourceText {
  font-size: 24px;
}

#sourceText.compact-content-font,
.translate-text.compact-content-font {
  font-size: 18px;
}


.clear-source-button[hidden] {
  display: none;
}

.clear-source-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.clear-source-button:hover {
  background: rgba(60, 64, 67, 0.08);
}

.clear-source-button .material-symbols-outlined {
  font-size: 26px;
}

textarea::placeholder {
  color: #80868b;
}

.input-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.input-footer span:last-child {
  margin-left: auto;
}

.mic-icon {
  color: var(--muted);
  font-size: 20px;
  transform: rotate(180deg);
}


.mic-icon,
.keyboard-icon,
.feedback-link,
.select-caret,
.language-select {
  cursor: pointer;
}

.empty-result {
  position: absolute;
  inset: 0;
  display: block;
  padding: 14px 16px;
  color: var(--muted);
}

.empty-result p {
  margin: 0;
  color: #3c4043;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
}

.empty-result span {
  display: block;
  max-width: 360px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.result-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: var(--panel-height);
  padding: 0;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: var(--panel-height);
  padding: 16px;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
}

.result-meta,
.result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-meta {
  justify-content: space-between;
}

.request-id {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-status {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.request-status.loading {
  color: var(--blue-dark);
  background: #e8f0fe;
}

.request-status.done {
  color: var(--green);
  background: #e6f4ea;
}

.request-status.error {
  color: var(--red);
  background: #fce8e6;
}

.translate-text {
  flex: 1;
  min-height: 62px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font-size: 24px;
  line-height: 1.42;
}

.result-actions {
  justify-content: flex-end;
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}

.token-count {
  margin-right: auto;
}

.copy-button {
  padding: 7px 13px;
  color: var(--blue-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.copy-button.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.copy-feedback {
  min-width: 44px;
  color: var(--green);
}

.feedback-link {
  margin: 8px 3px 0 auto;
  color: #3c4043;
  font-size: 11px;
  font-style: italic;
  font-weight: 600;
  text-align: right;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 34px;
  margin-top: 42px;
  color: var(--muted);
  font-size: 13px;
}

.global-error {
  color: var(--red);
}

.quick-links {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 30px;
}

.quick-links button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 14px;
}

.quick-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  color: #6f7276;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 36px;
}

@media (max-width: 860px) {
  .topbar {
    height: 66px;
    padding: 8px 18px;
  }

  .brand {
    font-size: 20px;
  }

  .plain-icon,
  .signin-button {
    display: none;
  }

  .page-shell {
    padding: 10px;
  }

  .mode-tabs {
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .language-row {
    grid-template-columns: 1fr 38px 1fr;
  }

  .language-side {
    gap: 14px;
    padding: 0 8px;
  }

  .language-tab:nth-child(n + 3) {
    display: none;
  }

  .panel-row {
    grid-template-columns: 1fr;
  }

  .input-panel,
  .output-panel,
  .result-card,
  .result-stack {
    min-height: 170px;
  }

  .input-footer,
  .result-actions,
  .status-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .input-footer span:last-child {
    margin-left: 0;
  }

  .quick-links {
    gap: 28px;
    margin-top: 24px;
  }
}

.status-bar,
.result-meta,
.result-actions {
  display: none;
}

.material-symbols-outlined {
  direction: ltr;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Material Symbols Outlined";
  font-feature-settings: "liga";
  font-size: 24px;
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  -webkit-font-smoothing: antialiased;
}

.brand {
  align-items: center;
  gap: 4px;
}

.google-logo {
  display: block;
  width: 74px;
  height: 24px;
  transform: translateY(2px);
}

.icon-button .material-symbols-outlined,
.plain-icon .material-symbols-outlined,
.apps-button .material-symbols-outlined,
.swap-button .material-symbols-outlined,
.mode-tab .material-symbols-outlined,
.mic-icon,
.keyboard-icon,
.select-caret {
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
  color: currentColor;
}

.apps-button {
  display: inline-flex;
  grid-template-columns: none;
  grid-auto-rows: auto;
  gap: 0;
}

.plain-icon .material-symbols-outlined,
.apps-button .material-symbols-outlined,
.icon-button .material-symbols-outlined {
  font-size: 24px;
}

.mode-tab .material-symbols-outlined {
  font-size: 18px;
}

.swap-button .material-symbols-outlined {
  font-size: 24px;
}

.select-caret {
  flex: 0 0 auto;
  margin-left: -18px;
  color: var(--muted);
  font-size: 22px;
  pointer-events: auto;
}

.mic-icon,
.keyboard-icon {
  color: var(--muted);
  font-size: 22px;
  transform: none;
}

.keyboard-icon {
  margin-left: auto;
}

.quick-links .material-symbols-outlined {
  font-size: 34px;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-height: 34px;
  margin-top: auto;
  color: var(--muted);
}

.reply-length {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.icon-action:hover:not(:disabled) {
  background: rgba(60, 64, 67, 0.08);
}

.icon-action .material-symbols-outlined {
  font-size: 24px;
}

.icon-action.disabled,
.icon-action:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.select-caret {
  align-self: center;
  margin-bottom: 0;
}

.history-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 166px;
  padding: 12px;
}

.history-empty {
  padding: 4px;
  color: var(--muted);
  font-size: 20px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 0;
  border-radius: 10px;
  text-align: left;
}

.history-item:hover {
  background: #fff;
}

.history-source,
.history-translate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-source {
  color: var(--text);
  font-size: 16px;
}

.history-translate,
.history-meta {
  color: var(--muted);
  font-size: 13px;
}

.history-meta {
  min-width: 28px;
  text-align: right;
}

.history-drawer[hidden] {
  display: none;
}

.history-drawer {
  position: fixed;
  top: 0;
  right: 12px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: min(362px, calc(100vw - 24px));
  height: calc(100vh - 2px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.12);
}

.history-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px 0 20px;
}

.history-drawer-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.drawer-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.drawer-icon-button:hover {
  background: rgba(60, 64, 67, 0.08);
}

.history-drawer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.history-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
}

.history-download-button:hover {
  background: rgba(60, 64, 67, 0.08);
}

.history-download-button img {
  width: 14px;
  height: 14px;
  opacity: 0.72;
}

.icon-action img {
  width: 24px;
  height: 24px;
  opacity: 0.72;
}

.history-drawer-toolbar button {
  color: var(--blue-dark);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 600;
}

.history-list {
  flex: 1;
  overflow-y: auto;
}

.drawer-history-empty {
  padding: 24px 20px;
  color: var(--muted);
  font-size: 15px;
}

.drawer-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  padding: 16px 14px 14px 20px;
  color: var(--text);
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.drawer-history-item:hover {
  background: #f8fafd;
}

.drawer-history-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.drawer-history-direction,
.drawer-history-translate {
  color: #5f6368;
  font-size: 13px;
  line-height: 1.2;
}

.drawer-history-source {
  overflow: hidden;
  color: #202124;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-history-translate {
  overflow: hidden;
  color: #5f6368;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-history-actions {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}

.drawer-history-actions .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
}

.quick-links button.active span {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: var(--blue-soft);
}

.quick-links button.active {
  color: var(--blue-dark);
  font-weight: 600;
}

@media (max-width: 860px) {
  .history-drawer {
    right: 0;
    width: min(360px, 100vw);
    border-radius: 14px 0 0 14px;
  }
}

.history-drawer {
  top: 64px;
  right: 20px;
  height: calc(100vh - 74px);
}

.copy-feedback {
  display: none;
}

.result-actions {
  justify-content: flex-end;
  gap: 10px;
}

.copy-toast {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 100;
  min-width: 288px;
  max-width: calc(100vw - 40px);
  padding: 16px 24px;
  color: #fff;
  background: #323232;
  border-radius: 2px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 180ms ease, transform 220ms ease;
}

.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.copy-toast.error {
  background: #5f2120;
}

.history-drawer {
  opacity: 0;
  transform: translateX(calc(100% + 20px));
  transition: transform 220ms cubic-bezier(0.2, 0, 0, 1), opacity 160ms ease;
}

.history-drawer.open {
  opacity: 1;
  transform: translateX(0);
}

.drawer-history-actions {
  position: relative;
}

.drawer-history-download,
.drawer-history-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.drawer-history-download:hover,
.drawer-history-more:hover {
  background: rgba(60, 64, 67, 0.08);
}

.drawer-history-menu[hidden] {
  display: none;
}

.drawer-history-menu {
  position: absolute;
  top: 28px;
  right: 0;
  z-index: 40;
  min-width: 162px;
  padding: 8px 0;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.28);
}

.drawer-history-menu button {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  color: var(--text);
  background: transparent;
  border: 0;
  font-size: 16px;
  text-align: left;
  white-space: nowrap;
}

.drawer-history-menu button:hover {
  background: #f1f3f4;
}

.drawer-history-direction-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.drawer-history-marker {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.drawer-history-marker.image {
  background: #fbbc04;
}

.drawer-history-marker.pending {
  background: #9aa0a6;
}

.drawer-history-marker.failed {
  background: rgba(217, 48, 37, 0.5);
}

.drawer-history-marker.active {
  background: #188038;
}

.settings-overlay[hidden] {
  display: none;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  padding: 64px 20px 20px;
  background: rgba(32, 33, 36, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.settings-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.settings-popover {
  width: min(420px, calc(100vw - 40px));
  max-height: calc(100vh - 84px);
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(60, 64, 67, 0.24);
  transform: translateY(-8px);
  transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

.settings-overlay.open .settings-popover {
  transform: translateY(0);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 12px 0 20px;
  border-bottom: 1px solid var(--border);
}

.settings-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
}

.initial-content-input {
  display: block;
  width: calc(100% - 32px);
  min-height: 220px;
  margin: 16px;
  padding: 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  resize: vertical;
  font-size: 14px;
  line-height: 1.5;
}

.initial-content-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue) inset;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px 14px;
}

.settings-actions[hidden] {
  display: none;
}

.settings-actions button {
  min-width: 72px;
  height: 36px;
  padding: 0 18px;
  color: #fff;
  background: var(--blue-dark);
  border: 0;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .settings-overlay {
    padding: 58px 10px 10px;
  }

  .settings-popover {
    width: 100%;
  }
}

.model-section {
  margin: 0 16px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.model-section-title {
  padding: 10px 12px;
  color: var(--text);
  background: #f8fafd;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

.model-list {
  display: flex;
  flex-direction: column;
  max-height: 178px;
  overflow-y: auto;
}

.model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf0f2;
  cursor: pointer;
}

.model-option:last-child {
  border-bottom: 0;
}

.model-option:hover {
  background: #f8fafd;
}

.model-option input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue-dark);
}

.model-option-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.model-option-name {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-option-meta,
.model-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.model-empty {
  padding: 14px 12px;
}

.settings-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.settings-tab {
  position: relative;
  height: 44px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 600;
}

.settings-tab.active {
  color: var(--blue-dark);
}

.settings-tab.active::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 2px;
  background: var(--blue);
  content: "";
}

.settings-tab-panel[hidden] {
  display: none;
}

.settings-tab-panel {
  overflow: visible;
  padding: 12px 16px;
}

.settings-tab-panel .initial-content-input {
  width: 100%;
  margin: 0;
}

.settings-tab-panel .model-list {
  max-height: 292px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.settings-popover.initial-tab-active {
  display: flex;
  flex-direction: column;
}

.settings-popover.initial-tab-active .settings-header,
.settings-popover.initial-tab-active .settings-tabs,
.settings-popover.initial-tab-active .settings-actions {
  flex: 0 0 auto;
}

.settings-popover.initial-tab-active .settings-tab-panel.active {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding-bottom: 8px;
}

.settings-popover.initial-tab-active .initial-content-input {
  min-height: 0;
  flex: 1 1 auto;
  height: auto;
  resize: none;
}
.thinking-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f2;
  background: #fff;
  cursor: pointer;
}

.thinking-option:hover {
  background: #f8fafd;
}

.thinking-option input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue-dark);
}

.thinking-option-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.thinking-option-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.thinking-option-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}
