/* SEO Dashboard — V2 styles
   Extends styles.css + scout.css (shared CCR design tokens). */

/* (.gate-form-stacked is shared — defined in scout.css) */

/* ---------- Member badge ---------- */

.member-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
}
.member-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #5aaf6a;
  display: inline-block;
}
.member-badge .signout {
  margin-left: 6px;
  color: var(--tan-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 12px;
}

/* ---------- Stats strip ---------- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--tan);
}
.stat-card.stat-total       { border-left-color: var(--charcoal); }
.stat-card.stat-notstarted  { border-left-color: var(--muted); }
.stat-card.stat-drafts      { border-left-color: var(--tan-dark); }
.stat-card.stat-published   { border-left-color: #5aaf6a; }
.stat-card.stat-ranking     { border-left-color: var(--tan); }

.stat-value {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  color: var(--charcoal);
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-strong);
  font-weight: 500;
  margin-top: 4px;
}

/* ---------- Add keyword form ---------- */

.add-keyword-wrap { margin-bottom: 24px; }

.add-form {
  margin-top: 14px;
}

.add-form h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 14px;
}

.add-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.add-form .field {
  margin-bottom: 12px;
}
.add-form .field:last-child { margin-bottom: 0; }

.add-form .field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-strong);
  font-weight: 500;
  margin-bottom: 6px;
}
.add-form .req { color: var(--danger); }

.add-form input,
.add-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--charcoal);
  background: var(--cream-3);
  outline: none;
  box-sizing: border-box;
}
.add-form input:focus,
.add-form select:focus {
  border-color: var(--tan);
  box-shadow: 0 0 0 3px var(--tan-pale);
}

.add-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 720px) {
  .add-grid { grid-template-columns: 1fr; }
}

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.empty-sub {
  color: var(--muted);
  font-size: 14.5px;
}
.empty-sub a {
  color: var(--tan-dark);
  text-decoration: none;
  font-weight: 500;
}
.empty-sub a:hover { text-decoration: underline; }

/* ---------- Keywords table ---------- */

.dashboard-table-wrap {
  margin-bottom: 24px;
}

.dashboard-table .kw-cell {
  min-width: 200px;
}
.dashboard-table .kw-text {
  font-weight: 500;
  color: var(--charcoal);
  font-size: 14.5px;
}
.dashboard-table .kw-notes {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.diff-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.diff-bar-track {
  width: 50px; height: 6px;
  border-radius: 3px;
  background: var(--tan-pale);
  overflow: hidden;
}
.diff-bar-fill { height: 100%; border-radius: 3px; }
.diff-bar-fill.diff-easy   { background: #5aaf6a; }
.diff-bar-fill.diff-medium { background: var(--tan); }
.diff-bar-fill.diff-hard   { background: var(--danger); }

.intent-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.intent-pill.intent-Informational { background: rgba(196, 149, 106, 0.16); color: var(--tan-dark); }
.intent-pill.intent-Commercial    { background: rgba(212, 101, 74, 0.12); color: var(--danger); }
.intent-pill.intent-Transactional { background: rgba(90, 175, 106, 0.16); color: #3a8d4f; }

.status-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: var(--cream-3);
  border-radius: 999px;
  padding: 6px 24px 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--charcoal);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted-strong) 50%),
                    linear-gradient(135deg, var(--muted-strong) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.status-select.s-NotStarted     { background-color: rgba(0, 0, 0, 0.05); color: var(--muted); }
.status-select.s-DraftGenerated { background-color: var(--tan-pale); color: var(--tan-dark); }
.status-select.s-Published      { background-color: rgba(90, 175, 106, 0.16); color: #3a8d4f; }
.status-select.s-Ranking        { background-color: rgba(196, 149, 106, 0.22); color: var(--tan-dark); }

.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-pkg {
  background: linear-gradient(135deg, var(--tan) 0%, var(--tan-dark) 100%);
  border: 0;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn-pkg:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(168, 125, 85, 0.25); }
.btn-pkg:disabled { opacity: 0.6; cursor: wait; }

.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.btn-icon:hover { border-color: var(--danger); color: var(--danger); background: rgba(212,101,74,0.05); }

/* ---------- Package modal ---------- */

.pkg-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pkg-modal[hidden] { display: none; }
.pkg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 42, 51, 0.55);
}
.pkg-modal-body {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 36px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  font-family: var(--font-body);
}

.pkg-close {
  position: absolute;
  top: 14px; right: 14px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.pkg-close:hover { background: var(--cream-3); color: var(--charcoal); }

.pkg-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tan-dark);
  font-weight: 600;
  margin-bottom: 6px;
}

.pkg-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.pkg-meta-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.pkg-meta-chips .chip {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--cream-3);
  color: var(--muted-strong);
  font-weight: 600;
}

.pkg-section {
  background: var(--cream-3);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.pkg-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.pkg-section-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tan-dark);
  font-weight: 700;
}
.pkg-section-tip {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.pkg-section-value {
  font-size: 14.5px;
  color: var(--charcoal);
  font-weight: 500;
  line-height: 1.5;
  word-break: break-word;
}
.pkg-char-count { font-size: 11px; margin-top: 6px; }
.pkg-char-count.ok   { color: #3a8d4f; }
.pkg-char-count.over { color: var(--danger); }

.copy-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--tan-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { background: var(--tan-pale); border-color: var(--tan); }
.copy-btn.copied { background: #5aaf6a; color: #fff; border-color: #5aaf6a; }

.outline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.outline-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.5;
}
.outline-list li:last-child { border-bottom: 0; }
.outline-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tan), var(--tan-dark));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pkg-cta-box {
  background: linear-gradient(135deg, rgba(196, 149, 106, 0.10), rgba(196, 149, 106, 0.04));
  border: 1px solid rgba(196, 149, 106, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 12px;
}
.pkg-cta-box .pkg-section-label { color: var(--tan-dark); }

.pkg-cta-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.pkg-cta-body {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.6;
}

.pkg-cta-intro {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(196, 149, 106, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--charcoal);
  line-height: 1.6;
}

/* The full content brief — preserves linebreaks so the on-screen layout
   matches exactly what lands on the clipboard. */
.pkg-cta-brief {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(196, 149, 106, 0.20);
  border-radius: 8px;
  padding: 16px 18px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--charcoal);
  line-height: 1.65;
  white-space: pre-wrap;
  word-wrap: break-word;
}

@media (max-width: 640px) {
  .pkg-modal-body { padding: 22px 18px; }
  .pkg-title { font-size: 22px; }
}
