/* ============================================================================
   YoruVerse — Shared banner (cover photo) display module
   ----------------------------------------------------------------------------
   ONE sizing/display system for the user's banner image, used by:
     - settings.html  -> #coverPreview  (Settings > Preview Banner Image)
     - profile.html   -> #profileCover
     - user.html      -> #userCover
   The Settings preview is the visual reference: same aspect ratio, same
   background-size: cover behaviour, same object-position (the saved
   coverPositionX / coverPositionY percentages).
   Do not add page-specific banner sizing anywhere else — change it here.
   ========================================================================== */

:root {
  --yv-banner-ratio: 4 / 1;
  --yv-banner-min-h: 120px;
  --yv-banner-max-h: 220px;
  --yv-banner-radius: 24px;
}

.yv-banner,
.pf-shell .profile-cover.yv-banner,
#coverPreview.yv-banner {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--yv-banner-ratio);
  min-height: var(--yv-banner-min-h);
  max-height: var(--yv-banner-max-h);
  border-radius: var(--yv-banner-radius);
  overflow: hidden;
  background-color: #0c0c0c;
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  border: 1px solid rgba(148, 163, 184, 0.2);

  clip-path: polygon(
    0 10%,
    1.5% 4%,
    4% 0,
    96% 0,
    98.5% 4%,
    100% 10%,
    100% 90%,
    98.5% 96%,
    96% 100%,
    4% 100%,
    1.5% 96%,
    0 90%
  );
}

/* Banner rendered as a real <img> on profile/user so referrerpolicy applies. */
.yv-banner > img.profile-cover-img,
.pf-shell .profile-cover.yv-banner > img.profile-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
  z-index: 1;
  border: 0;
  background: transparent;
}

/* No darkening overlay: it hid part of the image and the Settings preview
   does not have one, so the three pages would not match. */
.yv-banner::after,
.pf-shell .profile-cover.yv-banner::after {
  content: none;
  display: none;
}

/* Narrow screens: a 3:1 strip becomes very short, so use the taller ratio
   on all three pages at once. */
@media (max-width: 640px) {
  :root {
    --yv-banner-ratio: 21 / 9;
    --yv-banner-min-h: 110px;
    --yv-banner-max-h: 160px;
  }
}