/* =========================================================
   GBP Completeness Checklist — Frontend Styles
   IntentiveSEO | https://intentiveseo.com/
   ========================================================= */

:root {
  --gbp-primary:      #1a73e8;
  --gbp-accent:       #0d47a1;
  --gbp-bg:           #ffffff;
  --gbp-surface:      #f8fafc;
  --gbp-border:       #e2e8f0;
  --gbp-text:         #1e293b;
  --gbp-muted:        #64748b;
  --gbp-success:      #16a34a;
  --gbp-warning:      #d97706;
  --gbp-danger:       #dc2626;
  --gbp-radius:       12px;
  --gbp-radius-sm:    8px;
  --gbp-shadow:       0 4px 24px rgba(0,0,0,0.08);
  --gbp-shadow-sm:    0 2px 8px rgba(0,0,0,0.06);
  --gbp-font:         'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Wrapper */
.gbp-tool-wrapper,
#gbp-checklist-app {
  font-family: var(--gbp-font);
  color: var(--gbp-text);
  width: 100%;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}

#gbp-checklist-app *,
#gbp-checklist-app *::before,
#gbp-checklist-app *::after {
  box-sizing: border-box;
}

/* ─── Step containers ──────────────────────────────────── */
.gbp-step { display: block; }

/* ─── Hero ─────────────────────────────────────────────── */
.gbp-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, var(--gbp-primary) 0%, var(--gbp-accent) 100%);
  border-radius: var(--gbp-radius);
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.gbp-hero::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.gbp-hero-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}

.gbp-tool-title {
  margin: 0 0 6px !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  line-height: 1.2 !important;
}

.gbp-tool-subtitle {
  margin: 0 !important;
  font-size: 0.95rem !important;
  color: rgba(255,255,255,0.85) !important;
  line-height: 1.5 !important;
}

/* ─── Form ─────────────────────────────────────────────── */
.gbp-business-form {
  background: var(--gbp-bg);
  border: 1px solid var(--gbp-border);
  border-radius: var(--gbp-radius);
  padding: 28px;
  box-shadow: var(--gbp-shadow-sm);
}

.gbp-form-group {
  margin-bottom: 18px;
}

.gbp-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gbp-text);
  margin-bottom: 6px;
}

.gbp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) {
  .gbp-form-row { grid-template-columns: 1fr; }
  .gbp-hero { flex-direction: column; text-align: center; }
}

.gbp-req { color: var(--gbp-danger); }
.gbp-opt { font-weight: 400; color: var(--gbp-muted); font-size: 0.8rem; }

