/* advanced.css - Thumbnail Intelligence UI */

.ytd-advanced {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(2, 6, 23, 0.06);
  background: #fff;
  box-shadow: 0 16px 40px rgba(20, 25, 40, 0.04);
}

.ytd-advanced-head {
  margin-bottom: 12px;
}
.ytd-advanced-title {
  font-size: 20px;
  font-weight: 900;
  margin: 0;
}
.ytd-advanced-sub {
  color: #475569;
  margin: 6px 0 0;
}

.ytd-score-dashboard {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.ytd-score-card {
  flex: 1 1 200px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(2, 6, 23, 0.06);
  background: #fff;
  text-align: center;
}
.ytd-score-label {
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}
.ytd-score-value {
  font-weight: 900;
  font-size: 22px;
  color: #111827;
}

.ytd-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.ytd-panel {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(2, 6, 23, 0.06);
  background: #fff;
  min-height: 120px;
}
.ytd-color-palette {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ytd-color-swatch {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.04);
}

.ytd-ocr-text {
  white-space: pre-wrap;
  color: #111827;
  font-weight: 600;
}

/* Subject & Focus text output uses line breaks */
#ytd-face-info,
.ytd-face-info {
  white-space: pre-wrap;
  color: #111827;
  font-weight: 600;
}
.ytd-insights-list {
  margin-top: 10px;
  padding-left: 0;
  list-style: none;
  color: #475569;
}

.ytd-insights-note {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
}

/* Insights cards */
.ytd-ins-item,
.ytd-ins-item.ytd-ins-item {
  margin: 10px 0;
}

.ytd-ins-item {
  border: 1px solid rgba(2, 6, 23, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.ytd-ins-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.ytd-ins-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
}

.ytd-ins-text {
  color: #334155;
  font-weight: 600;
  white-space: pre-wrap;
}

/* Confidence badges */
.ytd-conf {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(2, 6, 23, 0.08);
  white-space: nowrap;
}

.ytd-conf-high {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.28);
}

.ytd-conf-med {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.32);
}

.ytd-conf-low {
  background: rgba(148, 163, 184, 0.18);
  color: #334155;
  border-color: rgba(148, 163, 184, 0.38);
}

/* Subtle variants */
.ytd-ins-snapshot .ytd-ins-text {
  font-weight: 600;
  color: #475569;
}

.ytd-ins-tip .ytd-ins-text,
.ytd-ins-why .ytd-ins-text {
  font-weight: 600;
}

.ytd-advanced-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.ytd-preview-canvas {
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid rgba(2, 6, 23, 0.06);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.02);
}

@media (max-width: 880px) {
  .ytd-analysis-grid {
    grid-template-columns: 1fr;
  }
  .ytd-score-dashboard {
    flex-direction: column;
  }
}

/* Active tab state */
#ytd-preview-tabs .ytd-tab.is-active {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
}