/* src/styles.css */
* {
  box-sizing: border-box;
  outline: none;
  margin: 0;
  padding: 0;
}

body {
  max-width: min(85vw, 960px);
  margin: 0 auto;
  font-family: Times New Roman, Times, serif;
  font-size: 1rem;
}

h1 {
  display: flex;
  flex-direction: row;
  font-size: 1.8em;
}

.segment-row {
  display: flex;
  border-bottom: 1px solid #cfcfcf;
  flex-direction: row;
  gap: 1rem;
  padding: .8rem 0;
}

.segment-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .8rem;
  min-width: 0;
}

.original, .translation {
  width: 100%;
  min-height: 1.2em;
}

.redact {
  display: none;
}

.translation {
  font-style: italic;
}

.tooltip {
  position: absolute;
  z-index: 1000;
  display: flex;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  flex-direction: column;
  min-width: 260px;
  max-width: 420px;
  max-height: 360px;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  font-size: .9rem;
  font-style: normal;
  box-shadow: 0 4px 16px #00000026;
}

.tooltip-tabs {
  display: flex;
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
  border-radius: 6px 6px 0 0;
  flex-shrink: 0;
}

.tooltip-tab {
  cursor: pointer;
  color: #555;
  background: none;
  border: none;
  border-bottom: 2px solid #0000;
  padding: 6px 12px;
  font-family: inherit;
  font-size: .82rem;
}

.tooltip-tab:hover {
  color: #111;
  background: #eee;
}

.tooltip-tab.active {
  color: #111;
  border-bottom-color: #333;
  font-weight: 600;
}

.tooltip-content {
  overflow-y: auto;
  flex: 1;
  min-height: 60px;
  padding: 10px 12px;
}

.tooltip-loading {
  color: #888;
  padding: 12px 0;
  font-style: italic;
}

.tooltip-error {
  color: #c00;
  padding: 8px 0;
}

.tooltip-content h4 {
  color: #333;
  margin: 8px 0 4px;
  font-size: .85rem;
}

.tooltip-content h4:first-child {
  margin-top: 0;
}

.tooltip-content ul {
  margin: 0 0 6px 18px;
  padding: 0;
}

.tooltip-content li {
  margin-bottom: 2px;
  line-height: 1.4;
}

.tooltip-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 4px 0;
  font-size: .82rem;
}

.tooltip-content td, .tooltip-content th {
  text-align: left;
  border: 1px solid #ddd;
  padding: 2px 6px;
}

.tooltip-content th {
  background: #f5f5f5;
  font-weight: 600;
}

.tooltip-sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.tooltip-sub-tab {
  cursor: pointer;
  color: #555;
  background: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: .78rem;
}

.tooltip-sub-tab:hover {
  background: #eee;
}

.tooltip-sub-tab.active {
  color: #fff;
  background: #333;
  border-color: #333;
}

.tooltip-translate-result {
  padding: 8px 0;
  font-size: 1rem;
  line-height: 1.5;
}
