/* Compact licensed collection layout and platform-aware cover presentation. */
.licensed-list-header,
.licensed-game-head {
  display: grid !important;
  grid-template-columns: 64px 64px minmax(220px, 1fr) auto !important;
  gap: 14px !important;
  align-items: center;
}

.licensed-list-header > span:first-child,
.licensed-list-header > span:nth-child(2) {
  text-align: center;
}

.licensed-meta-header,
.licensed-meta {
  display: grid;
  grid-template-columns: 64px 84px 104px 112px minmax(160px, 230px) 104px;
  gap: 12px;
  align-items: center;
  justify-self: end;
}

.licensed-list-header > span:nth-child(3) {
  text-align: left !important;
}

.licensed-meta-header span {
  text-align: left !important;
}

.licensed-meta-header span:first-child,
.licensed-meta .quantity-value {
  text-align: center !important;
}

.licensed-meta-header span:nth-child(4) {
  text-align: left !important;
}

.licensed-meta > .badge {
  justify-self: start;
}

.licensed-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
}

.licensed-actions [hidden] {
  display: none !important;
}

.licensed-note-value {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted, #71809a);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.licensed-title-text {
  overflow: hidden;
  color: var(--text, #152035);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.licensed-platform-cell {
  display: grid;
  place-items: center;
}

.licensed-actions .action-text-button {
  white-space: nowrap;
}

.licensed-cover-slot {
  position: relative;
  display: grid;
  width: 64px;
  min-height: 68px;
  place-items: center;
}

.licensed-cover-button,
.licensed-cover-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-color, #dfe5ef);
  border-radius: 8px;
  background: #f4f7fb;
  color: #7b8aa3;
  box-shadow: 0 4px 12px rgba(35, 58, 96, 0.09);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.licensed-cover-slot[data-platform="ps1"] .licensed-cover-button,
.licensed-cover-slot[data-platform="ps1"] .licensed-cover-placeholder {
  width: 56px;
  aspect-ratio: 1 / 1;
}

.licensed-cover-slot[data-platform="ps2"] .licensed-cover-button,
.licensed-cover-slot[data-platform="ps2"] .licensed-cover-placeholder,
.licensed-cover-slot[data-platform="ps3"] .licensed-cover-button,
.licensed-cover-slot[data-platform="ps3"] .licensed-cover-placeholder {
  width: 46px;
  aspect-ratio: 2 / 2.85;
}

.licensed-cover-button:hover,
.licensed-cover-button:focus-visible,
.licensed-cover-placeholder:hover,
.licensed-cover-placeholder:focus-visible {
  z-index: 3;
  transform: scale(1.1);
  border-color: #8fb6f7;
  box-shadow: 0 10px 24px rgba(35, 89, 180, 0.18);
  outline: none;
}

.licensed-cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.licensed-cover-placeholder {
  border-style: dashed;
  box-shadow: none;
  font-size: 22px;
  font-weight: 500;
}

.licensed-cover-edit {
  position: absolute;
  right: -5px;
  bottom: -4px;
  z-index: 4;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #246fe5;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(36, 111, 229, 0.28);
}

.licensed-cover-edit:hover,
.licensed-cover-edit:focus-visible {
  background: #145bc4;
  outline: none;
  transform: scale(1.08);
}

.cover-upload-field small {
  color: var(--muted, #71809a);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 1180px) {
  .licensed-meta-header,
  .licensed-meta {
    grid-template-columns: 58px 78px 96px 106px 300px;
    gap: 8px;
  }

  .licensed-actions {
    gap: 6px;
  }

  .licensed-actions .action-text-button {
    padding-inline: 10px;
  }
}

@media (max-width: 900px) {
  .licensed-list-header {
    display: none !important;
  }

  .licensed-game-head {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    align-items: start;
  }

  .licensed-meta {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    justify-self: stretch;
  }

  .licensed-meta > .badge {
    justify-self: start;
  }

  .licensed-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .licensed-game-head {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .licensed-cover-slot {
    width: 52px;
  }

  .licensed-meta {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .licensed-actions {
    flex-wrap: wrap;
  }
}
