/* embedded-pick-album-home.css
   ────────────────────────────
   Album-picker homepage: three horizontal album rows that replace the
   bare "Search for an artist or album" empty state. Card + row shape
   intentionally mirrors the film picker's .fp-home so the two surfaces
   feel like siblings. */

.mx-home {
    padding: 4px 2px 12px;
    /* Container queries on the row let card counts respond to the
       picker's actual width instead of viewport width (the picker
       lives in a modal AND in the wizard's drawer-flanked column,
       which have very different widths at the same viewport). */
    container-type: inline-size;
}

/* Plain empty-state landing — used until the Spotify rate-limit story
   gets sorted and we wire the Grammy home rows back on. */
.mx-home--empty {
    padding: 30px 0;
}
.mx-home__empty-card {
    max-width: 460px;
    margin: 0 auto;
    text-align: center;
    color: #686b87;
}
.mx-home__empty-icon {
    font-size: 48px !important;
    color: #2b988f;
}
.mx-home__empty-title {
    margin: 12px 0 6px;
    font-weight: 700;
    color: #1a1d2e;
}
.mx-home__empty-sub {
    margin: 0;
    font-size: 0.88rem;
}

.mx-home__section {
    margin-bottom: 22px;
}
.mx-home__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.mx-home__title-text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1d2e;
    line-height: 1.2;
}
.mx-home__more {
    appearance: none;
    background: none;
    border: 0;
    padding: 2px 4px;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2B988F;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.mx-home__more:hover { color: #1b6b62; }
.mx-home__more .material-icons { font-size: 16px; }

/* Single-row strip of album cards that fits whatever the container
   width allows. Uses a CSS grid with a column count that adapts to
   the picker's width via container queries — 2 cards on narrow
   surfaces stepping up to 5 on wide. We always render up to 5 cards
   in DOM and hide overflow children past the current column count
   via :nth-child rules below, so the row never shows a half-clipped
   "peek" card — only whole cards. The "More" button is the user's
   path into the fuller list.

   Vertical padding gives the hover lift (translateY -1px) room to
   breathe; negative margin neutralizes the padding's layout effect. */
.mx-home__row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 4px 0;
    margin: -4px 0;
}
/* Hide overflow cards past the current column count. Each breakpoint
   resets the previous rule so a stretched layout doesn't leave its
   prior `display:none` on what's now a visible cell. */
.mx-home__row > .mx-home__card:nth-child(n+3) { display: none; }

@container (min-width: 480px) {
    .mx-home__row { grid-template-columns: repeat(3, 1fr); }
    .mx-home__row > .mx-home__card:nth-child(3) { display: flex; }
    .mx-home__row > .mx-home__card:nth-child(n+4) { display: none; }
}
@container (min-width: 700px) {
    .mx-home__row { grid-template-columns: repeat(4, 1fr); }
    .mx-home__row > .mx-home__card:nth-child(4) { display: flex; }
    .mx-home__row > .mx-home__card:nth-child(n+5) { display: none; }
}
@container (min-width: 900px) {
    .mx-home__row { grid-template-columns: repeat(5, 1fr); }
    .mx-home__row > .mx-home__card:nth-child(5) { display: flex; }
}

.mx-home__row-loading,
.mx-home__row-empty {
    padding: 20px;
    color: #686b87;
    font-size: 0.85rem;
}

/* Same hover treatment as the Grammy browser cards (which itself
   mirrors .fp-oscar__card) so the whole picker reads consistently.
   Width is owned by the grid (1fr per column) so cards stretch to
   fill the row evenly — no fixed width. min-width:0 keeps long
   titles from blowing out the column. */
.mx-home__card {
    appearance: none;
    background: none;
    border: 1px solid transparent;
    padding: 6px;
    border-radius: 10px;
    text-align: left;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: border-color 120ms, transform 120ms, background 120ms;
}
.mx-home__card:hover {
    border-color: #2B988F;
    background: rgba(43,152,143,0.04);
    transform: translateY(-1px);
}
.mx-home__poster {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #eef0f7;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 6px;
}
.mx-home__poster img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.mx-home__poster-placeholder {
    color: #b6b9cf;
    font-size: 36px;
}
.mx-home__title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a1d2e;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mx-home__year {
    color: #686b87;
    font-weight: 400;
}
.mx-home__artist {
    margin-top: 2px;
    font-size: 0.76rem;
    color: #686b87;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Queue-mode inline picker: search renders as an autocomplete dropdown
   anchored to the search row (mirrors the media-explorer modal's
   .media-explorer-ac so both pickers feel the same). */
#embeddedAlbumPicker .picker-search-row { position: relative; }

.queue-ac {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #F2F4F8;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
}

.queue-ac__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: normal;
}
.queue-ac__row:hover,
.queue-ac__row.active {
    background: #E5F2F1;
}
.queue-ac__row img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    background: #ddd;
    flex: 0 0 auto;
}
.queue-ac__row-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #ddd;
    color: #686b87;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex: 0 0 auto;
}
.queue-ac__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.queue-ac__sub {
    font-size: 0.75rem;
    color: #686b87;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.queue-ac__title {
    font-size: 0.9rem;
    color: #1a1d2e;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.queue-ac__loading,
.queue-ac__empty {
    padding: 16px;
    color: #686b87;
    font-size: 0.9rem;
    text-align: center;
}

/* ──────────────────────────────────────────────────────────────────
   Inline album detail (queue-mode picker). Renders in place when a
   user clicks a card on the home or search rows — no modal involved.
   ────────────────────────────────────────────────────────────────── */
.queue-album-detail { padding-top: 8px; }

.queue-album-detail__loading {
    padding: 40px 0;
    text-align: center;
    color: #686b87;
}

/* Lottie "album playing" animation used as the picker preloader in
   place of a plain "Loading…" string. */
.queue-album-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}
.queue-album-loader lottie-player {
    width: 180px;
    height: 180px;
}

