/**
 * Headline Analyzer Panel Styles
 * Google-aligned headline analysis UI
 * Optimized for WordPress sidebar (~280px width)
 */

.headline-analyzer-panel {
  padding: 0;
  font-size: 13px;
  line-height: 1.4;
  margin: -16px; /* Offset parent padding for full width */
}

/* Loading & Empty States */
.headline-loading,
.headline-empty-state,
.headline-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  text-align: center;
  color: #6b7280;
}

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

.headline-error {
  color: #ef4444;
}

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

/* Overall Score Section - Compact horizontal layout */
.headline-overall {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.headline-score-circle {
  position: relative;
  flex-shrink: 0;
  margin-bottom: 14px;
}

.headline-score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 700;
}

.headline-score-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #6b7280;
  white-space: nowrap;
  font-weight: 500;
}

.headline-overall-info {
  flex: 1;
  min-width: 0; /* Allow text truncation */
}

.headline-overall-info h4 {
  margin: 0 0 2px 0;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

.headline-overall-desc {
  margin: 0;
  font-size: 11px;
  color: #6b7280;
}

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

.headline-title-source {
  padding: 10px 12px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.headline-title-source-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4f46e5;
  margin-bottom: 4px;
}

.headline-title-source-value {
  font-size: 12px;
  line-height: 1.45;
  color: #111827;
  word-break: break-word;
}

.headline-title-source-note {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: #6b7280;
  word-break: break-word;
}

/* Language Warning */
.headline-language-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 12px;
  background-color: #fef3c7;
  border-bottom: 1px solid #fcd34d;
  font-size: 11px;
  color: #92400e;
  line-height: 1.3;
}

.headline-warning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #f59e0b;
  color: white;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Length Info - Inline compact */
.headline-length-info {
  display: flex;
  justify-content: space-around;
  padding: 10px 12px;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  gap: 8px;
}

.headline-length-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.headline-length-label {
  font-size: 9px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  margin-bottom: 2px;
}

.headline-length-value {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
}

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

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

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

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

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

.headline-check-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}

.headline-check-arrow {
  font-size: 8px;
  color: #9ca3af;
}

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

.headline-risk-badge,
.headline-score-badge {
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

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

/* Issues List */
.headline-issues-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.headline-issue-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background-color: #f9fafb;
  border-radius: 4px;
  border-left: 3px solid;
}

.headline-issue-item:last-child {
  margin-bottom: 0;
}

.headline-issue-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: white;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.headline-issue-message {
  font-size: 11px;
  color: #374151;
  line-height: 1.35;
}

.headline-no-issues {
  margin: 0;
  padding: 6px 10px;
  background-color: #ecfdf5;
  border-radius: 4px;
  color: #047857;
  font-size: 11px;
}

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

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

.headline-stat span:first-child {
  font-size: 10px;
  color: #6b7280;
}

.headline-stat span:last-child {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
}

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

.headline-duplicates-label {
  margin: 0 0 6px 0;
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
}

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

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

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

.headline-duplicates-list a {
  color: #3b82f6;
  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: 10px;
  padding: 8px 10px;
  background-color: #f9fafb;
  border-radius: 4px;
}

.headline-schema-label {
  display: block;
  font-size: 10px;
  color: #6b7280;
  margin-bottom: 3px;
}

.headline-schema-value {
  font-size: 11px;
  color: #374151;
  font-style: italic;
  word-break: break-word;
}

/* Suggestions */
.headline-suggestions {
  padding: 10px 12px;
  background-color: #fffbeb;
  border-top: 1px solid #fcd34d;
}

.headline-suggestions h4 {
  margin: 0 0 8px 0;
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
  text-transform: uppercase;
}

.headline-suggestions ul {
  margin: 0;
  padding: 0 0 0 16px;
  list-style: disc;
}

.headline-suggestion {
  margin-bottom: 6px;
  font-size: 11px;
  color: #78350f;
  line-height: 1.35;
}

.headline-suggestion:last-child {
  margin-bottom: 0;
}

.headline-suggestion-high {
  font-weight: 500;
}

.headline-suggestion-high::marker {
  color: #ef4444;
}

.headline-suggestion-medium::marker {
  color: #f59e0b;
}

.headline-suggestion-low::marker {
  color: #3b82f6;
}

/* Info Footer */
.headline-info-footer {
  padding: 8px 12px;
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.headline-info-footer a {
  color: #6b7280;
  font-size: 10px;
  text-decoration: none;
}

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