/*
 * animeunity-v2 bridge — shared additions on top of animeunity.cx's vendored
 * sheets (vendor.css, common.css, auth.css, app.css — never edited):
 *
 *   §1  base: the `hidden` attribute, the brand logo, the odd utility the build lacks (v2-… names)
 *   §2  Bootstrap 4.6 plugin compatibility: .modal / .modal-backdrop / .fade (the engine's
 *       modals, styled like common.css's modal), .dropdown-menu (main.js's dropdown plugin),
 *       .tooltip, .collapse, .d-none, .loading
 *   §3  toasts: `#alert .alert` as common.css's `.alert[data-v-a288c79a]`, inline alerts in forms
 *   §4  header: the "Altro" menu, the member panel (bell, user menu), the mobile sidebar, the search overlay
 *   §5  sign-in modal (the auth card), the add-to-list widget and its folder menu
 *   §6  tooltipster (the engine's poster tooltip) in the v2 palette
 *   §7  the first skin's fragments that may land in a v2 page (fallback pages), kept legible
 *
 * Tokens: rgb(var(--tw-text-100|200|300)), rgb(var(--tw-back-900|950)), rgb(var(--tw-fore-500…800)),
 * rgb(var(--tw-blue-300)), var(--color-…) — never a fixed grey, so both themes come free.
 */

/* ---------- §1 base ---------- */

/* Roboto (the body) and Bebas Neue (calendar day names, ranks): animeunity.cx
   declares them in an inline <style> in its head (reference-v2/rendered/home.html),
   not in the vendored sheets — the same declarations, on the vendored files. */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/roboto-variable-normal-ccAYIvAh.woff2") format("woff2"); }
