/*
 * animeunity-listing.css — owned by the listing area.
 * Scope: frontend/listing.blade.php — animeunity's Archivio (`#archivio`, every
 * CMS listing route + the A-Z list) and its Top Anime table (`#top`, /filter?top=1).
 *
 * animeunity draws these pages with app.css (`#archivio …`, `#top …`,
 * `.multiselect__*`) plus its Vue components' scoped CSS
 * (css/animeunity-components.css: au-v-archivio, au-v-archivio-item,
 * au-v-archivio-default-section, au-v-archivio-alternative-section,
 * au-v-archivio-alternative-item, au-v-top-anime) and the stock
 * vue-multiselect sheet (same file). Only what Vue did inline or in script,
 * and the CMS-only bits, live here. Loaded on every page: every rule is
 * scoped to `#archivio` / `#top`.
 */

/* Telegram bar column (Archivio: `div.col-md-12.mt-3[style=padding:0 10px]`,
   close button `right:15px!important`). */
#archivio .au-listing-bar { padding: 0 10px; }
#archivio .au-listing-bar .bar-close { right: 15px !important; }

/* Server pager: shown without JS (crawlers); the skin JS hides it and loads
   the next pages on scroll, as animeunity does. */
#archivio .au-pager[hidden] { display: none !important; }

/* Requests in flight (filter change / next page): Vue showed nothing; a
   faint dim keeps the old cards readable. */
#archivio [data-au-archivio].au-busy-reset #anime-wrapper { opacity: .6; transition: opacity .15s; }

/* Active tags: Vue adds `i.fas.fa-times` to the hovered badge (mouseenter). */
#archivio .active-tags .badge { user-select: none; }

/* vue-multiselect clone (animeunity-multiselect.js). The stock sheet draws
   it; the open state is `multiselect--active` + inline display on the
   content wrapper, as Vue. Opened upwards when there is no room below. */
#archivio .multiselect, #top .multiselect { outline: none; }

/* ArchivioAlternativeItem: Vue sets the title colour inline on mouseenter
   (#3db4f2) and back to var(--color-text) on mouseleave. */
#archivio .au-v-archivio-alternative-item .anime-item:hover .title { color: #3db4f2; }

/* ArchivioAlternativeItem's list button (v-if hovered): the engine's
   add-to-list widget, shown while the cover is hovered or its menu is open;
   28px circle on --color-background-0 (scoped CSS of the component). */
#archivio .au-v-archivio-alternative-item .au-alt-list { display: none; z-index: 6; }
#archivio .au-v-archivio-alternative-item .anime-item:hover .au-alt-list,
#archivio .au-v-archivio-alternative-item .au-alt-list:has(.show) { display: block; }
#archivio .au-v-archivio-alternative-item .au-add-list--round > .list-button { width: 28px; height: 28px; background: var(--color-background-0); color: #fff !important; font-size: 14px; }
#archivio .au-v-archivio-alternative-item .au-add-list--round > .list-button i { font-size: 14px; line-height: 28px; color: #fff !important; }
#archivio .au-v-archivio-alternative-item .cover { overflow: visible; }
#archivio .au-v-archivio-alternative-item .cover > a { display: block; position: absolute; inset: 0; overflow: hidden; border-radius: 4px; }

/* The card's list button: animeunity's `a.list-button` sits straight in
   `.button-wrap`; ours is wrapped in the engine's `.favourite` — a block,
   so no inline line box moves the circle. */
#archivio .au-v-archivio-item .button-wrap > .au-add-list { display: block !important; }
#archivio .au-v-archivio-item .au-add-list--round > .list-button { display: flex; align-items: normal; }

/* ArchivioItem mounted(): the plot scrolls while hovered (jQuery
   overflow-y:scroll / hidden) and the text turns --color-text-0 on the card's
   mouseenter (Vue inline style). */
#archivio .au-v-archivio-item .item-wrapper:hover .plot { color: var(--color-text-0); overflow-y: scroll; }

/* Top Anime: the add-to-list toggle is a link here (the engine's widget),
   animeunity's a <button> — `#top table button{padding:4px 8px;font-size:12px}`
   does not reach it. */
#top table .au-add-list > .add-list { font-size: 12px; line-height: 1.5; padding: 5px 8px; }
#top table .au-add-list > .add-list:hover { color: #fff; text-decoration: none; }
#top table .au-add-list .dropdown-menu { text-align: left; }
#top table img { object-fit: cover; }
#top .au-v-top-anime .top-item .image { background-position: center; }
/* The ranking flag: the generated components sheet points at /images/…,
   which the CMS does not serve (shared fix reported); same sprite here. */
#top .au-v-top-anime .top-item .info .rank,
#top .au-v-top-anime .top-item .info .icon-ranking::after { background-image: url("../images/icon_ranking_flag.png"); }

/* A-Z list (CMS-only): Top Anime's header strip (`#top .link-wrap`, h1,
   `.nav-link`) re-declared for the Archivio page, letters wrapping. */
#archivio .au-az-row { margin-left: -5px; margin-right: -5px; }
#archivio .au-az { background: var(--color-background-1); padding: 15px 30px; }
#archivio .au-az h2 { margin-top: 5px; font-size: 25px; font-weight: 700; margin-bottom: 0; line-height: 1; }
#archivio .au-az-nav { flex-wrap: wrap; }
#archivio .au-az-nav .nav-item { text-align: center; margin-right: 6px; margin-top: 10px; }
#archivio .au-az-nav .nav-link { color: var(--color-text); font-size: 15px; padding: 4px 8px; }
#archivio .au-az-nav .nav-link:hover { color: #3db4f2; }
#archivio .au-az-nav .active { color: #3db4f2; border-bottom: 2px solid #3db4f2; }
#archivio [data-mode="az"] #anime-wrapper { padding-top: 0; }
@media (max-width: 767px) {
    #archivio .au-az { padding: 15px; }
    #archivio .au-az-nav .nav-item { margin-right: 2px; }
    #archivio .au-az-nav .nav-link { padding: 4px 6px; }
}
