/* ============================================
   SITE SHELL — nav, layout grid with ad sidebar
   Added for the multi-calculator PetPoisonCalc platform.
   Kept separate from style.css so the original
   calculator styling is untouched and easy to diff.
   ============================================ */

/* ---------- Layout grid: content + sidebar ---------- */

.page-shell {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--space-5);
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: var(--space-10);
  align-items: start;
}

.page-shell > .content-col {
  min-width: 0;
}

.page-shell > .content-col > .wrap {
  max-width: none;
  padding-inline: 0;
}

.ad-col {
  position: sticky;
  top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.ad-slot {
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  padding: var(--space-4);
}

.ad-slot[data-slot='sidebar-2'] {
  min-height: 600px;
}

/* Below ~1080px there isn't room for a real sidebar without
   squeezing the calculator, so the ad column drops under the
   content instead of disappearing entirely. */
@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
    max-width: 760px;
  }
  .ad-col {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ad-col .ad-slot {
    flex: 1 1 260px;
    min-height: 120px;
  }
}

@media (max-width: 640px) {
  .ad-col {
    display: none;
  }
  .ad-col.ad-col-mobile-visible {
    display: flex;
  }
}

/* ---------- Top nav (site-wide, above the emergency bar's content) ---------- */

.site-nav {
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface);
}

.site-nav .wrap {
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
}

.site-nav-brand svg {
  width: 26px;
  height: 26px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
}

.site-nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  padding-block: var(--space-1);
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.site-nav-links a:hover,
.site-nav-links a[aria-current='page'] {
  color: var(--color-primary);
}

.site-nav-links a[aria-current='page'] {
  border-color: var(--color-primary);
}

@media (max-width: 560px) {
  .site-nav-links {
    gap: var(--space-3);
    font-size: var(--text-xs);
  }
}

/* ---------- Calculator picker grid (home page) ---------- */

.calc-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.calc-picker-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.calc-picker-card:not(.disabled):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.calc-picker-card .picker-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-picker-card .picker-icon svg {
  width: 24px;
  height: 24px;
}

.calc-picker-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
}

.calc-picker-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  flex-grow: 1;
}

.picker-cta {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.calc-picker-card.disabled {
  opacity: 0.6;
  cursor: default;
}

.picker-badge {
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
}

.picker-badge.live {
  background: var(--risk-caution-bg);
  color: var(--risk-caution-text);
}

.picker-badge.soon {
  background: var(--color-surface-offset);
  color: var(--color-text-faint);
}

/* ---------- Footer nav (site-wide links inside footer) ---------- */

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
}

.footer-links a {
  color: var(--color-text-muted);
}