@font-face { font-family: "Bebas Neue"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/bebas-neue-400-normal-9mHNbWWO.woff2") format("woff2"); }
:root { --font-sans: "Roboto"; --font-bebas: "Bebas Neue"; }
.font-sans { font-family: var(--font-sans), -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; }
.font-bebas { font-family: var(--font-bebas), sans-serif; }

/* Tailwind's preflight hides [hidden] at the same specificity as `.flex` & co.,
   which win by order; the attribute must always win. */
[hidden] { display: none !important; }

/* The brand logo keeps its colours in the dark theme; the light theme shows
   it as the reference does (a dark silhouette), unless a class on the <img>
   already handles it (the header's dark:/light variants do). */
.v2-my-1 { margin-top: .25rem; margin-bottom: .25rem; }
.v2-menu-w { min-width: 220px; }
.v2-skel-days { height: 70px; }
.v2-skel-day { height: 2rem; width: 2rem; }
@media (min-width: 800px) {
    .v2-skel-days { height: 86px; }
    .v2-skel-day { height: 2.5rem; width: 3rem; }
}
.v2-hero--empty { height: 160px; }
@media (min-width: 800px) { .v2-hero--empty { height: 200px; } }
.v2-empty { font-family: Overpass, sans-serif; }

/* The site alert banner (common.css .banner is position:fixed): the wrapper
   only exists to carry the ids/hooks. */
.v2-banner .banner a, .v2-banner .banner strong, .v2-banner .banner b { color: #fff; }
.v2-banner > a { color: #fff; }
.v2-banner-icon { width: 16px; height: 16px; }

/* Text is selectable where the site's app.css switched it off (html{user-select:none}). */
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }

/* ---------- §2 Bootstrap plugin compatibility ---------- */

.fade { transition: opacity .15s linear; }
@media (prefers-reduced-motion: reduce) { .fade { transition: none; } }
.fade:not(.show) { opacity: 0; }
.collapse:not(.show) { display: none; }
.collapsing { position: relative; height: 0; overflow: hidden; transition: height .35s ease; }
.d-none { display: none !important; }

/* The engine's modals (#sign, report, request, …): Bootstrap 4.6's plugin
   sets display:block inline and toggles .show; the look is common.css's
   `.modal[data-v-963c053d]` (z-index 75 over the navbar, a dark backdrop,
   the card centred). */
.modal { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; overflow-x: hidden; overflow-y: auto; outline: 0; -webkit-overflow-scrolling: touch; }
.modal-open { overflow: hidden; }
.modal-open .modal { overflow-x: hidden; overflow-y: auto; }
.modal-dialog { position: relative; width: auto; margin: .5rem; pointer-events: none; }
.modal.fade .modal-dialog { transition: transform .3s ease-out; transform: translate(0, -50px); }
.modal.show .modal-dialog { transform: none; }
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto; outline: 0; }
.modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000; }
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: .85; }
@media (min-width: 500px) {
    .modal-dialog { max-width: 500px; margin: 1.75rem auto; }
}
/* The v2 dialogs centre their card in the viewport. */
.v2-modal-dialog { display: flex; align-items: center; min-height: calc(100% - 1rem); }
@media (min-width: 500px) { .v2-modal-dialog { min-height: calc(100% - 3.5rem); } }
/* The auth card keeps the reference page's 16px side gutter (px-4) on phones. */
@media (max-width: 575.98px) { #sign .v2-modal-dialog { margin-left: 1rem; margin-right: 1rem; } }
.v2-modal-content { align-items: center; background: transparent; }
.v2-modal-close { z-index: 2; }
.v2-modal-close:hover { background: rgb(var(--tw-fore-700)); }

/* main.js's dropdown plugin: the menu is a direct child of the toggle's
   parent, `.show` goes on the parent (+ inline display on the menu). */
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 1000; min-width: 10rem; padding: .25rem 0; margin: .125rem 0 0; font-family: Overpass, sans-serif; font-size: 14px; color: rgb(var(--tw-text-100)); text-align: left; background-color: rgb(var(--tw-fore-800)); border-radius: .375rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / .25), 0 2px 4px -2px rgb(0 0 0 / .25); }
.dropdown-menu-right { right: 0; left: auto; }
.show > .dropdown-menu, .dropdown-menu.show { display: block; }
.dropdown-item { display: block; width: 100%; padding: .5rem 1rem; clear: both; font-weight: 600; color: rgb(var(--tw-text-200)); text-align: inherit; white-space: nowrap; background-color: transparent; border: 0; cursor: pointer; }
.dropdown-item:hover, .dropdown-item:focus { color: rgb(var(--tw-blue-100)); background-color: rgb(var(--tw-fore-700)); text-decoration: none; }
.dropdown-item.active, .dropdown-item:active { color: #fff; background-color: rgb(var(--tw-blue-300)); }
.dropdown-divider { height: 0; margin: .5rem 0; overflow: hidden; border-top: 1px solid rgb(var(--tw-fore-700)); }

/* Bootstrap tooltips (the first skin's fragments still carry data-toggle="tooltip"). */
.tooltip { position: absolute; z-index: 1070; display: block; margin: 0; font-family: Overpass, sans-serif; font-size: 12px; line-height: 1.5; word-wrap: break-word; opacity: 0; }
.tooltip.show { opacity: .95; }
.tooltip .arrow { display: none; }
.tooltip-inner { max-width: 200px; padding: .25rem .5rem; color: #fff; text-align: center; background-color: #000; border-radius: .25rem; }
.bs-tooltip-top, .bs-tooltip-auto[x-placement^="top"] { padding: .4rem 0; }
.bs-tooltip-bottom, .bs-tooltip-auto[x-placement^="bottom"] { padding: .4rem 0; }

/* AjaxForm's busy marker (starts display:none; main.js .show()s it). */
.loading { display: block; }
.v2-loading { width: 20px; height: 20px; margin: .5rem auto 0; border: 2px solid rgb(var(--tw-fore-500)); border-top-color: rgb(var(--tw-blue-300)); border-radius: 9999px; animation: v2-spin .8s linear infinite; }
@keyframes v2-spin { to { transform: rotate(360deg); } }

/* ---------- §3 toasts ---------- */

/* window.showToast (the first skin's app.js) puts `div.alert…` into
   `#alert .col-md-12`; drawn as common.css's `.alert[data-v-a288c79a]`. */
#alert .alert, .alert.v2-toast {
    z-index: 3000; position: fixed; top: 4.5rem; right: 2rem; width: 20rem;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .75rem 1.2rem; font-family: Overpass, sans-serif; font-size: 15px; line-height: 1.35;
    color: var(--color-text-light); background: var(--color-foreground-2);
    border-top: 2px solid var(--color-green-2); border-radius: 2px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / .2);
}
@media screen and (max-width: 499px) {
    #alert .alert, .alert.v2-toast { width: 92vw; left: 4%; right: auto; }
}
#alert .alert.alert-danger, #alert .alert.alert-error, .alert.v2-toast.alert-danger { border-top-color: red; }
#alert .alert.alert-warning { border-top-color: #f59e0b; }
#alert .alert.alert-info { border-top-color: rgb(var(--tw-blue-200)); }
#alert .alert strong { display: inline-flex; margin-right: .35rem; color: var(--color-green-2); }
#alert .alert.alert-danger strong { color: red; }
#alert .alert .close, .alert .close { margin-left: auto; padding: 0; font-size: 20px; line-height: 1; color: var(--color-text-dark); background: none; border: 0; cursor: pointer; }

