/* ==========================================================================
   Kolkata Today CMS — SEO admin panel styles
   APPEND THIS to existing admin.css (do not replace).
   ========================================================================== */

/* ─── Collapsible SEO panel ─────────────────────────────── */
.kt-seo-panel {
  background: #fff;
  border: 1px solid var(--kt-admin-border);
  border-radius: 6px;
  margin: 0 0 18px;
  overflow: hidden;
}
.kt-seo-panel summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
  border-bottom: 1px solid var(--kt-admin-border);
  list-style: none;
  user-select: none;
}
.kt-seo-panel summary::-webkit-details-marker { display: none; }
.kt-seo-panel:not([open]) summary { border-bottom: 0; }
.kt-seo-panel summary::before {
  content: '▶';
  font-size: 10px;
  margin-right: 10px;
  color: var(--kt-admin-muted);
  transition: transform .15s;
}
.kt-seo-panel[open] summary::before { transform: rotate(90deg); }
.kt-seo-summary-left { display: flex; flex-direction: column; flex: 1; }
.kt-seo-summary-left strong { font-size: 14px; }
.kt-seo-summary-left small { color: var(--kt-admin-muted); font-size: 11px; }

/* SEO score badge in summary */
.kt-seo-score-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 4px 12px;
  background: #ddd;
  color: #444;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 700;
  min-width: 72px;
  justify-content: center;
}
.kt-seo-score-badge.good { background: #d4edda; color: #155724; }
.kt-seo-score-badge.ok   { background: #fff3cd; color: #856404; }
.kt-seo-score-badge.poor { background: #f8d7da; color: #721c24; }
.kt-seo-score-num { font-size: 16px; font-weight: 800; }
.kt-seo-score-label { font-size: 11px; opacity: .8; }

/* ─── Tabs inside the panel ─────────────────────────────── */
.kt-seo-tabs {
  display: flex;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--kt-admin-border);
  padding: 0 8px;
}
.kt-seo-tab {
  background: none;
  border: 0;
  padding: 12px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--kt-admin-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color .12s, border-color .12s;
}
.kt-seo-tab:hover { color: var(--kt-admin-text); }
.kt-seo-tab.active {
  color: var(--kt-admin-red);
  border-bottom-color: var(--kt-admin-red);
  font-weight: 600;
}

.kt-seo-tab-pane { display: none; padding: 20px 22px; }
.kt-seo-tab-pane.active { display: block; }

/* ─── Counters + help ───────────────────────────────────── */
.kt-counter {
  font-weight: 500;
  color: var(--kt-admin-muted);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  float: right;
}
.kt-counter.kt-c-good { color: #1e7a3a; }
.kt-counter.kt-c-warn { color: #b07820; }
.kt-counter.kt-c-bad  { color: #a83232; }
.kt-help-inline {
  font-weight: 400;
  color: var(--kt-admin-muted);
  font-size: 11px;
  margin-left: 8px;
}

/* ─── Snippet preview (Google-style) ────────────────────── */
.kt-snippet-preview { margin-top: 18px; }
.kt-snippet-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--kt-admin-muted);
  margin-bottom: 8px;
}
.kt-snippet-card {
  background: #fff;
  border: 1px solid var(--kt-admin-border);
  border-radius: 8px;
  padding: 14px 18px;
  font-family: arial, sans-serif;
  max-width: 600px;
}
.kt-snippet-url {
  color: #202124;
  font-size: 13px;
  margin-bottom: 4px;
}
.kt-snippet-title {
  color: #1a0dab;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 4px;
  cursor: pointer;
}
.kt-snippet-title:hover { text-decoration: underline; }
.kt-snippet-desc {
  color: #4d5156;
  font-size: 14px;
  line-height: 1.55;
}

/* ─── Social previews (OG / Twitter cards) ──────────────── */
.kt-seo-social-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.kt-seo-h {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--kt-admin-text);
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--kt-admin-red);
}
.kt-seo-social-preview { margin-top: 14px; }

.kt-og-card {
  background: #fff;
  border: 1px solid #dadde1;
  border-radius: 8px;
  overflow: hidden;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.kt-og-card img { width: 100%; aspect-ratio: 1.91/1; object-fit: cover; display: block; background: #ddd; }
.kt-og-img-fallback {
  width: 100%; aspect-ratio: 1.91/1;
  background: linear-gradient(135deg, #2c3e50, #c0392b);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.kt-og-body { padding: 10px 14px; background: #f0f2f5; }
.kt-og-domain { color: #606770; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.kt-og-title { color: #050505; font-size: 16px; font-weight: 600; margin: 4px 0 2px; line-height: 1.3; }
.kt-og-desc  { color: #606770; font-size: 13px; line-height: 1.4; max-height: 38px; overflow: hidden; }

.kt-tw-card {
  background: #fff;
  border: 1px solid #cfd9de;
  border-radius: 16px;
  overflow: hidden;
  font-family: 'Chirp', -apple-system, BlinkMacSystemFont, sans-serif;
}
.kt-tw-card img { width: 100%; aspect-ratio: 1.91/1; object-fit: cover; display: block; }
.kt-tw-body { padding: 10px 14px; }
.kt-tw-domain { color: #536471; font-size: 13px; }
.kt-tw-title { color: #0f1419; font-size: 15px; font-weight: 700; margin: 2px 0; line-height: 1.3; }
.kt-tw-desc  { color: #536471; font-size: 13px; line-height: 1.4; max-height: 36px; overflow: hidden; }

/* ─── Analysis tab ──────────────────────────────────────── */
.kt-analysis-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px;
  background: #fafbfc;
  border-radius: 6px;
  border: 1px solid var(--kt-admin-border);
}
.kt-analysis-score-ring {
  --p: 0;
  --c: #999;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #e8e8e8 0);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.kt-analysis-score-ring::before {
  content: ''; position: absolute; inset: 6px;
  background: #fff; border-radius: 50%;
}
.kt-analysis-score-num {
  position: relative; z-index: 1;
  font-size: 18px; font-weight: 800; color: var(--c);
}
.kt-analysis-summary-text strong { display: block; font-size: 16px; margin-bottom: 2px; }
.kt-analysis-summary-text small { color: var(--kt-admin-muted); font-size: 12px; }

.kt-analysis-checks {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kt-analysis-checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--kt-admin-border);
}
.kt-analysis-checks li:last-child { border-bottom: 0; }
.kt-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.kt-check-good { background: #d4edda; color: #155724; }
.kt-check-warn { background: #fff3cd; color: #856404; }
.kt-check-bad  { background: #f8d7da; color: #721c24; }
.kt-check-meta { color: var(--kt-admin-muted); font-size: 11px; }

/* ─── Site SEO settings page ────────────────────────────── */
.kt-seo-settings .kt-fieldset { padding: 18px 20px; }
.kt-seo-settings .kt-field { margin-bottom: 16px; }
.kt-seo-settings code {
  background: #f0f3f6; padding: 2px 6px; border-radius: 3px;
  font-size: 12px; font-family: ui-monospace, monospace;
}
.kt-seo-settings textarea.kt-textarea-mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 720px) {
  .kt-seo-social-cols { grid-template-columns: 1fr; }
  .kt-seo-tabs { overflow-x: auto; padding: 0; }
  .kt-seo-tab { padding: 10px 14px; font-size: 12px; white-space: nowrap; }
}