.gbp-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gbp-border);
  border-radius: var(--gbp-radius-sm);
  font-size: 0.95rem;
  font-family: var(--gbp-font);
  color: var(--gbp-text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.gbp-input:focus {
  border-color: var(--gbp-primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.gbp-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.gbp-error-msg {
  background: #fef2f2;
  color: var(--gbp-danger);
  border: 1px solid #fecaca;
  border-radius: var(--gbp-radius-sm);
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.gbp-privacy-note {
  margin: 10px 0 0 !important;
  font-size: 0.8rem !important;
  color: var(--gbp-muted) !important;
  text-align: center !important;
}

/* ─── Buttons ──────────────────────────────────────────── */
.gbp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--gbp-radius-sm);
  font-family: var(--gbp-font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none !important;
}

.gbp-btn-primary {
  background: var(--gbp-primary);
  color: #fff !important;
}
.gbp-btn-primary:hover { background: var(--gbp-accent); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,115,232,0.3); }
.gbp-btn-primary:active { transform: translateY(0); }

.gbp-btn-lg {
  width: 100%;
  padding: 14px 24px;
  font-size: 1rem;
  margin-top: 4px;
}

.gbp-btn-ghost {
  background: transparent !important;
  color: var(--gbp-muted) !important;
  border: 1.5px solid var(--gbp-border) !important;
}
#gbp-checklist-app .gbp-btn-ghost:hover,
#gbp-checklist-app .gbp-btn-ghost:focus {
  background: rgba(26,115,232,0.06) !important;
  border-color: var(--gbp-primary) !important;
  color: var(--gbp-primary) !important;
  box-shadow: none !important;
  transform: none !important;
}

.gbp-btn-cta {
  background: #fff;
  color: var(--gbp-primary) !important;
  font-size: 1rem;
  padding: 14px 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.gbp-btn-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

.gbp-calculate-btn { margin-top: 24px; }

/* ─── Email gate ───────────────────────────────────────── */
.gbp-email-gate {
  text-align: center;
  background: var(--gbp-bg);
  border: 1px solid var(--gbp-border);
  border-radius: var(--gbp-radius);
  padding: 40px 32px;
  box-shadow: var(--gbp-shadow-sm);
}

.gbp-email-gate-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.gbp-email-gate h3 {
  font-size: 1.25rem !important;
  margin: 0 0 8px !important;
}

.gbp-email-gate p {
  color: var(--gbp-muted);
  margin: 0 0 20px !important;
}

.gbp-input-center { text-align: center; max-width: 340px; margin: 0 auto 16px; }

/* ─── Checklist header ─────────────────────────────────── */
.gbp-checklist-header {
  margin-bottom: 20px;
}

.gbp-business-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gbp-surface);
  border: 1px solid var(--gbp-border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.gbp-business-badge-sep { color: var(--gbp-muted); }

.gbp-checklist-intro {
  color: var(--gbp-muted);
  font-size: 0.9rem;
  margin: 0 !important;
}

/* ─── Progress ─────────────────────────────────────────── */
.gbp-progress-container {
  margin-top: 24px;
  margin-bottom: 24px;
}

.gbp-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gbp-muted);
  margin-bottom: 6px;
}

.gbp-progress-bar-bg {
  height: 8px;
  background: var(--gbp-border);
  border-radius: 100px;
  overflow: hidden;
}

.gbp-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gbp-primary) 0%, #4da3ff 50%, var(--gbp-accent) 100%);
  background-size: 200% 100%;
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: gbp-shimmer 2.5s linear infinite;
}
@keyframes gbp-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Sections ─────────────────────────────────────────── */
.gbp-section {
  background: var(--gbp-bg);
  border: 1px solid var(--gbp-border);
  border-radius: var(--gbp-radius);
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.gbp-section:hover { box-shadow: var(--gbp-shadow-sm); }

.gbp-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--gbp-surface);
  border-bottom: 1px solid var(--gbp-border);
}

.gbp-section-header h3 {
  margin: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  flex: 1;
}

.gbp-section-icon { font-size: 1.1rem; }

.gbp-section-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--gbp-border);
  color: var(--gbp-muted);
  padding: 3px 10px;
  border-radius: 100px;
  transition: all 0.2s;
}

.gbp-badge-complete {
  background: #dcfce7;
  color: var(--gbp-success);
}

/* ─── Checklist items ──────────────────────────────────── */
.gbp-checklist-items { padding: 8px 0; }

.gbp-check-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--gbp-surface);
  transition: background 0.15s;
  position: relative;
}
.gbp-check-row:last-child { border-bottom: none; }
.gbp-check-row:hover { background: var(--gbp-surface); }

.gbp-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.gbp-check-item {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--gbp-primary);
  cursor: pointer;
}

.gbp-check-text {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--gbp-text);
}

.gbp-check-label:has(.gbp-check-item:checked) .gbp-check-text {
  color: var(--gbp-muted);
  text-decoration: line-through;
}

.gbp-check-points {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gbp-primary);
  background: rgba(26,115,232,0.1);
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

.gbp-tip-btn {
  background: transparent;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  color: var(--gbp-muted);
  flex-shrink: 0;
  border-radius: 4px;
  display: flex; align-items: center;
  transition: color 0.15s;
}
.gbp-tip-btn:hover { color: var(--gbp-primary); }

.gbp-check-tip {
  display: none;
  width: 100%;
  background: #eff6ff;
  border-left: 3px solid var(--gbp-primary);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #1e40af;
  line-height: 1.5;
  margin-top: 4px;
}
.gbp-tip-visible { display: block; }

