@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Nastaliq+Urdu:wght@400;700&display=swap');

/* ══════════════════════════════════════════
   LIGHT MODE TOKENS (default)
══════════════════════════════════════════ */
.eut-root {
  --bg-page:       transparent;
  --bg-card:       #f6f7ff;
  --bg-toolbar:    #edeeff;
  --bg-chips:      #f0f1fc;
  --bg-panel:      #ffffff;
  --bg-panel-out:  #f8f9ff;
  --bg-panelbar:   #f2f3fb;

  --border-color:  #c8caee;
  --divider:       #dddff5;

  --text-head:     #111127;
  --text-body:     #1e1e3a;
  --text-muted:    #5a5a7a;
  --text-dim:      #aaaac8;

  --accent:        #4f46e5;
  --accent-hover:  #4338ca;
  --accent-light:  #eeeeff;

  --chip-bg:       #e8eafb;
  --chip-border:   #c8caee;
  --chip-hover:    #dddff8;
  --chip-text:     #4a4a72;

  --urdu-text:     #111127;
  --ph-color:      #b0b0d0;
  --err-color:     #b91c1c;

  --shadow:        0 2px 12px rgba(79,70,229,0.10), 0 0 0 1px #c8caee;
  --radius:        12px;
  --radius-sm:     8px;

  max-width: 820px;
  margin: 0 auto;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-body);
  box-sizing: border-box;
}

/* ══════════════════════════════════════════
   DARK MODE TOKENS
══════════════════════════════════════════ */
.eut-root.eut-dark {
  --bg-card:       #16181f;
  --bg-toolbar:    #1c1f2a;
  --bg-chips:      #191c26;
  --bg-panel:      #16181f;
  --bg-panel-out:  #13151e;
  --bg-panelbar:   #1c1f2a;

  --border-color:  #2e3150;
  --divider:       #252840;

  --text-head:     #e8e8ff;
  --text-body:     #d4d4f0;
  --text-muted:    #8888b0;
  --text-dim:      #404060;

  --accent:        #7c72f5;
  --accent-hover:  #9088ff;
  --accent-light:  #1e1c38;

  --chip-bg:       #1e2030;
  --chip-border:   #2e3050;
  --chip-hover:    #252840;
  --chip-text:     #8888c8;

  --urdu-text:     #d0d8ff;
  --ph-color:      #363660;
  --err-color:     #f87171;

  --shadow:        0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px #2e3150;
}

/* ══════════════════════════════════════════
   SEO HEADER
══════════════════════════════════════════ */
.eut-h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-head);
  line-height: 1.3;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.eut-tagline {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 18px 0;
}

/* ══════════════════════════════════════════
   CARD — solid visible container
══════════════════════════════════════════ */
.eut-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background 0.25s, box-shadow 0.25s;
}

/* ── Toolbar ── */
.eut-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.25s;
}

.eut-lang-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eut-tab {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.eut-tab.eut-tab-active {
  color: var(--accent);
}

.eut-tab-arrow {
  font-size: 14px;
  color: var(--text-dim);
}

.eut-theme-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.eut-theme-btn:hover { background: var(--chip-hover); }

/* ── Example chips row ── */
.eut-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-chips);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.25s;
}

.eut-chips-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.eut-chip {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--chip-text);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.5;
}
.eut-chip:hover {
  background: var(--chip-hover);
  color: var(--accent);
  border-color: var(--accent);
}

/* ══════════════════════════════════════════
   PANELS — side by side, same height
══════════════════════════════════════════ */
.eut-panels {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  min-height: 240px;
}

.eut-panel-divider {
  background: var(--divider);
  width: 1px;
}

.eut-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  transition: background 0.25s;
}

.eut-panel-out {
  background: var(--bg-panel-out);
}

/* ── Textarea ── */
.eut-textarea {
  flex: 1;
  width: 100%;
  min-height: 180px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  padding: 16px 18px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-body);
  caret-color: var(--accent);
  box-sizing: border-box;
  display: block;
  transition: color 0.25s;
}
.eut-textarea::placeholder {
  color: var(--text-dim);
  font-size: 14px;
}

/* ── Urdu output body ── */
.eut-out-body {
  flex: 1;
  padding: 16px 18px;
  min-height: 180px;
}

.eut-out-text {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--urdu-text);
  direction: rtl;
  text-align: right;
  line-height: 2.0;
  margin: 0;
  transition: color 0.25s;
}

.eut-placeholder {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 15px;
  color: var(--ph-color);
  direction: rtl;
  text-align: right;
  line-height: 1.8;
  margin: 0;
  transition: color 0.25s;
}

/* ── Loader dots ── */
.eut-loader {
  display: none;
  gap: 5px;
  align-items: center;
  margin-top: 12px;
}
.eut-loader.eut-on { display: flex; }

.eut-ld {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.2;
  animation: eut-pulse 1.2s ease-in-out infinite;
}
.eut-ld:nth-child(2) { animation-delay: 0.2s; }
.eut-ld:nth-child(3) { animation-delay: 0.4s; }
@keyframes eut-pulse { 0%,100%{opacity:.15} 50%{opacity:.75} }

.eut-error {
  font-size: 13px;
  color: var(--err-color);
  line-height: 1.5;
  margin: 8px 0 0;
}

/* ── Panel bottom bar ── */
.eut-panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-panelbar);
  border-top: 1px solid var(--divider);
  gap: 8px;
  transition: background 0.25s;
}

.eut-panel-bar-right {
  justify-content: flex-end;
}

.eut-cc {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.eut-bar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.eut-btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  padding: 7px 16px;
  line-height: 1.4;
  transition: all 0.15s;
  white-space: nowrap;
}

.eut-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--divider);
}
.eut-btn-ghost:hover {
  background: var(--chip-bg);
  color: var(--text-body);
  border-color: var(--border-color);
}

.eut-btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  font-weight: 600;
}
.eut-btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.eut-btn-primary:active:not(:disabled) { transform: scale(0.97); }
.eut-btn-primary:disabled {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--text-dim);
  cursor: not-allowed;
}

.eut-btn-copy {
  background: transparent;
  color: var(--accent);
  border-color: var(--chip-border);
  font-size: 12px;
  padding: 5px 14px;
}
.eut-btn-copy:hover { background: var(--accent-light); border-color: var(--accent); }
.eut-btn-copy.eut-ok { color: #16a34a; border-color: #bbf7d0; background: #f0fdf4; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 580px) {
  .eut-panels {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1px auto;
  }
  .eut-panel-divider {
    width: 100%;
    height: 1px;
  }
  .eut-h1 { font-size: 18px; }
  .eut-chips-row { gap: 5px; }
}
