/*
 * DartboardGrid styles — values transplanted verbatim from LikeShop's
 * compiled stylesheet (their tokens noted inline). Our only additions:
 * the price pill and the powered-by footer.
 *
 * Re-theming: every color, font, and shape decision is a custom property on
 * :root below. Override them (or set them on a wrapping element) to re-skin
 * without touching the rules that follow.
 */

@import url("https://fonts.googleapis.com/css2?family=Mulish:wght@400;500&display=swap");

:root {
  --db-font: "Mulish", helvetica neue, helvetica, arial, sans-serif;
  --db-bg: #fff;                       /* --white */
  --db-fg: #666;                       /* --grey: body text */
  --db-header-fg: #2a2a2a;             /* --header-text-black */
  --db-border: #ddd;                   /* --border */
  --db-avatar-border: #e5e5e5;         /* --background-placeholder-dark-grey */
  --db-tile-bg: #f1f1f1;               /* --skeleton-loader-grey */
  --db-tile-fg: #adadad;               /* --secondary-text-icon */
  --db-price-bg: rgba(255, 255, 255, 0.94);
  --db-price-fg: #2a2a2a;
  --db-price-display: none;            /* price pills off; set to inline-block to bring them back */
  --db-tile-aspect: 3 / 4;             /* LikeShop serves 480x640 fit=cover */
  --db-media-gap: 0.125rem;            /* --media-gap: var(--space-2) */
  --db-max-width: 916px;
}

@media (min-width: 768px) {
  :root {
    --db-media-gap: 0.5rem;            /* --media-gap: var(--space-8) at >=768px */
  }
}

html {
  background: var(--db-bg);
  font-size: 100%;
}

body {
  margin: 0;
  font: normal 100%/1.4em var(--db-font);
  color: var(--db-fg);
  background: var(--db-bg);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
  overflow-y: scroll;
}

.db-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header: .likeshop-header verbatim ---------- */

.db-header {
  box-shadow: 0 0.5px 0 0 var(--db-border);
  padding: 1rem;
  display: flex;
  justify-content: flex-start;
}

@media (min-width: 768px) {
  .db-header {
    justify-content: center;
  }
}

.db-header-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.db-avatar {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  margin-right: 0.5rem;
  border-radius: 50%;
  border: 1px solid var(--db-avatar-border);
  overflow: hidden;
  background: var(--db-tile-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.db-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.db-avatar-initials {
  font-size: 12px;
  font-weight: 500;
  color: var(--db-tile-fg);
}

.db-handle {
  color: var(--db-header-fg);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---------- Call to action: .call-to-action verbatim ---------- */

.db-cta {
  /* LikeShop leaves the UA's default 1em paragraph margins in place — that
     margin, plus the 8px padding, is the whitespace around their CTA line. */
  margin: 1em 0;
  padding: 0.5rem;
  color: var(--db-fg);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  text-align: center;
  min-height: 18px;
  line-height: 18px;
}

/* ---------- Banner: .banner-container verbatim (2:1 frame) ---------- */

.db-banner-container {
  width: 100%;
  padding-top: 50%;
  position: relative;
  margin-bottom: var(--db-media-gap);
}

.db-banner-frame {
  position: absolute;
  inset: 0;
}

.db-banner-link {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--db-tile-bg);
}

.db-banner-img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Grid: .grid-layout-container verbatim ---------- */

.db-container {
  width: 100%;
  max-width: var(--db-max-width);
  margin: auto;
}

.db-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--db-media-gap);
  justify-content: center;
  width: 100%;
  margin: 0 auto var(--db-media-gap);
}

.db-tile {
  position: relative;
  display: block;
  aspect-ratio: var(--db-tile-aspect);
  overflow: hidden;
  background-color: var(--db-tile-bg);  /* .media-container */
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.db-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.db-tile-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--db-tile-fg);
}

.db-tile-placeholder svg {
  width: 30%;
  height: 30%;
}

/* Ours, not LikeShop's — offsets echo their .media-badges (--space-4). */
.db-tile-price {
  display: var(--db-price-display);
  position: absolute;
  left: 0.25rem;
  bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--db-price-bg);
  color: var(--db-price-fg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.db-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--db-fg);
  font-size: 0.875rem;
}

/* ---------- Footer (ours) ---------- */

.db-footer {
  margin-top: auto;
  padding: 2rem 1rem;
  text-align: center;
}

.db-powered-by {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--db-tile-fg);
  text-decoration: none;
}

.db-powered-by:hover {
  text-decoration: underline;
}
