/* ============================================================
   Atlas Refurbished Graden Page + PDP Grade Widget
   atlas-graden.css — loaded via atlas-graden.php mu-plugin
   Author: Atlas Jarvis 2026-06-09
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --aw-grade-a:      #16a34a;
  --aw-grade-a-bg:   #f0fdf4;
  --aw-grade-a-border: #bbf7d0;
  --aw-grade-b:      #2563eb;
  --aw-grade-b-bg:   #eff6ff;
  --aw-grade-b-border: #bfdbfe;
  --aw-grade-c:      #d97706;
  --aw-grade-c-bg:   #fffbeb;
  --aw-grade-c-border: #fde68a;
  --aw-grade-new:    #7c3aed;
  --aw-grade-new-bg: #f5f3ff;
  --aw-grade-new-border: #ddd6fe;
  --aw-navy:         #0e2a47;
  --aw-ink:          #0b1730;
  --aw-ink-soft:     #42526f;
  --aw-line:         #e2e8f0;
  --aw-surface:      #f8fafc;
  --aw-radius:       12px;
  --aw-shadow:       0 2px 16px rgba(14,42,71,.09);
}

/* ── Page wrapper ───────────────────────────────────────────── */
.aw-graden-page {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--aw-ink);
  line-height: 1.6;
}
.aw-graden-container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Hero ───────────────────────────────────────────────────── */
.aw-graden-hero {
  background: linear-gradient(135deg, #0e2a47 0%, #1d4ed8 100%);
  color: #fff;
  padding: 56px 20px 48px;
  text-align: center;
}
.aw-graden-hero__inner {
  max-width: 760px;
  margin: 0 auto;
}
.aw-graden-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 16px;
  line-height: 1.25;
  color: #fff;
}
.aw-graden-hero__sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.85);
  margin: 0;
}

/* ── Grade card grid ────────────────────────────────────────── */
.aw-graden-table-section {
  padding: 48px 20px;
  background: var(--aw-surface);
}
.aw-graden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* ── Individual grade card ──────────────────────────────────── */
.aw-grade-card {
  background: #fff;
  border-radius: var(--aw-radius);
  border: 2px solid var(--aw-line);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--aw-shadow);
  transition: transform .15s, box-shadow .15s;
}
.aw-grade-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 28px rgba(14,42,71,.14);
}
.aw-grade-card--a { border-color: var(--aw-grade-a-border); }
.aw-grade-card--b { border-color: var(--aw-grade-b-border); }
.aw-grade-card--c { border-color: var(--aw-grade-c-border); }
.aw-grade-card--new { border-color: var(--aw-grade-new-border); }

.aw-grade-card__badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 5px 14px;
  border-radius: 999px;
  width: fit-content;
  color: #fff;
}
.aw-grade-card--a .aw-grade-card__badge  { background: var(--aw-grade-a); }
.aw-grade-card--b .aw-grade-card__badge  { background: var(--aw-grade-b); }
.aw-grade-card--c .aw-grade-card__badge  { background: var(--aw-grade-c); }
.aw-grade-card--new .aw-grade-card__badge{ background: var(--aw-grade-new); }

.aw-grade-card__label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--aw-ink-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: -8px;
}

/* ── Screen wear visualisation ──────────────────────────────── */
.aw-grade-card__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.aw-screen-sim {
  width: 140px;
  height: 88px;
  background: #1e293b;
  border-radius: 6px;
  border: 3px solid #334155;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.4);
}
/* subtle glow on A/new */
.aw-screen-sim--a,
.aw-screen-sim--new {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
/* screen content dots */
.aw-screen-sim__dot {
  position: absolute;
  top: 12px; left: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
}
/* scratch lines for B/C */
.aw-screen-sim__scratch {
  position: absolute;
  top: 20px; left: 30px;
  width: 60px; height: 1px;
  background: rgba(255,255,255,.25);
  transform: rotate(-18deg);
}
.aw-screen-sim__scratch--2 {
  top: 40px; left: 50px;
  width: 45px;
  transform: rotate(12deg);
  background: rgba(255,255,255,.18);
}
.aw-screen-sim--c .aw-screen-sim__scratch,
.aw-screen-sim--c .aw-screen-sim__scratch--2 {
  background: rgba(255,255,255,.4);
}
.aw-screen-sim__caption {
  font-size: .75rem;
  color: var(--aw-ink-soft);
  margin: 0;
  text-align: center;
}

/* ── Checklist ──────────────────────────────────────────────── */
.aw-grade-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .875rem;
}
.aw-grade-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.aw-check {
  flex-shrink: 0;
  font-weight: 700;
  line-height: 1.4;
}
.aw-check--ok   { color: var(--aw-grade-a); }
.aw-check--warn { color: var(--aw-grade-c); }