.queue-album-detail__body {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
}
.queue-album-detail__cover-col {
    flex: 0 0 240px;
    max-width: 240px;
}
.queue-album-detail__info-col {
    flex: 1 1 280px;
    min-width: 0;
}
.queue-album-detail__cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    display: block;
}
.queue-album-detail__cover--blank {
    background: #eef0f7;
    display: flex; align-items: center; justify-content: center;
}
.queue-album-detail__cover--blank .material-icons { color: #b6b9cf; font-size: 64px; }

.queue-album-detail__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.queue-album-detail__add-btn {
    appearance: none; font: inherit; cursor: pointer;
    background: #2B988F; color: #fff; font-weight: 700; font-size: 0.9rem;
    border: 0; border-radius: 8px; padding: 10px 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: background 0.12s ease;
}
.queue-album-detail__add-btn:hover  { background: #1b6b62; }
.queue-album-detail__add-btn:disabled,
.queue-album-detail__add-btn.is-added {
    background: #b6b9cf;
    cursor: not-allowed;
}
.queue-album-detail__add-btn .material-icons { font-size: 18px; }

/* Red danger remove button — matches the modal's .btn-remove-from-queue-modal
   so the destructive action looks the same on both album detail surfaces. */
.queue-album-detail__remove-btn {
    appearance: none; font: inherit; cursor: pointer;
    background: #7a1f1f; color: #fff;
    font-weight: 700; font-size: 0.9rem;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    box-shadow: 0 6px 16px rgba(122, 31, 31, 0.35);
    transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
.queue-album-detail__remove-btn:hover {
    background: #922525;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(122, 31, 31, 0.45);
}
.queue-album-detail__remove-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(122, 31, 31, 0.35);
}
.queue-album-detail__remove-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.queue-album-detail__remove-btn .material-icons { font-size: 18px; }

/* Favorites button matches the size + chrome of the Add to Queue and
   Open in Spotify buttons so the action column reads as a stack. The
   existing global .btn-fav-album-modal click handler in
   media-explorer-modal.js binds the toggle behaviour for free. */
.queue-album-detail__fav-btn {
    appearance: none; font: inherit; cursor: pointer;
    background: #fff;
    color: #1a1d2e;
    font-weight: 600; font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid #d4d6e1;
    border-radius: 8px;
    padding: 10px 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.queue-album-detail__fav-btn:hover {
    color: #e0245e;
    border-color: #e0245e;
}
.queue-album-detail__fav-btn .material-icons { font-size: 18px; }
.queue-album-detail__fav-btn.favorited {
    color: #e0245e;
    border-color: #e0245e;
    background: #fdf2f7;
}
.queue-album-detail__fav-btn.favorited:hover {
    background: #fce6ee;
}

.queue-album-detail__spotify-btn {
    background: #fff;
    color: #1a1d2e;
    font-weight: 600; font-size: 0.86rem;
    text-decoration: none;
    border: 1px solid #d4d6e1;
    border-radius: 8px;
    padding: 8px 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: border-color 0.12s ease, color 0.12s ease;
}
.queue-album-detail__spotify-btn:hover {
    color: #1DB954;
    border-color: #1DB954;
}
.queue-album-detail__spotify-btn .material-icons { font-size: 16px; }

.queue-album-detail__title {
    margin: 0 0 4px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1d2e;
    line-height: 1.2;
}
.queue-album-detail__year {
    font-size: 1rem;
    font-weight: 500;
    color: #686b87;
}
.queue-album-detail__artist {
    font-size: 1rem;
    color: #2B988F;
    font-weight: 600;
    margin-bottom: 6px;
}
.queue-album-detail__artist-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    transition: border-color 0.12s ease, color 0.12s ease;
}
.queue-album-detail__artist-link:hover {
    color: #1b6b62;
    border-bottom-color: currentColor;
}
.queue-album-detail__meta {
    font-size: 0.82rem;
    color: #686b87;
    margin-bottom: 14px;
}
.queue-album-detail__tracks-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.queue-album-detail__tracks {
    list-style: none;
    margin: 0; padding: 0;
}
.queue-album-detail__track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    margin: 0 -8px;
    border-radius: 6px;
    font-size: 0.88rem;
}
.queue-album-detail__track:nth-child(even) {
    background: rgba(0, 0, 0, 0.035);
}
/* Tracklist Show all / Show less toggle — a clean teal pill with a
   chevron that rotates when the full list is expanded. */
.qad-tracks-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    padding: 6px 14px 6px 16px;
    border: 1px solid rgba(43, 152, 143, 0.35);
    border-radius: 999px;
    background: #f1faf9;
    color: #2b988f;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.qad-tracks-toggle:hover {
    background: #2b988f;
    border-color: #2b988f;
    color: #fff;
    box-shadow: 0 2px 8px rgba(43, 152, 143, 0.25);
}
.qad-tracks-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 152, 143, 0.3);
}
.qad-tracks-toggle__icon {
    font-size: 17px;
    transition: transform .2s ease;
}
.qad-tracks-toggle.is-expanded .qad-tracks-toggle__icon {
    transform: rotate(180deg);
}
.queue-album-detail__track-num {
    flex: 0 0 22px;
    color: #686b87;
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
    text-align: right;
}
.queue-album-detail__track-name {
    flex: 1 1 auto;
    color: #1a1d2e;
}
.queue-album-detail__explicit-pill {
    flex: 0 0 auto;
    font-size: 0.65rem;
    font-weight: 700;
    background: #686b87;
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
}
/* Album-level explicit marker shown beside the title (replaces the
   per-track "E" pills). Light red shade. */