/* In-form notices (AjaxForm prepends `.alert` into the form): in place, not a toast. */
.au-inline-alert .alert, .v2-inline-alert .alert { position: static; width: auto; margin: 0 0 1rem; padding: .6rem .9rem; font-size: 13px; color: rgb(var(--tw-text-100)); background: rgb(var(--tw-fore-700)); border-top: 2px solid var(--color-green-2); border-radius: 3px; }
.au-inline-alert .alert.alert-danger, .v2-inline-alert .alert.alert-danger { border-top-color: red; }

/* ---------- §4 header ---------- */

/* "Altro": a hover / tap menu under the link (CMS-only destinations). */
.v2-more { display: flex; align-items: center; align-self: stretch; }
.v2-more::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 26px; }
.v2-more-menu { top: calc(100% + 26px); margin-left: -.5rem; }
.v2-more:hover .v2-more-menu, .v2-more.is-open .v2-more-menu { display: block; }
.v2-more--active > a { color: rgb(var(--tw-text-50)); }

/* The member panel (partials/user-panel). */
.v2-bell, .v2-usermenu { display: flex; align-items: center; }
.v2-bell-btn { position: relative; }
.v2-bell-btn.active { color: rgb(var(--tw-blue-200)); }
.v2-bell-count { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; font-family: Overpass, sans-serif; font-size: 10px; font-weight: 700; line-height: 16px; color: #fff; text-align: center; background: #ef4444; border-radius: 9999px; }
.v2-bell-menu { top: calc(100% + 14px); right: -8px; width: 360px; max-width: calc(100vw - 2rem); max-height: min(70vh, 560px); padding: 0; overflow: auto; }
.v2-bell-head { padding: .5rem .5rem 0; }
.noti-bell-tabs { display: flex; gap: .125rem; padding: .125rem; font-size: 12px; font-weight: 700; background: rgb(var(--tw-fore-700)); border: 1px solid rgb(var(--tw-fore-600)); border-radius: .375rem; }
.noti-bell-tabs > span { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: .3rem; height: 26px; padding: 0 .5rem; color: rgb(var(--tw-text-300)); border-radius: .25rem; cursor: pointer; }
.noti-bell-tabs > span.active { color: #fff; background: rgb(var(--tw-blue-300)); }
.noti-bell-tabs .badge { display: inline-flex; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; color: #fff; justify-content: center; background: rgb(var(--tw-fore-500)); border-radius: 9999px; }
.noti-bell-tabs .badge.au-zero { display: none; }
.noti-bell-actions { display: flex; justify-content: flex-end; padding: .5rem .75rem 0; font-size: 12px; }
.noti-bell-actions a { display: inline-flex; align-items: center; gap: .3rem; color: rgb(var(--tw-text-300)); }
.noti-bell-actions a:hover { color: rgb(var(--tw-text-100)); }
.noti-bell-pane { display: none; padding: .5rem; }
.noti-bell-pane.active { display: block; }
.v2-bell-menu .nnl-item, .v2-bell-menu .no-result { display: block; padding: .5rem .5rem; font-size: 13px; color: rgb(var(--tw-text-300)); text-align: center; }
.v2-bell-menu .scaff.items > a, .v2-bell-menu .scaff.items > div { display: flex; gap: .6rem; align-items: center; padding: .5rem; font-size: 13px; color: rgb(var(--tw-text-200)); border-radius: .375rem; }
.v2-bell-menu .scaff.items > a:hover { background: rgb(var(--tw-fore-700)); color: rgb(var(--tw-text-100)); }
.v2-bell-menu .scaff.items .film-poster { flex: 0 0 40px; width: 40px; height: 56px; overflow: hidden; border-radius: .25rem; }
.v2-bell-menu .scaff.items .film-poster-img, .v2-bell-menu .scaff.items img { width: 100%; height: 100%; object-fit: cover; }
.v2-bell-menu .scaff.items .time { font-size: 11px; color: rgb(var(--tw-text-300)); }
.v2-bell-menu .scaff.items .new { color: rgb(var(--tw-text-100)); }
.v2-bell-menu .nnl-more { display: block; padding: .6rem; font-size: 13px; font-weight: 700; color: rgb(var(--tw-text-300)); text-align: center; border-top: 1px solid rgb(var(--tw-fore-700)); }
.v2-bell-menu .nnl-more:hover { color: rgb(var(--tw-text-100)); }
.v2-avatar { display: block; width: 32px; height: 32px; background-color: rgb(var(--tw-fore-600)); background-position: center; background-size: cover; border-radius: 9999px; }
.v2-usermenu-btn:hover .v2-usermenu-name { color: rgb(var(--tw-text-50)); }
.v2-usermenu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; }
.v2-usermenu-menu { display: none; top: calc(100% + 20px); }
.v2-usermenu:hover .v2-usermenu-menu, .v2-usermenu.is-open .v2-usermenu-menu { display: block; }
.v2-usermenu-menu form { margin: 0; }
/* The hamburger wears a dot while anything is unread (app.js memberHeader). */
.v2-burger { position: relative; }
.v2-burger.au-has-unread::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: #ef4444; border-radius: 9999px; }

/* The mobile sidebar sits under the navbar (and the site alert banner). */
.v2-sidebar { top: calc(75px + var(--7899e5ce, 0px)); }
@media screen and (max-width: 499px) { .v2-sidebar { top: calc(75px + var(--b9b79458, 0px)); } }
.v2-sidebar-backdrop { top: calc(75px + var(--7899e5ce, 0px)); }
@media screen and (max-width: 499px) { .v2-sidebar-backdrop { top: calc(75px + var(--b9b79458, 0px)); } }
@media (min-width: 1040px) { .v2-sidebar, .v2-sidebar-backdrop { display: none !important; } }
body.v2-sidebar-open { overflow: hidden; }

/* The search overlay covers the banner too (the reference's: top 0, the bar at 75px). */
body.v2-search-open { overflow: hidden; }

/* ---------- §5 the sign-in modal, add-to-list ---------- */

.v2-auth-card .form-input { color: var(--color-text); }
.v2-auth-card .form-input::placeholder { color: rgb(var(--tw-text-300)); }
.v2-auth-card .input-group { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; }
.v2-auth-card h1 { font-family: inherit; }
.v2-auth-card .auth-error:empty { display: none; }
.v2-check-box .v2-check-mark { color: #fff; }
.v2-check-mark { display: none; width: .6rem; height: .6rem; }
.v2-check input:checked + .v2-check-box { background: rgb(var(--tw-blue-300)); border-color: rgb(var(--tw-blue-300)); }
.v2-check input:checked + .v2-check-box .v2-check-mark { display: block; }
.v2-social { background: var(--au-brand, rgb(var(--tw-fore-600))); }
.v2-social:hover { filter: brightness(1.1); }
.v2-auth-card .captcha:empty { display: none; }
.v2-auth-card .au-captcha:has(.captcha:empty) { display: none; }
/* app.js's social-error block re-opens the modal; its alert reads as an inline notice. */
.au-social-error .alert { position: static; width: auto; margin: 1rem 0 0; }

/* The engine's add-to-list widget in its v2 looks (partials/animeunity/add-to-list). */
.v2-add-list { display: inline-flex; }
.v2-add-list > a { text-decoration: none; }
.v2-add-list .au-folder-label:empty::before { content: "Aggiungi alla lista"; }
.v2-add-list--hero .au-folder-label:empty::before { content: "AGGIUNGI ALLA LISTA"; }
.v2-add-list--round .au-folder-label { display: none; }
.v2-folders { top: calc(100% + 6px); min-width: 200px; }
.v2-add-list--round .v2-folders { right: 0; left: auto; }

/* The per-title colours (partials/animeunity/_v2-media-vars.php): the inline
   --media-text is the dark theme's tone; animeunity.cx uses the darker of the
   pair on the light theme. */
html.light [style*="--v2-mt-l"] { --media-text: var(--v2-mt-l) !important; }

/* The "+" of rows and poster cards ([data-v2-plus], v2-shell.js): the engine's
   widget is laid over the clicked button only while its menu is open. */
.v2-plus-float { position: absolute; z-index: 1040; display: block; }
.v2-plus-float > a { position: absolute; inset: 0; display: block; border-radius: 5px; }
.v2-plus-float .v2-folders { top: calc(100% + 6px); right: auto; left: 0; text-align: left; }
.v2-plus-float--left .v2-folders { right: 0; left: auto; }
.v2-plus-slot.v2-plus-open { width: 1.25rem; margin-left: 0; opacity: 1; pointer-events: auto; }
.v2-plus-corner.v2-plus-open { --tw-scale-x: 1; --tw-scale-y: 1; opacity: 1; }
[data-v2-plus][aria-expanded="true"] { color: var(--media-text); }
[data-v2-plus]:focus-visible { outline: 2px solid rgb(var(--tw-blue-300)); outline-offset: 1px; }

/* ---------- §6 tooltipster ---------- */

.tooltipster-base .tooltipster-box { background: rgb(var(--tw-fore-800)); border: 1px solid rgb(var(--tw-fore-600)); border-radius: .5rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / .3); }
.tooltipster-base .tooltipster-content { padding: 0; color: rgb(var(--tw-text-100)); font-family: Overpass, sans-serif; }
.tooltipster-base .tooltipster-arrow { display: none; }

/* ---------- §7 the first skin's fragments on fallback pages ---------- */

/* Pages v2 does not ship yet render the first skin's views inside this shell
   (no Bootstrap CSS): keep them readable — a container, links, headings. */
#app:not(.home):not(.error):not(.v2-native) #content > .container, #app:not(.home):not(.error):not(.v2-native) #content > div > .container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 1.5rem 1rem; }
#app:not(.home):not(.error):not(.v2-native) #content a { color: rgb(var(--tw-blue-200)); }
#app:not(.home):not(.error):not(.v2-native) #content h1, #app:not(.home):not(.error):not(.v2-native) #content h2, #app:not(.home):not(.error):not(.v2-native) #content h3 { font-family: Overpass, sans-serif; font-weight: 800; }
#app:not(.home):not(.error):not(.v2-native) #content img { max-width: 100%; height: auto; }

/* ---------- §4b header bell rows (member area: partials/notifications/bell-*) ---------- */

/* The bell's community / system rows land outside `.scaff.items` once
   notifications-bell.js re-renders them: the same row look by class. */
.v2-bell-menu .v2-bell-row { display: flex; gap: .6rem; align-items: center; padding: .5rem; font-size: 13px; line-height: 1.35; text-align: left; color: rgb(var(--tw-text-200)); border-radius: .375rem; }
.v2-bell-menu a.v2-bell-row:hover { color: rgb(var(--tw-text-100)); background: rgb(var(--tw-fore-700)); }
.v2-bell-menu .v2-bell-row.old { opacity: .6; }
.v2-bell-menu .v2-bell-row .user-avatar { display: flex; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 36px; overflow: hidden; color: rgb(var(--tw-text-200)); background: rgb(var(--tw-fore-600)); border-radius: 9999px; }
.v2-bell-menu .v2-bell-row .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.v2-bell-menu .v2-bell-text { flex: 1 1 0; min-width: 0; }
.v2-bell-menu .v2-bell-text strong { display: block; font-weight: 700; color: rgb(var(--tw-text-100)); overflow-wrap: anywhere; }
.v2-bell-menu .v2-bell-text p { margin: 0; font-size: 12px; color: rgb(var(--tw-text-300)); overflow-wrap: anywhere; }
.v2-bell-menu .v2-bell-row .time { display: block; font-size: 11px; color: rgb(var(--tw-text-300)); }

/* Overpass draws "·" (U+00B7) with a zero advance, so a CMS separator such as
   "2 mesi fa · modificato" looked glued to the next word. animeunity.cv never
   prints the character; for the CMS pages that do, this one code point comes
   from a system font. The descriptors must equal app.css's Overpass face
   (normal, 400 900) so the two join into one composite face; different ones
   would make the browser pick this face alone and drop Overpass. */
@font-face { font-family: Overpass; font-style: normal; font-weight: 400 900; src: local('Segoe UI'), local('Roboto'), local('Helvetica Neue'), local('Arial'), local('DejaVu Sans'); unicode-range: U+00B7; }
