/* assets/css/decals.css */

/* =========================
   HERO
   ========================= */

.d-hero{ padding:70px 0 22px; }

.d-hero-inner{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:stretch;
}

.d-hero-card{ padding:26px 26px 22px; }
.d-hero-top{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:10px; }

.d-title{
  margin:0 0 10px;
  font-family: var(--font-display);
  letter-spacing:.06em;
  text-transform:uppercase;
  font-size:28px;
}
:root[data-theme="light"] .d-title{
  color: rgba(18,19,26,.96);
}

.d-sub{
  margin:0 0 16px;
  color: rgba(232,232,238,.84);
  line-height:1.65;
  font-size:14px;
}
:root[data-theme="light"] .d-sub{
  color: rgba(18,19,26,.76);
}

.d-actions{ display:flex; gap:12px; flex-wrap:wrap; }

/* =========================
   STATS
   ========================= */

.d-stats{
  padding:18px;
  box-shadow: var(--shadow-soft);
  display:flex;
  flex-direction:column;
  gap:12px;
}

.d-stat{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  padding:12px;
}
:root[data-theme="light"] .d-stat{
  border-color: rgba(0,0,0,.10);
  background: rgba(255,255,255,.70);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

.d-k{
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(184,186,198,.95);
  font-weight:800;
  margin-bottom:6px;
}
:root[data-theme="light"] .d-k{
  color: rgba(18,19,26,.56);
}

.d-v{
  font-family: var(--font-display);
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:12px;
  color: rgba(232,232,238,.92);
}
:root[data-theme="light"] .d-v{
  color: rgba(18,19,26,.92);
}

/* =========================
   TOOLBAR + FILTERS
   ========================= */

.d-toolbar{ padding:18px 0 26px; }

.d-bar{
  padding:14px;
  display:grid;
  grid-template-columns: 1.1fr 1.6fr .3fr;
  gap:14px;
  align-items:end;
  box-shadow: var(--shadow-soft);
}

.d-label{
  display:block;
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(184,186,198,.95);
  font-weight:800;
  margin-bottom:8px;
}
:root[data-theme="light"] .d-label{
  color: rgba(18,19,26,.60);
}

.d-select{
  width:100%;
  height:44px;
  border-radius:16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(232,232,238,.94);
  padding:0 14px;
  outline:none;
}
:root[data-theme="light"] .d-select{
  border-color: rgba(0,0,0,.12);
  background: rgba(255,255,255,.82);
  color: rgba(18,19,26,.88);
}

.d-select:focus{
  border-color: rgba(255,45,45,.28);
  box-shadow: 0 0 0 3px rgba(255,45,45,.12);
}
:root[data-theme="light"] .d-select:focus{
  border-color: rgba(255,45,45,.35);
  box-shadow: 0 0 0 3px rgba(255,45,45,.16);
}

.d-filters{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}

.d-right{ display:flex; justify-content:flex-end; }
.btn-small{ height:44px; padding:0 14px; }

/* =========================
   GRID
   ========================= */

.d-grid{ padding:16px 0 68px; }
.d-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.d-head-tight{ margin-top:26px; }

.d-cards{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:18px;
}

.d-card{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  text-decoration:none;
}
.d-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,45,45,.22);
}
:root[data-theme="light"] .d-card:hover{
  border-color: rgba(255,45,45,.28);
}

/* =========================
   THUMB — 16:9
   Fix: in light theme you complained that thumbs look like "real size" / cropped weird.
   That happens when we use contain + cards have different image ratios.
   So: keep DARK as contain (your choice), but LIGHT uses cover to look consistent.
   ========================= */

.d-thumb{
  aspect-ratio: 16 / 9;
  width:100%;
  height:auto;

  border-radius:18px;
  border: 1px solid rgba(255,255,255,.10);
  position:relative;
  overflow:hidden;

  /* DARK: show full image */
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;

  background-color: rgba(10,10,14,.35);
}
:root[data-theme="light"] .d-thumb{
  border-color: rgba(0,0,0,.10);
  background-color: rgba(255,255,255,.55);

  /* LIGHT: fill the card consistently */
  background-size: cover;
}