.queue-album-detail__explicit-tag {
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #fde8e8;
    color: #d64545;
    border: 1px solid #f5c6c6;
    padding: 2px 7px;
    border-radius: 999px;
}

/* ──────────────────────────────────────────────────────────────────
   Inline artist detail (queue-mode picker). Hero strip with the
   artist image + name + genres, then a wrapping grid of their
   albums. Clicking an album drills into the inline album detail. */
.queue-artist-detail__hero {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-bottom: 18px;
}
.queue-artist-detail__image-wrap {
    position: relative;
    flex-shrink: 0;
    width: 140px;
    height: 140px;
}
.queue-artist-detail__image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
    display: block;
}
.queue-artist-detail__image--blank {
    background: #eef0f7;
    display: flex; align-items: center; justify-content: center;
}
.queue-artist-detail__image--blank .material-icons {
    color: #b6b9cf;
    font-size: 48px;
}
/* Spotify circle pinned to the bottom-right of the artist image —
   matches the badge on album hero covers (modal mobile view). */
.queue-artist-detail__spotify-circle {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 32px;
    height: 32px;
    background: #1DB954;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    transition: transform 0.12s ease, background 0.12s ease;
}
.queue-artist-detail__spotify-circle:hover {
    transform: scale(1.08);
    background: #1ed760;
    color: #fff;
}
.queue-artist-detail__spotify-circle i {
    font-size: 18px;
    line-height: 1;
}
.queue-artist-detail__hero-info {
    flex: 1 1 240px;
    min-width: 0;
}
.queue-artist-detail__name {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1d2e;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.queue-artist-detail__heart {
    font-size: 22px !important;
    color: #b6b9cf;
    cursor: pointer;
    transition: color 0.12s ease, transform 0.12s ease;
}
.queue-artist-detail__heart:hover { color: #e0245e; transform: scale(1.08); }
.queue-artist-detail__heart.favorited { color: #e0245e; }
.queue-artist-detail__followers {
    color: #686b87;
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.queue-artist-detail__genres {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 10px;
}
.queue-artist-detail__genre {
    background: rgba(43,152,143,0.10);
    color: #1d7a72;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.74rem;
    font-weight: 600;
}
.queue-artist-detail__bio {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.45;
    margin-bottom: 10px;
}
.queue-artist-detail__bio:empty {
    display: none;
}
.queue-artist-detail__actions {
    margin-top: 8px;
}
.queue-artist-detail__albums-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}
.queue-artist-detail__albums-head {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1d2e;
}
.queue-artist-detail__sort-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #686b87;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.queue-artist-detail__sort-select {
    font: inherit;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    color: #1a1d2e;
    background: #fff;
    border: 1px solid #d4d6e1;
    border-radius: 6px;
    padding: 4px 8px;
    height: 30px;
    cursor: pointer;
}
.queue-artist-detail__sort-select:focus {
    outline: none;
    border-color: #2B988F;
    box-shadow: 0 0 0 2px rgba(43,152,143,0.15);
}

/* Inline favorites view — two grids of cards, same shape as home rows. */
.queue-album-favorites { padding-top: 8px; }
.queue-fav__head {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1d2e;
}
.queue-fav__head--mt { margin-top: 24px; }
/* Horizontal-scroll row (was a wrapping grid — no way to tell there was
   more off-screen) with prev/next arrows, mirroring the artist-album
   slider's .mx-artist-album-nav look. */
.queue-fav__row-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.queue-fav__grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 14px;
    padding: 2px 2px 6px;
    flex: 1;
    min-width: 0;
}
.queue-fav__grid .mx-home__card {
    flex: 0 0 140px;
    width: 140px;
}
.queue-fav__nav {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    flex-shrink: 0;
    transition: opacity .25s ease, transform .2s ease;
}
.queue-fav__nav:disabled {
    opacity: 0.25;
    pointer-events: none;
}
.queue-fav__nav:not(:disabled):hover {
    transform: translateY(-1px);
}
.queue-fav__nav .material-icons {
    font-size: 22px;
    color: #333;
}
.queue-fav__nav--prev { margin-right: 8px; }
.queue-fav__nav--next { margin-left: 8px; }
/* Whole album card is the click target in the queue picker slider. */
.mx-artist-album-card[role="button"] {
    cursor: pointer;
}

/* Placeholder cover for slider cards with no Spotify art. */
.mx-artist-album-cover--blank {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f7;
    color: #b6b9cf;
}
.mx-artist-album-cover--blank .material-icons {
    font-size: 40px;
}

/* Inline retry shown if loading the artist's albums fails. */
.queue-artist-detail__more-btn {
    appearance: none;
    border: 1px solid #d4d7e6;
    background: #fff;
    color: #1a1d2e;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 9px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}
.queue-artist-detail__more-btn:hover {
    border-color: #2B988F;
    background: rgba(43, 152, 143, 0.05);
}
.queue-artist-detail__albums-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #b3261e;
    font-size: 0.85rem;
    text-align: center;
}
