/* Client-Side OCR Text Extraction Scoped Styles */

:root {
  --otet-primary: #2563eb;
  --otet-primary-hover: #1d4ed8;
  --otet-surface: #ffffff;
  --otet-bg: #f8fafc;
  --otet-border: #e2e8f0;
  --otet-text: #0f172a;
  --otet-text-muted: #64748b;
  --otet-success: #16a34a;
  --otet-success-bg: #dcfce7;
  --otet-danger: #dc2626;
  --otet-danger-bg: #fee2e2;
  --otet-radius: 8px;
  --otet-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --otet-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.5;
}

.otet-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

.otet-site-header {
  background: var(--otet-surface);
  border-bottom: 1px solid var(--otet-border);
  padding: 14px 0;
}

.otet-header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.otet-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--otet-primary);
  text-decoration: none;
}

.otet-header-badge {
  font-size: 0.8rem;
  font-weight: 600;
  background: #eff6ff;
  color: var(--otet-primary);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
}

.otet-intro-section {
  padding: 32px 0 20px;
}

.otet-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.otet-lead {
  font-size: 1.05rem;
  color: var(--otet-text-muted);
  max-width: 800px;
  margin: 0;
}

.otet-main-content {
  padding-bottom: 40px;
}

/* Tabs */
.otet-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--otet-border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.otet-tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--otet-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.otet-tab-btn:hover {
  color: var(--otet-primary);
}

.otet-tab-btn-active {
  color: var(--otet-primary);
  border-bottom-color: var(--otet-primary);
}

.otet-tab-panel {
  display: block;
}

.otet-tab-panel[hidden] {
  display: none;
}

.otet-tab-panel-active {
  display: block;
}

/* Layout Grid */
.otet-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .otet-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Card */
.otet-card {
  background: var(--otet-surface);
  border: 1px solid var(--otet-border);
  border-radius: var(--otet-radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.otet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--otet-border);
  padding-bottom: 12px;
}

.otet-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.otet-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.otet-badge-info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.otet-badge-neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.otet-badge-success {
  background: var(--otet-success-bg);
  color: var(--otet-success);
}

/* Drop Zone */
.otet-drop-zone {
  border: 2px dashed #93c5fd;
  background: #eff6ff;
  border-radius: var(--otet-radius);
  padding: 24px 16px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 16px;
}

.otet-drop-zone:hover {
  background: #dbeafe;
  border-color: var(--otet-primary);
}

.otet-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.otet-drop-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 6px;
}

.otet-drop-text {
  font-size: 0.95rem;
  margin: 0 0 4px;
  color: #1e3a8a;
}

.otet-drop-hint {
  font-size: 0.8rem;
  color: var(--otet-text-muted);
}

/* Samples */
.otet-samples-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.otet-samples-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--otet-text-muted);
}

.otet-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 16px;
  cursor: pointer;
  color: #334155;
  transition: all 0.15s;
}

.otet-chip:hover {
  border-color: var(--otet-primary);
  color: var(--otet-primary);
  background: #eff6ff;
}

/* Preview Canvas */
.otet-preview-container {
  margin-bottom: 18px;
}

.otet-preview-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--otet-text-muted);
  margin-bottom: 6px;
}

.otet-canvas-wrapper {
  background: #ffffff;
  border: 1px solid var(--otet-border);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.otet-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Forms */
.otet-form-group {
  margin-bottom: 18px;
}

.otet-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}

.otet-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: var(--otet-mono);
  border: 1px solid var(--otet-border);
  border-radius: var(--otet-radius);
  resize: vertical;
  background: #ffffff;
  color: var(--otet-text);
  line-height: 1.4;
}

