/* ================================================
   Thornwood AI — Video Service Extensions
   Extends base styles.css with video-page components
   ================================================ */

/* --- Video accent overrides (keep teal, slight shift) --- */
.video-page {
  --color-accent-video: #4ecdc4;
  --color-accent-video-glow: rgba(78, 205, 196, 0.25);
}

/* ================================================
   Agent Showcase Cards (2 live + 2 coming soon)
   ================================================ */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.agent-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.agent-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 25px 50px -15px rgba(0,0,0,0.4);
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.agent-card:hover::before { opacity: 1; }

.agent-card.coming-soon {
  opacity: 0.5;
  pointer-events: none;
}

.agent-card.coming-soon::after {
  content: 'Coming Soon';
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.agent-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--color-surface-elevated), var(--color-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 1px solid var(--color-border);
}

.agent-icon svg {
  width: 24px; height: 24px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.agent-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.agent-try-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  transition: gap 0.3s ease;
}
.agent-try-btn:hover { gap: 0.7rem; }

.agent-try-btn svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ================================================
   Drop Zone (upload area)
   ================================================ */
.tool-section {
  max-width: 800px;
  margin: 0 auto;
}

.drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--color-surface);
}

.drop-zone:hover,
.drop-zone:focus-visible {
  border-color: rgba(78,205,196,0.4);
  background: rgba(78,205,196,0.03);
}

.drop-zone.active {
  border-color: var(--color-accent);
  background: rgba(78,205,196,0.06);
  box-shadow: 0 0 30px rgba(78,205,196,0.1);
}

.drop-zone h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.drop-zone p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.drop-zone .hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* Upload badge — teal action icon (inline-flex so the text-align:center
   drop-zone centers it). SVGs ship with a viewBox but no intrinsic size, so
   the explicit dimensions here are what keep them from ballooning to 300px. */
