/* Dinopedia section overrides.
   Global tokens applied from Refined Basecamp theme.
*/

:root {
  --bg-main: #11130E;
  --bg-card: #1A1C15;
  --bg-card-hover: #22251D;

  --accentMain: #379392;
  --accentGold: #D8B67F;

  --textWhite: rgba(255, 255, 255, 0.90);
  --textMuted: rgba(255, 255, 255, 0.55);
  --borderDim: rgba(255, 255, 255, 0.08);
  --borderHighlight: #379392;
}

body {
  background-color: var(--bg-main);
  color: var(--textWhite);
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(55, 147, 146, 0.6); }
  50%      { border-color: rgba(55, 147, 146, 0.1); }
}
.construction-banner { animation: pulse-border 2s infinite; }

.accent-bar { width: 40px; height: 4px; background: var(--accentMain); margin-bottom: 8px; }

/* nav links */
.navlink {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--textMuted);
  transition: color 140ms ease;
}
.navlink:hover { color: var(--textWhite); }
.navlink--active { color: var(--textWhite); }

.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Controls Header (Search / Filter / Sort) */
.controls {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  border: 1px solid var(--borderDim);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 14px;
}

.controls__left { display:flex; flex-direction:column; gap:12px; min-width: min(560px, 100%); }
.controls__right { display:flex; align-items:center; gap:10px; }

.control-input, .control-select {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--bg-main);
  color: var(--textWhite);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: all 140ms ease;
}
.control-input { width: 100%; }
.control-input::placeholder { color: var(--textMuted); }
.control-input:focus, .control-select:focus {
  border-color: var(--accentMain);
  background-color: var(--bg-card-hover);
  box-shadow: 0 0 15px rgba(55, 147, 146, 0.15);
}

/* Chips */
.chip-row { display:flex; gap:10px; flex-wrap:wrap; }

.chip {
  border: 1px solid var(--borderDim);
  background: var(--bg-main);
  color: var(--textMuted);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all 140ms ease;
}
.chip:hover {
  color: var(--textWhite);
  border-color: rgba(255, 255, 255, 0.2);
}
.chip--active,
.chip[aria-selected="true"] {
  background: rgba(55, 147, 146, 0.15);
  border-color: var(--accentMain);
  color: var(--textWhite);
}

.meta-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top: 12px;
}
.meta-row__left, .meta-row__right { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.meta-text {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--textMuted);
}

/* CORE 7 STRIP */
.strip {
  border: 1px solid var(--borderDim);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 14px;
}
.strip__head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom: 12px;
}
/* Highlighted Core 7 Label */
.strip__label {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid rgba(216, 182, 127, 0.4);
  background: rgba(216, 182, 127, 0.10);
  color: #FFE0B2;
  padding: 6px 10px;
  border-radius: 4px;
}
.strip__note {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--textMuted);
}
.strip__row {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.core-pill {
  border: 1px solid var(--borderDim);
  background: var(--bg-main);
  color: var(--textWhite);
  border-radius: 12px;
  padding: 10px 12px;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width: 180px;
  transition: all 160ms ease;
}
.core-pill:hover {
  border-color: var(--accentGold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.core-pill__name { font-family: "Montserrat", sans-serif; font-weight: 900; letter-spacing: -0.02em; }
.core-pill__meta { font-family: "Roboto Mono", monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accentGold); }

/* --- DINOPEDIA GRID --- */
.grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}
@media (min-width: 860px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  border: 1px solid var(--borderDim);
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--borderHighlight);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.card__img {
  aspect-ratio: 16/9;
  background: #0A0B08;
  border-bottom: 1px solid var(--borderDim);
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
}
.card__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.03) 50%, rgba(0,0,0,0.05) 50%);
  background-size: 100% 4px;
  pointer-events: none;
}
.card__img .dash {
  position:absolute; inset:0;
  border: 2px dashed var(--accentMain);
  margin: 16px;
  border-radius: 8px;
  opacity: 0.15;
}

.card__body { padding: 16px; display: flex; flex-direction: column; height: calc(100% - 180px); }

/* Badges */
.badge {
  display:inline-flex;
  align-items:center;
  font-family:"Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--borderDim);
  margin-bottom: 10px;
  white-space: nowrap;
}
/* Core 7 matches Gold/Epic */
.badge--core7 { background: rgba(216, 182, 127, 0.10); border-color: rgba(216, 182, 127, 0.4); color: #FFE0B2; }
/* Tags match standard dim layout */
.badge--tag   { background: rgba(255, 255, 255, 0.03); border-color: var(--borderDim); color: var(--textMuted); }

.title { font-family: "Montserrat", sans-serif; font-weight: 900; font-size: 16px; line-height: 1.25; margin-bottom: 8px; color: var(--textWhite); }
.desc  { color: var(--textMuted); font-size: 13px; line-height: 1.55; margin-bottom: 12px; flex-grow: 1; }

.links { display:flex; gap:12px; flex-wrap:wrap; border-top: 1px solid var(--borderDim); padding-top: 12px; margin-top: auto; }
.link {
  font-family:"Roboto Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accentMain);
  transition: opacity 140ms ease, color 140ms ease;
  text-decoration: none;
}
.link:hover { opacity: 0.8; color: var(--textWhite); }
.link--muted { color: var(--textMuted); }
.link--muted:hover { color: var(--accentMain); }

.load-more {
  border: 1px solid var(--borderDim);
  background: var(--bg-card);
  color: var(--textWhite);
  border-radius: 12px;
  padding: 12px 16px;
  font-family:"Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all 140ms ease;
}
.load-more:hover:not(:disabled) {
  border-color: var(--accentMain);
  background: var(--bg-card-hover);
}
.load-more:disabled { cursor: not-allowed; opacity: 0.4; border-color: var(--borderDim); background: transparent; }
