/*
 * dashDiscover.css — "Knowledges" (kartu menu, urut kepentingan) dan
 * "Baru di Minecraft" (ubin item baru + pilihan edisi).
 * Ikon item memakai .ii-icon (gaya dasar di item-ids/styles/itemIds.css).
 */

.dash-know__card > *,
.dash-new__tile > * {
  position: relative;
  z-index: 1;
}

/* ── Knowledges ────────────────────────────────────────────────────── */
.dash-know__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.dash-know__card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}

.dash-know__card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-2);
}

.dash-know__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-3);
  box-shadow: inset 0 0 0 1px rgb(var(--ink-rgb) / 0.06);
}

.dash-know__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dash-know__name {
  font-family: var(--font-display);
  font-weight: 600;
}

.dash-know__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Baru di Minecraft ─────────────────────────────────────────────── */
.dash-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-surface);
}

.dash-seg__btn {
  min-height: 30px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: 500 var(--fs-sm)/1 var(--font-body);
  cursor: pointer;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
}

.dash-seg__btn:hover {
  color: var(--text-primary);
}

.dash-seg__btn.is-on {
  background: rgb(var(--accent-rgb) / 0.14);
  color: var(--accent-copper);
}

.dash-new__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
}

.dash-new__tile,
.dash-new__ghost {
  min-height: 96px;
  border-radius: var(--radius-md);
}

.dash-new__ghost {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  opacity: 0.6;
}

.dash-new__tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-3) var(--space-2);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}

.dash-new__tile:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-2);
}

.dash-new__tile .ii-icon {
  transition: transform var(--duration-med) var(--ease-standard);
}

.dash-new__tile:hover .ii-icon {
  transform: translateY(-3px) scale(1.08);
}

.dash-new__name {
  max-width: 100%;
  font-size: var(--fs-xs);
  line-height: 1.3;
  text-align: center;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.dash-new__plus {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--accent-copper);
  line-height: 1;
}

@media (max-width: 1023px) {
  .dash-know__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  /* Knowledges di ponsel: satu baris geser, kartu berikutnya mengintip. */
  .dash-know__list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0 calc(var(--space-4) * -1);
    padding: 0 var(--space-4) 2px;
    scroll-padding: 0 var(--space-4);
  }

  .dash-know__list::-webkit-scrollbar {
    display: none;
  }

  .dash-know__card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .dash-new__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dash-new__tile,
  .dash-new__ghost {
    min-height: 88px;
  }
}

@media (max-width: 599px) {
  .dash-new__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-know__card,
  .dash-seg__btn,
  .dash-new__tile,
  .dash-new__tile .ii-icon {
    transition: none;
  }
}
