/* The homepage's assignments showcase: a raid's assignments page drawn in
   HTML (the boss tabs over Garr's tables) and a raider's phone over its
   corner showing their own spots. The asp- prefix keeps clear of the member
   page's own ap- classes. */

@layer layout {
  .assignments-showcase {
    --showcase-art: url("/assets/banners/molten-core-thumb-4ac3123f.webp");
  }

  .asp-page {
    display: grid;
    gap: 12px;
    padding: 18px 20px 20px;
    font-size: 12px;
  }

  .asp-eyebrow {
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .asp-title {
    margin-top: -8px;
    font-size: 18px;
    font-weight: 700;
  }

  .asp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .asp-button {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-elevated);
    font-size: 11px;
    font-weight: 600;
  }

  .asp-published {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
  }

  /* The boss list, as a row of tabs above the chosen boss's tables. */
  .asp-body {
    display: grid;
    gap: 12px;
  }

  .asp-tables {
    display: grid;
    gap: 10px;
    min-width: 0;
  }

  .asp-boss {
    font-size: 15px;
    font-weight: 700;
  }

  .asp-table {
    padding: 10px 12px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
  }

  .asp-table-title {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .asp-spots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
  }

  /* A filled spot: its number on the top edge, the marker, the spec and the
     name. */
  .asp-spot {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 7px 8px 6px;
    border-radius: 6px;
    background: var(--bg-elevated);
  }

  .asp-number {
    position: absolute;
    top: -7px;
    left: -4px;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-hover);
    border-radius: 50%;
    background: var(--bg-card);
    font-size: 10px;
    font-style: normal;
  }

  .asp-marker {
    flex: none;
  }

  .asp-page img,
  .asp-phone img {
    flex: none;
    border-radius: 4px;
  }

  .asp-spot > span {
    display: grid;
    min-width: 0;
    line-height: 1.3;
  }

  .asp-spot .preview-character {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .asp-spot small {
    color: var(--text-muted);
    font-size: 10px;
  }

  .asp-bosses {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .asp-bosses li {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-card);
    font-weight: 600;
  }

  .asp-bosses small {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 400;
  }

  .asp-bosses .is-active {
    border-color: var(--accent-border);
    background: var(--bg-warm);
  }

  /* Beside the copy, the window leaves room at its right for the phone. */
  .assignments-showcase .product-window {
    margin-right: 96px;
  }

  /* A raider's phone with their spots, over the window's right edge. The last
     card runs off the bottom of the screen, as on a real phone. */
  .asp-phone {
    position: absolute;
    right: -40px;
    bottom: -40px;
    display: grid;
    align-content: start;
    gap: 8px;
    width: 216px;
    height: 360px;
    overflow: hidden;
    padding: 18px 14px;
    border: 6px solid #0d0d0d;
    border-radius: 28px;
    background: var(--bg-primary);
    box-shadow:
      0 0 0 1px var(--border),
      0 24px 50px -12px rgb(0 0 0 / 80%);
    mask-image: linear-gradient(180deg, #000 82%, transparent);
  }

  .asp-phone-title {
    margin-top: -4px;
    font-size: 16px;
    font-weight: 700;
  }

  .asp-phone-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
  }

  .asp-phone-heading span {
    padding: 0 6px;
    border-radius: 999px;
    background: var(--bg-warm);
    color: var(--accent);
    font-size: 10px;
  }

  .asp-card {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: var(--bg-card);
  }

  .asp-card-boss {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .asp-card-boss i {
    padding: 0 5px;
    border-radius: 4px;
    background: var(--bg-elevated);
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
  }

  .asp-card-job {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
  }

  .asp-card-table {
    color: var(--accent);
    font-size: 11px;
  }

  .asp-card-with {
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.4;
  }
}

@layer responsive {
  /* Stacked under its copy, there is no gap beside the window: the phone
     follows it, centred. */
  @media (max-width: 1100px) {
    .assignments-showcase .product-window {
      margin-right: 0;
    }

    .asp-phone {
      position: relative;
      right: auto;
      bottom: auto;
      margin: -40px auto 0;
    }
  }

  /* Phones: the boss tabs wrap two to a row, and the spots go one to a line. */
  @media (max-width: 600px) {
    .asp-bosses {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .asp-spots {
      grid-template-columns: minmax(0, 1fr);
    }

    .asp-published {
      display: none;
    }
  }

  @media (max-width: 400px) {
    .asp-page {
      padding: 14px 12px 16px;
    }
  }
}
