/**
 * Headline Analyzer Panel — editorial typography
 * Matches the Content Analysis sidebar design system (ink/paper/copper).
 */

.headline-analyzer-panel {
  padding: 0;
  font-size: 13px;
  line-height: 1.4;
  margin: -16px;
  color: #0B0F1A;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Loading & Empty States */
.headline-loading,
.headline-empty-state,
.headline-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  text-align: center;
  color: #5B6475;
  font-size: 12px;
  line-height: 1.45;
}

.headline-loading .components-spinner {
  margin-bottom: 8px;
}

.headline-error {
  color: #B91C1C;
}

.headline-error .components-button {
  margin-top: 12px;
}

/* Overall Score — editorial number + italic accent */
.headline-overall {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 22px 16px 18px;
  background: #fff;
  border-bottom: 1px solid #E7EAF0;
  position: relative;
}

.headline-score-block {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-shrink: 0;
}

.headline-score-num {
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: #0B0F1A;
}
.headline-score-num.warn { color: #B64206; }
.headline-score-num.bad { color: #B91C1C; }

.headline-score-suffix {
  font-size: 15px;
  color: #5B6475;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.headline-score-label {
  display: none;
}

.headline-overall-info {
  flex: 1;
  min-width: 0;
}

.headline-overall-info h4 {
  margin: 0 0 4px 0;
  font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: #0B0F1A;
  line-height: 1.2;
}

.headline-overall-desc {
  margin: 0;
  font-size: 11px;
  color: #5B6475;
  line-height: 1.45;
}

.headline-refresh-spinner {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* Title source — eyebrow + value */
.headline-title-source {
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #E7EAF0;
}

.headline-title-source-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5B6475;
  margin-bottom: 8px;
}
.headline-title-source-label::before {
  content: '';
  width: 14px;
  height: 2px;
  background: #B64206;
  flex-shrink: 0;
}

.headline-title-source-value {
  font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.3;
  color: #0B0F1A;
  word-break: break-word;
}

.headline-title-source-note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: #5B6475;
  word-break: break-word;
}

/* Language Warning */
.headline-language-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  background: #FAF7F1;
  border-bottom: 1px solid #E7EAF0;
  border-left: 2px solid #B64206;
  font-size: 11px;
  color: #0B0F1A;
  line-height: 1.45;
}

.headline-warning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  color: #B64206;
}

/* Length Info — hairline-divided row */
.headline-length-info {
  display: flex;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #E7EAF0;
}

.headline-length-item {
  flex: 1;
  text-align: center;
  padding: 0 4px;
  border-right: 1px solid #E7EAF0;
}
.headline-length-item:last-child {
  border-right: none;
}

.headline-length-label {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  color: #5B6475;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 4px;
  font-weight: 600;
}

.headline-length-value {
  display: block;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0B0F1A;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.headline-length-value.bad { color: #B91C1C; }

/* Check Sections */
.headline-checks {
  border-top: 1px solid #E7EAF0;
}

.headline-check-section {
  border-bottom: 1px solid #E7EAF0;
}

.headline-check-section:last-child {
  border-bottom: none;
}

.headline-check-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s;
  font-family: inherit;
}

.headline-check-header:hover {
  background-color: #FAF7F1;
}

.headline-check-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: #0B0F1A;
}

.headline-check-arrow {
  font-size: 8px;
  color: #5B6475;
  font-style: normal;
}

.headline-check-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Risk + score badges — flat editorial */
.headline-risk-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  background: transparent;
}
.headline-risk-badge--low { color: #16A34A; background: #ECFDF5; }
.headline-risk-badge--medium { color: #B64206; background: #FAF7F1; }
.headline-risk-badge--high { color: #B91C1C; background: #FEF2F2; }

.headline-score-badge {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0B0F1A;
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.headline-score-badge.warn { color: #B64206; }
.headline-score-badge.bad { color: #B91C1C; }

.headline-check-content {
  padding: 0 16px 14px 16px;
}

/* Issues — hairline list */
.headline-issues-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #E7EAF0;
}

.headline-issue-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  margin-bottom: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #E7EAF0;
  border-radius: 0;
  border-left: none;
}

.headline-issue-item:last-child {
  border-bottom: none;
}

.headline-issue-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  background: transparent;
  color: #B64206;
  border-radius: 0;
}
.headline-issue-icon--high { color: #B91C1C; }
.headline-issue-icon--medium { color: #B64206; }
.headline-issue-icon--low { color: #5B6475; }

.headline-issue-message {
  font-size: 12px;
  color: #0B0F1A;
  line-height: 1.45;
}

.headline-no-issues {
  margin: 0;
  padding: 10px 12px;
  background: #FAF7F1;
  border-left: 2px solid #16A34A;
  border-radius: 0;
  color: #0B0F1A;
  font-size: 11px;
  line-height: 1.45;
}

/* Content Match Stats */
.headline-content-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E7EAF0;
}

.headline-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.headline-stat span:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  color: #5B6475;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.headline-stat span:last-child {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0B0F1A;
  letter-spacing: -0.02em;
}

/* Duplicates List */
.headline-duplicates {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E7EAF0;
}

.headline-duplicates-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  color: #5B6475;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
}
.headline-duplicates-label::before {
  content: '';
  width: 12px;
  height: 2px;
  background: #B64206;
  flex-shrink: 0;
}

.headline-duplicates-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.headline-duplicates-list li {
  padding: 6px 0;
  border-bottom: 1px solid #E7EAF0;
}

.headline-duplicates-list li:last-child {
  border-bottom: none;
}

.headline-duplicates-list a {
  color: #B64206;
  text-decoration: none;
  font-size: 11px;
  word-break: break-word;
}

.headline-duplicates-list a:hover {
  text-decoration: underline;
}

/* Schema Info */
.headline-schema-info {
  margin-top: 12px;
  padding: 10px 12px;
  background: #FAF7F1;
  border-left: 2px solid #B64206;
  border-radius: 0;
}

.headline-schema-label {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  color: #5B6475;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
}

.headline-schema-value {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: #0B0F1A;
  word-break: break-word;
  line-height: 1.4;
}

/* Suggestions */
.headline-suggestions {
  padding: 14px 16px;
  background: #FAF7F1;
  border-top: 1px solid #E7EAF0;
}

.headline-suggestions h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  color: #5B6475;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.headline-suggestions h4::before {
  content: '';
  width: 14px;
  height: 2px;
  background: #B64206;
  flex-shrink: 0;
}

.headline-suggestions ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.headline-suggestion {
  position: relative;
  padding: 8px 0 8px 14px;
  margin: 0;
  font-size: 12px;
  color: #0B0F1A;
  line-height: 1.45;
  border-bottom: 1px solid rgba(11, 15, 26, 0.08);
}
.headline-suggestion::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #B64206;
}
.headline-suggestion:last-child {
  border-bottom: none;
}

.headline-suggestion-high::before { background: #B91C1C; }
.headline-suggestion-medium::before { background: #B64206; }
.headline-suggestion-low::before { background: #5B6475; }

/* Info Footer */
.headline-info-footer {
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #E7EAF0;
  text-align: left;
}

.headline-info-footer a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  color: #5B6475;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.headline-info-footer a:hover {
  color: #B64206;
  text-decoration: underline;
}