.d-thumb::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(320px 200px at 18% 28%, rgba(255,45,45,.16), transparent 55%),
    radial-gradient(320px 220px at 90% 40%, rgba(78,161,255,.10), transparent 58%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  opacity:.95;
}
:root[data-theme="light"] .d-thumb::after{
  opacity:.55;
}

.d-badge{
  position:absolute;
  top:12px;
  left:12px;
  height:30px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,10,14,.40);
  font-family: var(--font-display);
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:11px;
  z-index:2;
}
:root[data-theme="light"] .d-badge{
  border-color: rgba(0,0,0,.10);
  background: rgba(255,255,255,.70);
  color: rgba(18,19,26,.86);
}

.d-name{ font-weight:800; letter-spacing:.02em; }
:root[data-theme="light"] .d-name{
  color: rgba(18,19,26,.94);
}

.d-meta{ margin-top:4px; color: var(--muted); font-size:13px; }
:root[data-theme="light"] .d-meta{
  color: rgba(18,19,26,.62);
}

.d-empty{
  padding:18px;
  border-radius:18px;
}

/* =========================
   CTA
   ========================= */

.d-cta{ padding:0 0 70px; }

.d-cta-card{
  padding:22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  box-shadow: var(--shadow-soft);
}

.d-cta-title{
  margin:0 0 8px;
  font-family: var(--font-display);
  letter-spacing:.05em;
  text-transform:uppercase;
  font-size:14px;
}
:root[data-theme="light"] .d-cta-title{
  color: rgba(18,19,26,.92);
}

.d-cta-sub{
  margin:0;
  color: rgba(232,232,238,.82);
  font-size:13px;
  line-height:1.6;
}
:root[data-theme="light"] .d-cta-sub{
  color: rgba(18,19,26,.70);
}

.d-cta-actions{ display:flex; gap:12px; flex-wrap:wrap; }

/* =========================
   Pagination
   ========================= */

.d-pager{
  margin: 10px 0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.d-pager-left{
  color: rgba(232,232,238,.82);
  font-size:13px;
}
:root[data-theme="light"] .d-pager-left{
  color: rgba(18,19,26,.70);
}

.d-pager-nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.d-page{
  height:40px;
  min-width:40px;
  padding:0 12px;
  border-radius:14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(232,232,238,.92);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight:800;
  font-size:13px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
:root[data-theme="light"] .d-page{
  border-color: rgba(0,0,0,.12);
  background: rgba(255,255,255,.82);
  color: rgba(18,19,26,.86);
}

.d-page:hover{
  transform: translateY(-1px);
  border-color: rgba(255,45,45,.22);
}
:root[data-theme="light"] .d-page:hover{
  border-color: rgba(255,45,45,.28);
}

.d-page.is-current{
  border-color: rgba(255,45,45,.32);
  background: rgba(255,45,45,.10);
}
:root[data-theme="light"] .d-page.is-current{
  border-color: rgba(255,45,45,.34);
  background: rgba(255,45,45,.12);
  color: rgba(18,19,26,.92);
}

.d-page-ellipsis{
  color: rgba(184,186,198,.85);
  padding:0 6px;
}
:root[data-theme="light"] .d-page-ellipsis{
  color: rgba(18,19,26,.45);
}

.btn.is-disabled{
  opacity:.45;
  pointer-events:none;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 980px){
  .d-hero-inner{ grid-template-columns: 1fr; }
  .d-bar{ grid-template-columns: 1fr; }
  .d-filters{ grid-template-columns: 1fr; }
  .d-cards{ grid-template-columns: repeat(2, 1fr); }
  .d-cta-card{ flex-direction:column; align-items:flex-start; }
}

/* Mobile: keep 2 columns */
@media (max-width: 560px){
  .d-cards{ grid-template-columns: repeat(2, 1fr); }

  .d-pager{
    justify-content:center;
    text-align:center;
  }
  .d-pager-left{ width:100%; }
  .d-pager-nav{ justify-content:center; }
}

/* Ultra-small phones */
@media (max-width: 380px){
  .d-cards{ grid-template-columns: 1fr; }
}

/* ===== Native select dropdown readability fix (Decals) ===== */
.d-select{ color: rgba(232,232,238,.94); }
.d-select option{
  color:#111;
  background:#fff;
}