/* ─── PageSpeed ────────────────────────────────────────── */
.gbp-ps-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  gap: 12px;
  color: var(--gbp-muted);
  font-size: 0.9rem;
}

.gbp-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--gbp-border);
  border-top-color: var(--gbp-primary);
  border-radius: 50%;
  animation: gbp-spin 0.8s linear infinite;
}

@keyframes gbp-spin { to { transform: rotate(360deg); } }

.gbp-ps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px 20px;
}

@media (min-width: 480px) { .gbp-ps-grid { grid-template-columns: repeat(4, 1fr); } }

.gbp-ps-card {
  text-align: center;
  padding: 12px 8px;
  background: var(--gbp-surface);
  border-radius: 8px;
  border: 1px solid var(--gbp-border);
}

.gbp-ps-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gbp-text);
  line-height: 1;
  margin-bottom: 4px;
}

.gbp-ps-metric {
  font-size: 0.72rem;
  color: var(--gbp-muted);
  line-height: 1.3;
}

.gbp-ps-warn {
  background: #fffbeb;
  border-top: 1px solid var(--gbp-border);
  padding: 10px 20px;
  font-size: 0.85rem;
  color: #92400e;
  margin: 0 !important;
}

.gbp-ps-error {
  padding: 16px 20px;
  color: var(--gbp-muted);
  font-size: 0.875rem;
  margin: 0 !important;
}

/* ─── Results ──────────────────────────────────────────── */
.gbp-results-header {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--gbp-bg);
  border: 1px solid var(--gbp-border);
  border-radius: var(--gbp-radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--gbp-shadow-sm);
}

@media (max-width: 520px) {
  .gbp-results-header { flex-direction: column; text-align: center; }
}

.gbp-score-circle-wrap {
  position: relative;
  width: 120px; height: 120px;
  flex-shrink: 0;
}

.gbp-score-ring {
  width: 120px; height: 120px;
  transform: rotate(-90deg);
}

.gbp-ring-bg {
  fill: none;
  stroke: var(--gbp-border);
  stroke-width: 10;
}

.gbp-ring-fill {
  fill: none;
  stroke: var(--gbp-primary);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 339.29;
  stroke-dashoffset: 339.29;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s;
}

.gbp-score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gbp-score-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gbp-text);
}

.gbp-score-label {
  font-size: 0.75rem;
  color: var(--gbp-muted);
}

.gbp-score-summary { flex: 1; min-width: 0; }

.gbp-score-grade {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  margin: 0 0 6px !important;
}

.gbp-score-description {
  font-size: 0.9rem !important;
  color: var(--gbp-muted) !important;
  line-height: 1.5 !important;
  margin: 0 0 10px !important;
}

.gbp-score-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.gbp-meta-item {
  font-size: 0.8rem;
  background: var(--gbp-surface);
  border: 1px solid var(--gbp-border);
  padding: 3px 10px;
  border-radius: 100px;
  color: var(--gbp-muted);
}

/* ─── Breakdown ────────────────────────────────────────── */
.gbp-results-breakdown {
  background: var(--gbp-bg);
  border: 1px solid var(--gbp-border);
  border-radius: var(--gbp-radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.gbp-breakdown-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gbp-surface);
}
.gbp-breakdown-row:last-child { border-bottom: none; }

.gbp-bd-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.gbp-bd-title {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gbp-bd-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.gbp-bd-bar-wrap {
  width: 80px;
  height: 6px;
  background: var(--gbp-border);
  border-radius: 100px;
  overflow: hidden;
}

.gbp-bd-bar {
  height: 100%;
  border-radius: 100px;
  transition: width 1s;
}

.gbp-bd-pct {
  font-size: 0.8rem;
  font-weight: 600;
  width: 56px;
  text-align: right;
}

/* ─── Recommendations ──────────────────────────────────── */
.gbp-recommendations {
  background: var(--gbp-bg);
  border: 1px solid var(--gbp-border);
  border-radius: var(--gbp-radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.gbp-rec-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 16px 20px;
  background: var(--gbp-surface);
  border-bottom: 1px solid var(--gbp-border);
}

.gbp-rec-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gbp-surface);
}
.gbp-rec-item:last-child { border-bottom: none; }

