/* OCR landing demo widget styles */
.demo-ocr .demo-template-label {
  display: block;
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.demo-ocr .demo-template-select {
  width: 100%;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: .2s;
}

.demo-ocr .demo-template-select:focus {
  border-color: rgba(0,212,180,.4);
}

.demo-ocr .demo-drop.blocked {
  opacity: .7;
  pointer-events: none;
  position: relative;
}

.demo-ocr .demo-run:disabled {
  cursor: wait;
  opacity: .75;
  transform: none;
}

.demo-ocr .demo-result.error .demo-result-header {
  color: #f87171;
}

.demo-ocr .demo-result.error .demo-json {
  color: #fecaca;
  border-color: rgba(239,68,68,.25);
}

.demo-ocr .btn-ghost.disabled {
  opacity: .55;
  pointer-events: none;
}

.demo-ocr .btn-ghost#demoOpenResult:not(.disabled) {
  background: var(--teal, #00d4b4);
  color: #0a1628;
  border-color: var(--teal, #00d4b4);
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(0,212,180,.25);
}

/* panel-ocr drop-zone: drag states */
.demo-landing .drop-zone.dragover {
  border-color: rgba(0,212,180,.7);
  background: rgba(0,212,180,.07);
}

.demo-landing .drop-zone.blocked {
  opacity: .7;
  pointer-events: none;
}

/* panel-ocr result button */
.demo-landing #panelOcrOpenResult:not(.disabled) {
  background: var(--teal, #00d4b4);
  color: #0a1628;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(0,212,180,.25);
}

.demo-landing #panelOcrOpenResult.disabled {
  opacity: .55;
  pointer-events: none;
}

.demo-ocr .demo-disclaimer a {
  color: var(--teal);
  font-weight: 700;
}

/* Result actions + Telegram banner: hidden until processing finishes */
.demo-ocr .demo-result-extras {
  display: none;
}

.demo-ocr .demo-result-extras.show {
  display: block;
  animation: fadeIn .35s ease;
}

/* Telegram banner */
.demo-ocr .demo-tg-banner {
  margin: 18px 0 4px;
}

.demo-ocr .demo-tg-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(41,182,246,.12) 0%, rgba(0,212,180,.08) 100%);
  border: 1px solid rgba(41,182,246,.3);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text, #e2e8f0);
  transition: border-color .2s, background .2s, transform .15s;
}

.demo-ocr .demo-tg-link:hover {
  border-color: rgba(41,182,246,.6);
  background: linear-gradient(135deg, rgba(41,182,246,.18) 0%, rgba(0,212,180,.12) 100%);
  transform: translateY(-1px);
}

.demo-ocr .demo-tg-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.demo-ocr .demo-tg-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.demo-ocr .demo-tg-title {
  font-size: 14px;
  font-weight: 700;
  color: #29B6F6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-ocr .demo-tg-sub {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

.demo-ocr .demo-tg-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #29B6F6;
  opacity: .7;
}
