/* =========================================================
   M2FORUM SIDEBAR BANNERS
   /assets/banners/sidebar/m2-sidebar.css
========================================================= */

.sidebar-banner-container {
  position: relative;
  width: 98%;
  aspect-ratio: 450 / 800;
  margin: 12px auto;
  overflow: hidden;
  background: #0f0f0f;
  border-radius: 10px;
}

/* ---------- Slide ---------- */

.sidebar-banner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.995);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.sidebar-banner.active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sidebar-banner > a {
  display: block;
  width: 100%;
  height: 100%;
}

.sidebar-banner video,
.sidebar-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.sidebar-banner [hidden] {
  display: none;
}

/* ---------- Hover overlay ---------- */

.sidebar-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  background: rgba(0, 0, 0, 0.68);
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.sidebar-banner:hover .sidebar-banner-overlay {
  opacity: 1;
}

.sidebar-banner-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, gold, orange);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-banner-overlay span::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: linear-gradient(90deg, gold, orange);
  -webkit-mask: url("external.svg") center / contain no-repeat;
  mask: url("external.svg") center / contain no-repeat;
}

/* ---------- "Reclama ta aici" ---------- */

.sidebar-infothing {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 5;
  padding: 2px 6px;
  color: #fff;
  font-size: 11px;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 5px;
}

.sidebar-infothing:hover {
  color: #e8e8e8 !important;
  opacity: 0.9;
}

/* ---------- No banners ---------- */

.sidebar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: #fff;
  font-size: 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.45));
}

.sidebar-fallback a {
  margin-left: 8px;
  color: #ffd700;
}

/* ---------- Sticky second banner ---------- */

#sidebar-banner-2-anchor {
  position: relative;
}

#sidebar-banner-2.is-sticky {
  position: fixed;
  z-index: 1; /* under the navbar */
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1160px) {
  .sidebar-banner-overlay {
    display: none;
  }
}

@media (max-width: 480px) {
  .sidebar-banner-overlay {
    font-size: 14px;
  }

  .sidebar-infothing {
    right: 10px;
    bottom: 6px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-banner,
  .sidebar-banner-overlay {
    transition: none;
  }
}

/* Butonul "scroll to top" trebuie să fie peste bannerul sticky */
#scroll_to_top {
  z-index: 10;
}