.gbp-rec-num {
  width: 28px; height: 28px;
  background: var(--gbp-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.gbp-rec-body { flex: 1; min-width: 0; }

.gbp-rec-label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.gbp-rec-pts {
  font-size: 0.75rem;
  color: var(--gbp-primary);
  font-weight: 700;
  background: rgba(26,115,232,0.1);
  padding: 1px 6px;
  border-radius: 100px;
}

.gbp-rec-section {
  font-size: 0.77rem;
  color: var(--gbp-muted);
  margin-bottom: 4px;
}

.gbp-rec-tip {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

.gbp-no-recs {
  padding: 20px;
  text-align: center;
  color: var(--gbp-success);
  font-weight: 600;
  margin: 0 !important;
}

/* ─── CTA Block ────────────────────────────────────────── */
.gbp-cta-block {
  margin-bottom: 20px;
}

.gbp-cta-inner {
  background: linear-gradient(135deg, var(--gbp-primary) 0%, var(--gbp-accent) 100%);
  border-radius: var(--gbp-radius);
  padding: 32px;
  text-align: center;
  color: #fff;
}

.gbp-cta-inner h3 {
  margin: 0 0 8px !important;
  font-size: 1.25rem !important;
  color: #fff !important;
}

.gbp-cta-inner p {
  margin: 0 0 20px !important;
  color: rgba(255,255,255,0.85) !important;
  font-size: 0.95rem !important;
}

/* ─── Restart + Footer ─────────────────────────────────── */
.gbp-restart-wrap {
  text-align: center;
  margin: 16px 0 8px;
}

.gbp-tool-footer {
  text-align: center;
  padding: 12px 0 4px;
  border-top: 1px solid var(--gbp-border);
  margin-top: 16px;
}

.gbp-tool-footer p {
  font-size: 0.8rem !important;
  color: var(--gbp-muted) !important;
  margin: 0 !important;
}

/* ═══════════════════════════════════════════════
   v2.0 ADDITIONS — Entity Classification UI
   ═══════════════════════════════════════════════ */

/* ── Classifier tag (shown on each checklist item) */
.gbp-classifier-tag {
    display: inline-block;
    font-size: 10px;
    font-family: 'Courier New', monospace;
    color: #6366f1;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 4px;
    padding: 1px 6px;
    margin: 0 6px 0 0;
    letter-spacing: 0.02em;
    white-space: nowrap;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ── Tier badges on section headers */
.gbp-tier-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 4px;
}
.gbp-tier-1 { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.gbp-tier-2 { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.gbp-tier-3 { background: #fefce8; color: #ca8a04; border: 1px solid #fde68a; }
.gbp-tier-4 { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* ── Section header layout update */
.gbp-section-header-top {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* ── Impact-level left border on check rows */
.gbp-check-row.gbp-impact-critical { border-left: 3px solid #dc2626; }
.gbp-check-row.gbp-impact-high     { border-left: 3px solid #d97706; }
.gbp-check-row.gbp-impact-medium   { border-left: 3px solid #6b7280; }
.gbp-check-row.gbp-impact-low      { border-left: 3px solid #d1d5db; }

/* ── Ranking Layer Analysis block */
.gbp-ranking-layers {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}
.gbp-layers-intro {
    color: #6b7280;
    font-size: 13px;
    margin: 10px 0 16px;
}
.gbp-layers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.gbp-layer-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
}
.gbp-layer-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.gbp-layer-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.gbp-layer-info { flex: 1; min-width: 0; }
.gbp-layer-name {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: #111827;
}
.gbp-layer-desc {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 1px;
}
.gbp-layer-pct {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.gbp-layer-bar-bg {
    background: #e5e7eb;
    height: 5px;
    border-radius: 99px;
    overflow: hidden;
}
.gbp-layer-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(.4,0,.2,1);
}

/* ── Breakdown row tier label */
.gbp-bd-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gbp-bd-tier {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

/* ── Recommendation card enhancements */
.gbp-rec-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}
.gbp-rec-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.gbp-rec-classifier {
    font-size: 10px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}
.gbp-tier-mini {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}
.gbp-rec-tier-1 { border-left: 3px solid #dc2626; }
.gbp-rec-tier-2 { border-left: 3px solid #ea580c; }
.gbp-rec-tier-3 { border-left: 3px solid #ca8a04; }
.gbp-rec-tier-4 { border-left: 3px solid #16a34a; }

/* ═══════════════════════════════════════════════
   v2.1 ADDITIONS — Modal, Checklist-intro fixes
   ═══════════════════════════════════════════════ */

/* ── Custom modal (replaces browser confirm) ── */
.gbp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.gbp-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
    animation: gbp-modal-in 0.18s ease;
}
@keyframes gbp-modal-in {
    from { transform: scale(0.93); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.gbp-modal-icon { font-size: 36px; margin-bottom: 12px; line-height: 1; }
.gbp-modal h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
}
.gbp-modal p {
    font-size: 14px;
    color: #4b5563;
    margin: 0 0 24px;
    line-height: 1.6;
}
.gbp-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Checklist intro text ── */
.gbp-checklist-intro {
}


/* ── PageSpeed URL field wrapper ── */
.gbp-ps-url-wrap {
    background: var(--gbp-surface);
    border: 1px dashed var(--gbp-border);
    border-radius: var(--gbp-radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.gbp-form-group-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.gbp-form-group-inline label {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    margin-bottom: 0;
    color: var(--gbp-text);
}
.gbp-form-group-inline .gbp-input {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════
   v2.2 ADDITIONS
   — Heading-tag replacements (visual parity via CSS)
   — Tier group headers in action plan
   — Sticky calculate bar
   — Print styles
   — Misc UX polish
   ═══════════════════════════════════════════════════════════ */

/* ── Heading replacements ─────────────────────────────────── */
/* All heading-like elements are now p/span/div with these classes */

.gbp-tool-title {
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.2;
}

.gbp-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
}

.gbp-email-gate-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gbp-text);
    margin: 0 0 10px;
    text-align: center;
}

.gbp-score-grade {
    font-size: clamp(22px, 5vw, 30px);
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.1;
}

.gbp-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gbp-text);
    flex: 1;
    min-width: 0;
}

.gbp-rec-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--gbp-text);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gbp-rec-subtitle {
    font-size: 13px;
    color: var(--gbp-muted);
    margin: 8px 0 20px;
}

/* ── Sticky calculate bar ─────────────────────────────────── */
.gbp-calculate-sticky {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, #fff 85%, transparent);
    padding: 10px 0 20px;
    margin-top: 8px;
    text-align: center;
    z-index: 10;
}

/* ── Tier group headers in action plan ────────────────────── */
.gbp-rec-tier-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: var(--gbp-radius-sm);
    padding: 14px 16px;
    margin: 28px 0 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.gbp-rec-tier-header:first-child { margin-top: 0; }

.gbp-rec-tier-header-1 { background: #fef2f2; border-left: 4px solid #dc2626; }
.gbp-rec-tier-header-2 { background: #fff7ed; border-left: 4px solid #ea580c; }
.gbp-rec-tier-header-3 { background: #fefce8; border-left: 4px solid #ca8a04; }
.gbp-rec-tier-header-4 { background: #f0fdf4; border-left: 4px solid #16a34a; }

.gbp-rec-tier-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.gbp-rec-tier-emoji {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.gbp-rec-tier-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gbp-rec-tier-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--gbp-text);
    white-space: nowrap;
}

.gbp-rec-tier-desc {
    font-size: 12px;
    color: var(--gbp-muted);
    line-height: 1.4;
}

.gbp-rec-tier-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--gbp-muted);
    white-space: nowrap;
    background: rgba(0,0,0,0.06);
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* ── Recommendation items — updated (no pts, no tier pill) ── */
.gbp-rec-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--gbp-surface);
    border: 1px solid var(--gbp-border);
    border-radius: var(--gbp-radius-sm);
    margin-bottom: 10px;
    transition: box-shadow 0.15s;
}

.gbp-rec-item:hover { box-shadow: var(--gbp-shadow-sm); }

/* Impact-level left accent on rec items */
.gbp-rec-impact-critical { border-left: 3px solid #dc2626; }
.gbp-rec-impact-high     { border-left: 3px solid #d97706; }
.gbp-rec-impact-medium   { border-left: 3px solid #6b7280; }
.gbp-rec-impact-low      { border-left: 3px solid #d1d5db; }

.gbp-rec-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--gbp-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.gbp-rec-body { flex: 1; min-width: 0; }

.gbp-rec-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gbp-text);
    margin: 0 0 6px;
    line-height: 1.5;
}

.gbp-rec-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.gbp-rec-section {
    font-size: 11px;
    color: var(--gbp-muted);
}

.gbp-rec-classifier {
    font-size: 10px;
    font-family: 'Courier New', monospace;
    color: #6366f1;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 4px;
    padding: 1px 5px;
}

.gbp-rec-impact {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.gbp-rec-tip {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    background: #fff;
    border-left: 3px solid var(--gbp-border);
    padding: 10px 12px;
    border-radius: 0 6px 6px 0;
    margin: 0;
}

/* ── Action plan summary footer ─────────────────────────── */
.gbp-rec-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 16px;
    background: var(--gbp-surface);
    border: 1px solid var(--gbp-border);
    border-radius: var(--gbp-radius-sm);
    font-size: 12px;
    color: var(--gbp-muted);
    margin-top: 20px;
}

.gbp-rec-summary span:last-child {
    font-weight: 600;
    color: var(--gbp-primary);
}

/* ── No-recs state ──────────────────────────────────────── */
.gbp-no-recs {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--gbp-radius-sm);
}

.gbp-no-recs-icon { font-size: 28px; line-height: 1; }
.gbp-no-recs p { margin: 0; font-size: 14px; line-height: 1.6; color: #14532d; }

/* ── Results actions bar ────────────────────────────────── */
.gbp-results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 28px 0 16px;
}

/* Outline button variant */
.gbp-btn-outline {
    background: transparent !important;
    border: 2px solid var(--gbp-border) !important;
    color: var(--gbp-text) !important;
}

#gbp-checklist-app .gbp-btn-outline:hover,
#gbp-checklist-app .gbp-btn-outline:focus {
    border-color: var(--gbp-primary) !important;
    color: var(--gbp-primary) !important;
    background: rgba(26,115,232,0.06) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ── Print styles ───────────────────────────────────────── */
@media print {
    /* ── Hide the entire page, then selectively reveal the tool ── */
    /* This prevents theme header, nav, sidebar, footer from printing */
    body {
        visibility: hidden !important;
    }

    /* Reveal only the tool and all its descendants */
    #gbp-checklist-app,
    #gbp-checklist-app * {
        visibility: visible !important;
    }

    /* Position the tool at the top-left of the printed page */
    #gbp-checklist-app {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    /* Within the tool: hide the checklist phase, show only results */
    #gbp-step-checklist,
    #gbp-step-email,
    .gbp-modal-overlay,
    .gbp-results-actions,
    .gbp-calculate-sticky,
    .gbp-credit,
    .gbp-classifier-explainer { display: none !important; visibility: hidden !important; }

    #gbp-step-results { display: block !important; visibility: visible !important; }

    .gbp-tool-wrapper {
        max-width: 100%;
        padding: 0;
        box-shadow: none;
    }

    .gbp-rec-item    { break-inside: avoid; }
    .gbp-rec-tier-header { break-inside: avoid; break-before: auto; }
    .gbp-layer-card  { break-inside: avoid; }
    .gbp-ranking-layers { page-break-before: always; }

    .gbp-rec-tip {
        background: #f9fafb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ── Mobile tweaks ─────────────────────────────────────── */
@media (max-width: 600px) {
    .gbp-rec-tier-header { flex-direction: column; align-items: flex-start; }
    .gbp-rec-tier-count  { align-self: flex-start; }
    .gbp-rec-meta        { gap: 6px; }
}

/* ═══════════════════════════════════════════════════════════
   v2.3 ADDITIONS
   — Full-width tool (fills page container)
   — Enhanced progress bar (shimmer, pct, milestones)
   — Classifier explainer panel
   — Credit attribution block
   ═══════════════════════════════════════════════════════════ */

/* ── Progress — enhanced layout ─────────────────────────── */
.gbp-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.gbp-progress-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gbp-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gbp-progress-right {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.gbp-progress-pct {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gbp-primary);
    min-width: 52px;
    text-align: right;
    transition: color 0.3s;
    font-variant-numeric: tabular-nums;
}

.gbp-progress-count {
    font-size: 0.78rem;
    color: var(--gbp-muted);
}

/* Track wrapper holds bar + milestone ticks */
.gbp-progress-track-wrap {
    position: relative;
    margin-bottom: 4px;
}

/* Taller, more prominent bar */
.gbp-progress-bar-bg {
    height: 12px !important;
    background: var(--gbp-border);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.gbp-progress-bar-fill {
    position: relative;
    z-index: 1;
    border-radius: 100px;
    height: 100%;
}

/* Milestone tick marks — rendered as thin vertical lines via box-shadow trick,
   no emoji so nothing clips outside the overflow:hidden bar */
.gbp-progress-milestones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 12px;
    pointer-events: none;
    overflow: hidden;
    border-radius: 100px;
}

.gbp-milestone {
    position: absolute;
    transform: translateX(-50%);
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.5);
    transition: background 0.3s;
    user-select: none;
    font-size: 0;  /* hide any text/emoji — milestones are purely visual lines */
}

.gbp-milestone-passed {
    background: rgba(255,255,255,0.6);
}

/* Milestone percentage labels row below bar */
.gbp-progress-milestones-labels {
    position: relative;
    height: 16px;
    margin-top: 3px;
}

.gbp-progress-milestones-labels span {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.68rem;
    color: var(--gbp-border);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Classifier explainer panel ──────────────────────────── */
.gbp-classifier-explainer {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f8f7ff;
    border: 1px solid #ddd6fe;
    border-left: 4px solid #7c3aed;
    border-radius: var(--gbp-radius-sm);
    padding: 16px 18px;
    margin: 16px 0 0;
}

.gbp-classifier-explainer-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.gbp-classifier-explainer-body {
    flex: 1;
    min-width: 0;
}

.gbp-classifier-explainer-title {
    font-size: 13px;
    font-weight: 700;
    color: #4c1d95;
    margin: 0 0 5px;
}

.gbp-classifier-explainer-text {
    font-size: 13px;
    color: #5b21b6;
    line-height: 1.6;
    margin: 0;
}

.gbp-classifier-explainer-text code {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
    padding: 1px 5px;
    border-radius: 3px;
}

/* ── Credit attribution ──────────────────────────────────── */
.gbp-credit {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: var(--gbp-surface);
    border: 1px solid var(--gbp-border);
    border-radius: var(--gbp-radius-sm);
    margin-top: 24px;
}

.gbp-credit-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1.5;
}

.gbp-credit p {
    margin: 0 !important;
    font-size: 12px;
    color: var(--gbp-muted);
    line-height: 1.6;
}

.gbp-credit a {
    color: var(--gbp-primary);
    text-decoration: none;
    font-weight: 600;
}

.gbp-credit a:hover {
    text-decoration: underline;
}

/* ── Responsive: full-width tool on any screen ───────────── */
/* Ensure the tool never enforces an inner max-width that fights the page */
.gbp-tool-wrapper { padding: 0 !important; margin: 0 !important; }
#gbp-checklist-app { padding: 0 !important; margin: 0 !important; }

/* Print: also hide credit (personal, not useful on paper) */
@media print {
    .gbp-credit,
    .gbp-classifier-explainer { display: none !important; }
}