.drop-zone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(78,205,196,0.14), rgba(78,205,196,0.03));
  border: 1px solid rgba(78,205,196,0.25);
  color: var(--color-accent);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.drop-zone-icon svg {
  width: 26px; height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop-zone:hover .drop-zone-icon,
.drop-zone:focus-visible .drop-zone-icon,
.drop-zone.active .drop-zone-icon {
  transform: translateY(-2px);
  border-color: rgba(78,205,196,0.5);
  box-shadow: 0 6px 20px rgba(78,205,196,0.12);
}

.hidden-input { display: none; }

/* Sample videos row */
.sample-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.sample-row span {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.sample-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.sample-btn:hover {
  border-color: rgba(78,205,196,0.3);
  background: var(--color-surface);
}

/* URL input row */
.url-divider {
  text-align: center;
  margin: 1.25rem 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.url-row {
  display: flex;
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto;
}

.url-row input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.url-row input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.15);
}

.url-row button {
  padding: 0.75rem 1.25rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.url-row button:hover {
  border-color: rgba(255,255,255,0.15);
  background: var(--color-surface);
}

.url-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  opacity: 0.6;
  margin-top: 0.5rem;
}

/* ================================================
   Tabs (Compliance Check / AI Editor)
   ================================================ */
.tool-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.tool-tab {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  margin-bottom: -1px;
}

.tool-tab:hover { color: var(--color-text); }

.tool-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.tool-panel { display: none; }
.tool-panel.active { display: block; }

/* ================================================
   Compliance Results
   ================================================ */
.check-error {
  background: rgba(255,107,107,0.1);
  border: 1px solid rgba(255,107,107,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.check-snapshot {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.check-snapshot dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.25rem;
  font-size: 0.88rem;
}

.check-snapshot dt {
  color: var(--color-text-muted);
  font-weight: 500;
}

.check-verdict {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
}

.check-verdict.pass { background: rgba(78,205,196,0.08); color: #4ecdc4; border: 1px solid rgba(78,205,196,0.2); }
.check-verdict.warn { background: rgba(247,181,85,0.08); color: #f7b555; border: 1px solid rgba(247,181,85,0.2); }
.check-verdict.fail { background: rgba(255,107,107,0.08); color: #ff6b6b; border: 1px solid rgba(255,107,107,0.2); }

.check-tally {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.check-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.check-chip.pass { background: rgba(78,205,196,0.12); color: #4ecdc4; }
.check-chip.warn { background: rgba(247,181,85,0.12); color: #f7b555; }
.check-chip.fail { background: rgba(255,107,107,0.12); color: #ff6b6b; }

.check-rules {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.check-rules li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
}

.check-rules li:last-child { border-bottom: none; }

.check-rules .detail {
  color: var(--color-text-muted);
}

.check-practices {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.check-practices h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.check-practices ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.check-practices li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.check-practices li::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.55rem;
}

/* ================================================
   AI Review Panel
   ================================================ */
.ai-panel {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.ai-run-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: rgba(78,205,196,0.1);
  border: 1px solid rgba(78,205,196,0.25);
  border-radius: var(--radius);
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ai-run-btn:hover {
  background: rgba(78,205,196,0.15);
  border-color: rgba(78,205,196,0.4);
}

.ai-run-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-status {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

.ai-status .ai-err {
  color: #ff6b6b;
}

.ai-output {
  margin-top: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.ai-output h3.ai-h {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  margin: 1.25rem 0 0.5rem;
  color: var(--color-accent);
}

.ai-output h3.ai-h:first-child { margin-top: 0; }

.ai-output p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.ai-output ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.ai-output li {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}

.ai-output strong { color: var(--color-text); }

.ai-usage {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0.6;
  margin-top: 1rem;
}

/* ================================================
   AI Editor Panel
   ================================================ */
.edit-panel {
  padding: 1rem 0;
}

.edit-input-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.edit-input {
  width: 100%;
  padding: 1rem 1.25rem;
  padding-right: 5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: none;
  min-height: 80px;
}

.edit-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.15);
}

.edit-submit {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: var(--color-dark);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-submit:hover { transform: translateY(-1px); }
.edit-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.edit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.edit-chip {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.edit-chip:hover {
  border-color: rgba(78,205,196,0.3);
  color: var(--color-text);
}

.edit-status {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 1rem 0;
}

.edit-result {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.edit-result a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}

/* ================================================
   Video Preview (inline player)
   ================================================ */
.video-preview {
  width: 100%;
  max-height: 360px;
  border-radius: var(--radius);
  background: #000;
  margin-bottom: 1.5rem;
}

/* ================================================
   How It Works (3 steps)
   ================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.step-card {
  padding: 1.5rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(78,205,196,0.1);
  border: 1px solid rgba(78,205,196,0.2);
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ================================================
   Problem Cards
   ================================================ */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.problem-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition);
}

.problem-card:hover {
  border-color: rgba(255,107,107,0.25);
  transform: translateY(-3px);
}

/* Problem badge — compact coral icon matching the coral card titles. Without
   explicit sizing these viewBox-only SVGs default to 300x150 and dominate the
   card; the badge keeps them small, branded, and graphically distinct. */
.problem-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255,107,107,0.14), rgba(255,107,107,0.04));
  border: 1px solid rgba(255,107,107,0.22);
  color: var(--color-accent-secondary);
  transition: transform var(--transition), box-shadow var(--transition);
}

.problem-card:hover .problem-icon {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255,107,107,0.12);
}

.problem-icon svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: #ff6b6b;
}

.problem-card p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ================================================
   Video Stats Grid
   ================================================ */
.video-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

/* ================================================
   Responsive — Video Extensions
   ================================================ */
@media (max-width: 1024px) {
  .agent-grid { grid-template-columns: 1fr; }
  .problem-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; gap: 0; }
  .video-stats-grid { grid-template-columns: 1fr; gap: 0; }
  .url-row { flex-direction: column; }
  .tool-tabs { overflow-x: auto; }
}