.otet-textarea:focus,
.otet-select:focus {
  border-color: var(--otet-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.otet-select {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--otet-border);
  border-radius: var(--otet-radius);
  background: #ffffff;
  color: var(--otet-text);
  outline: none;
}

.otet-range {
  width: 100%;
  cursor: pointer;
}

.otet-hint {
  font-size: 0.85rem;
  color: var(--otet-text-muted);
  margin: 6px 0 0;
}

/* Stats */
.otet-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--otet-border);
  border-radius: 6px;
}

.otet-stat-item {
  flex: 1;
  text-align: center;
}

.otet-stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--otet-text-muted);
  text-transform: uppercase;
}

.otet-stat-val {
  font-size: 1.15rem;
  color: #0f172a;
}

/* Buttons */
.otet-btn {
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--otet-radius);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
  white-space: nowrap;
}

.otet-btn-primary {
  background: var(--otet-primary);
  color: #ffffff;
}

.otet-btn-primary:hover {
  background: var(--otet-primary-hover);
}

.otet-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.otet-btn-secondary:hover {
  background: #e2e8f0;
}

.otet-btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}

.otet-btn-sm:hover {
  background: #e2e8f0;
}

.otet-btn-xs {
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  background: #eff6ff;
  color: var(--otet-primary);
  border: 1px solid #bfdbfe;
  cursor: pointer;
}

.otet-btn-xs:hover {
  background: #dbeafe;
}

.otet-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Entities */
.otet-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .otet-grid-two {
    grid-template-columns: 1fr;
  }
}

.otet-entity-box {
  background: #ffffff;
  border: 1px solid var(--otet-border);
  border-radius: 6px;
  padding: 16px;
}

.otet-entity-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: #0f172a;
  border-bottom: 1px solid var(--otet-border);
  padding-bottom: 6px;
}

.otet-entity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.otet-entity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed #f1f5f9;
  font-size: 0.85rem;
}

.otet-entity-item:last-child {
  border-bottom: none;
}

.otet-mono {
  font-family: var(--otet-mono);
}

.otet-text-success {
  color: var(--otet-success);
}

.otet-text-danger {
  color: var(--otet-danger);
}

/* AdSense Container */
.otet-ad-container {
  min-height: 280px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--otet-text-muted);
  font-size: 0.85rem;
  margin: 24px 0;
  border-radius: var(--otet-radius);
}

/* Disclaimer & Guide */
.otet-disclaimer {
  background: #fffbeb;
  border-top: 1px solid #fef3c7;
  border-bottom: 1px solid #fef3c7;
  padding: 18px 0;
  margin-top: 24px;
}

.otet-disclaimer-text {
  font-size: 0.85rem;
  color: #92400e;
  margin: 0;
}

.otet-guide-section {
  padding: 36px 0;
  background: var(--otet-surface);
  border-bottom: 1px solid var(--otet-border);
}

.otet-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.otet-guide-card {
  border: 1px solid var(--otet-border);
  border-radius: var(--otet-radius);
  padding: 18px;
  background: #f8fafc;
}

.otet-guide-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--otet-primary);
}

.otet-guide-card p {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
}

.otet-faq-section {
  padding: 36px 0;
}

.otet-faq-item {
  margin-bottom: 18px;
}

.otet-faq-q {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: #0f172a;
}

.otet-faq-a {
  font-size: 0.9rem;
  color: #475569;
  margin: 0;
}

.otet-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
}

.otet-footer p {
  margin: 0;
}

.otet-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f172a;
  color: #f8fafc;
  padding: 12px 0;
  font-size: 0.85rem;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}

.otet-consent-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.otet-drop-content {
  pointer-events: none;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --otet-primary: #819dda;
  --otet-primary-hover: #8198da;
  --otet-surface: var(--tf-surface);
  --otet-bg: var(--tf-surface);
  --otet-border: var(--tf-surface);
  --otet-text: var(--tf-ink);
  --otet-text-muted: var(--tf-ink-faint);
  --otet-success: #7ad89d;
  --otet-success-bg: var(--tf-surface);
  --otet-danger: #da8181;
  --otet-danger-bg: var(--tf-surface);
}