/* ── Ideal for footer ───────────────────────────────────────── */
.aw-grade-card__for {
  font-size: .8rem;
  color: var(--aw-ink-soft);
  background: var(--aw-surface);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: auto;
}
.aw-grade-card--a .aw-grade-card__for { background: var(--aw-grade-a-bg); }
.aw-grade-card--b .aw-grade-card__for { background: var(--aw-grade-b-bg); }
.aw-grade-card--c .aw-grade-card__for { background: var(--aw-grade-c-bg); }
.aw-grade-card--new .aw-grade-card__for { background: var(--aw-grade-new-bg); }

/* ── Info note ──────────────────────────────────────────────── */
.aw-graden-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--aw-radius);
  padding: 16px 20px;
  font-size: .9rem;
  color: #1e3a5f;
}
.aw-graden-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #2563eb;
}
.aw-graden-note p { margin: 0; }

/* ── Compare table ──────────────────────────────────────────── */
.aw-graden-compare {
  padding: 48px 20px;
  background: #fff;
}
.aw-graden-compare h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--aw-navy);
}
.aw-graden-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.aw-graden-compare-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: .9rem;
}
.aw-graden-compare-table th,
.aw-graden-compare-table td {
  padding: 12px 16px;
  text-align: center;
  border: 1px solid var(--aw-line);
}
.aw-graden-compare-table thead th {
  background: var(--aw-navy);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
}
.aw-graden-compare-table thead th:first-child {
  text-align: left;
  background: #1d4ed8;
}
.aw-graden-compare-table tbody td:first-child {
  text-align: left;
  font-weight: 500;
  background: var(--aw-surface);
}
.aw-graden-compare-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}
.aw-graden-compare-table tbody tr:nth-child(even) td:first-child {
  background: #f1f5f9;
}

/* Column accent colours */
.aw-col-a { color: var(--aw-grade-a); font-weight: 700; }
.aw-col-b { color: var(--aw-grade-b); font-weight: 700; }
.aw-col-c { color: var(--aw-grade-c); font-weight: 700; }
.aw-col-new { color: var(--aw-grade-new); font-weight: 700; }

.aw-tbl-yes     { color: var(--aw-grade-a); font-size: 1.1rem; font-weight: 700; }
.aw-tbl-partial { color: var(--aw-grade-c); font-size: 1.1rem; font-weight: 700; }
.aw-tbl-no      { color: #dc2626; font-size: 1.1rem; font-weight: 700; }

/* ── FAQ accordion ──────────────────────────────────────────── */
.aw-graden-faq {
  padding: 48px 20px;
  background: var(--aw-surface);
}
.aw-graden-faq h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--aw-navy);
}
.aw-graden-faq-item {
  background: #fff;
  border: 1px solid var(--aw-line);
  border-radius: var(--aw-radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.aw-graden-faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--aw-navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.aw-graden-faq-item summary::-webkit-details-marker { display: none; }
.aw-graden-faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: #2563eb;
  line-height: 1;
  flex-shrink: 0;
}
.aw-graden-faq-item[open] summary::after { content: '−'; }
.aw-graden-faq-item summary:hover {
  background: #eff6ff;
}
.aw-graden-faq-answer {
  padding: 0 20px 16px;
  font-size: .9rem;
  color: var(--aw-ink-soft);
  line-height: 1.65;
}

/* ── CTA section ────────────────────────────────────────────── */
.aw-graden-cta {
  background: linear-gradient(135deg, #0e2a47 0%, #1d4ed8 100%);
  color: #fff;
  padding: 48px 20px;
  text-align: center;
}
.aw-graden-cta h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
}
.aw-graden-cta p {
  color: rgba(255,255,255,.85);
  margin: 0 0 28px;
  font-size: 1rem;
}
.aw-graden-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.aw-graden-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.aw-graden-btn--primary {
  background: #fff;
  color: #1d4ed8;
  border: 2px solid #fff;
}
.aw-graden-btn--primary:hover {
  background: #eff6ff;
  border-color: #eff6ff;
  color: #1d4ed8;
}
.aw-graden-btn--outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
}
.aw-graden-btn--outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,.1);
}

/* ═══════════════════════════════════════════════════════════════
   PDP Grade Info Link widget
   Injected below the grade badge on single product pages
   ═══════════════════════════════════════════════════════════════ */
.aw-grade-info-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  margin-top: 2px;
  margin-bottom: 4px;
  opacity: .85;
  transition: opacity .15s;
}
.aw-grade-info-link:hover {
  opacity: 1;
  text-decoration: underline;
}
.aw-grade-info-link svg {
  flex-shrink: 0;
  color: #2563eb;
}

/* ── PDP mini grade table (inside trust bar area) ────────────── */
.aw-pdp-grade-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}
.aw-pdp-grade-pip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.aw-pdp-grade-pip--a   { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.aw-pdp-grade-pip--b   { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.aw-pdp-grade-pip--c   { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.aw-pdp-grade-pip--new { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.aw-pdp-grade-pip--active {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

/* ── Responsive tweaks ──────────────────────────────────────── */
@media (max-width: 600px) {
  .aw-graden-grid {
    grid-template-columns: 1fr;
  }
  .aw-graden-hero h1 {
    font-size: 1.4rem;
  }
}
