/* Styles for assets.hbs — the tradable-assets board.
   Ported from the legacy `components/pages/home/homeAsset/HomeAsset.vue` and the
   `components/custom/tab/Tabs.vue` it pulled in; the 1000 breakpoint and every
   size below are the legacy values, as measured on the live site. */

.assets {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.assets-title {
  color: var(--gray-900);
  font-size: 21px;
  font-weight: 700;
  text-align: center;
}

.assets-description {
  margin-top: 8px;
  color: var(--gray-600);
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  text-align: center;
}

/* The CTA appears twice — beside the copy on wide screens, under the board on
   narrow ones — because it changes place in the reading order, not just in
   position. One element moved by `order` would read wrongly in one of the two. */
/* `line-height` overrides the 20px the shared `.btn` primitive sets. The legacy
   button had none of its own and inherited the 1.6 body value, which is 5.6px
   taller — enough to move everything stacked under it. */
.assets-cta {
  width: fit-content;
  padding: 12px 24px;
  font-size: 16px;
  line-height: 1.6;
}

.assets-cta--beside {
  display: none;
}

.assets-board {
  width: 100%;
  /* Real at ≥1400, where the two columns stop filling the row and the board
     would otherwise drift off the copy. */
  margin-right: auto;
}

.assets-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

/* `line-height: normal` is load-bearing: this app's reset gives buttons
   `font: inherit`, which would pull in the 1.6 body line-height and make the
   tabs taller than the ones on the site being matched. */
.assets-tab {
  flex-shrink: 0;
  min-width: 90px;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background-color: var(--gray-0);
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  transition: 0.3s ease;
}

/* Driven by the ARIA state rather than a class: the attribute is the thing the
   island already has to keep correct, so there is no second source of truth. */
.assets-tab[aria-selected='true'] {
  border-color: var(--identity);
  background-color: var(--low-identity);
  color: var(--gray-900);
}

.assets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 600px) {
  .assets-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1000px) {
  .assets {
    flex-direction: row;
    gap: 40px;
  }

  .assets-title {
    font-size: 36px;
    line-height: 58px;
    text-align: start;
  }

  .assets-description {
    margin-top: 16px;
    font-size: 20px;
    line-height: 32px;
    text-align: start;
  }

  .assets-cta {
    padding: 12px 30px;
  }

  .assets-cta--beside {
    display: flex;
    margin-top: 16px;
  }

  .assets-cta--below {
    display: none;
  }

  .assets-board {
    max-width: 640px;
  }

  .assets-tabs {
    justify-content: start;
    gap: 16px;
  }

  /* Legacy narrowed the pill's side inset to a flat 12px here, which leaves the
     short pill under the 105px floor `Tabs.vue` gave the desktop tab — so the
     floor engages and the two pills stay evenly matched. */
  .assets-tab {
    min-width: 105px;
    padding: 12px;
  }
}
