/* Premium theme overrides for the competition board.
 *
 * Grid column behaviour is controlled by public/css/site.css; this file
 * only handles visual tweaks for premium cells, ribbons, and owners.
 */

.theme-premium .vc-board-grid .vc-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.vc-board-grid .vc-cell .vc-number,
.vc-board-grid .vc-cell .vc-number__value,
.vc-board-grid .vc-cell .vc-number__number {
  display: inline-block;
  text-align: center;
}

.vc-board-grid .vc-cell .owner {
  text-align: center;
}

.theme-premium .vc-board-grid .vc-cell.is-sold .ribbon {
  position: absolute;
  top: 6px;
  left: 6px;
  transform: rotate(-6deg);
  transform-origin: top left;
  padding: 3px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  background-color: #ff4b6b;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(255, 75, 107, 0.32);
}

.theme-premium .vc-board-grid .vc-cell.is-sold .owner {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.78;
}

@media (max-width: 480px) {
  .theme-premium .vc-board-grid .vc-cell.is-sold .ribbon {
    font-size: 10px;
    padding: 2px 6px;
  }

  .theme-premium .vc-board-grid .vc-cell.is-sold .owner {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .theme-premium .vc-board-grid .vc-cell.is-sold .ribbon {
    top: 4px;
    left: 4px;
    font-size: 9px;
    padding: 2px 5px;
    transform: rotate(-10deg);
  }

  .theme-premium .vc-board-grid .vc-cell.is-sold .owner {
    display: none;
  }
}

/* VaultComps – keep all board tiles perfectly square */
.vc-board-grid .vc-cell {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

/* VaultComps – responsive board columns */

/* Default: mobile-first, auto-fit as many tiles as we can */
.vc-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
}

/* Slightly wider phones / small tablets – give tiles a bit more room */
@media (min-width: 480px) {
  .vc-board-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  }
}

/* Large desktop – honour admin Grid columns setting */
@media (min-width: 1280px) {
  .vc-board-grid.grid--cols-4  { grid-template-columns: repeat(4, 1fr); }
  .vc-board-grid.grid--cols-5  { grid-template-columns: repeat(5, 1fr); }
  .vc-board-grid.grid--cols-6  { grid-template-columns: repeat(6, 1fr); }
  .vc-board-grid.grid--cols-8  { grid-template-columns: repeat(8, 1fr); }
  .vc-board-grid.grid--cols-10 { grid-template-columns: repeat(10, 1fr); }

  /* Fallback if no grid--cols-* class is present */
  .vc-board-grid:not([class*="grid--cols-"]) {
    grid-template-columns: repeat(10, 1fr);
  }
}

/* VaultComps – mobile hero fix (keep hero fully below fixed header) */
@media (max-width: 768px) {
  /* Push the whole game shell below the fixed header */
  main.vc-shell.vc-shell--game.vc-page {
    padding-top: 88px !important; /* tweakable: 80–96px if needed */
  }

  /* Don’t let the inner layout add extra offset */
  main.vc-shell.vc-shell--game.vc-page .vc-game-layout {
    margin-top: 0 !important;
  }

  /* Keep hero anchored in place, no parallax / float-up */
  main.vc-shell.vc-shell--game.vc-page .vc-game-hero {
    margin-top: 0 !important;
    transform: none !important;
  }
}
