/* XemPhim v2.1.2.2 — Unified Poster Badge System */

/* One poster language across catalogue, TopMovie, featured cards, search and widgets. */
.apx-card-badges{
  position:absolute!important;
  z-index:48!important;
  top:8px!important;
  right:8px!important;
  bottom:auto!important;
  left:8px!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:7px!important;
  width:auto!important;
  max-width:none!important;
  pointer-events:none!important;
}
.apx-card-badge{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  max-width:72%!important;
  height:34px!important;
  min-height:34px!important;
  padding:0 12px!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:10px!important;
  font-family:"Quicksand",sans-serif!important;
  font-size:14px!important;
  font-weight:850!important;
  line-height:1!important;
  letter-spacing:0!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  text-shadow:none!important;
  box-shadow:0 4px 12px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.18)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
/* Retire the v2.1.2.1 Cinema Sticker stripe. */
.apx-card-badge::before{display:none!important;content:none!important;}
.apx-card-badge--quality{
  margin-right:auto!important;
  background:linear-gradient(135deg,#facc15,#ca8a04)!important;
  color:#111!important;
  border-color:rgba(255,222,92,.52)!important;
}
.apx-card-badge--language,
.apx-card-badge--language-pd,
.apx-card-badge--language-tm,
.apx-card-badge--language-lt,
.apx-card-badge--language-mixed,
.apx-card-badge--language-generic{
  margin-left:auto!important;
  background:linear-gradient(135deg,#2563eb,#1e40af)!important;
  color:#fff!important;
  border-color:rgba(96,165,250,.52)!important;
}

/* Production year: same compact dark-pill visual hierarchy as the supplied reference. */
.apx-card-year-badge,
.topmovie-year-badge{
  position:absolute!important;
  z-index:47!important;
  top:auto!important;
  right:8px!important;
  bottom:8px!important;
  left:auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  min-width:48px!important;
  height:32px!important;
  min-height:32px!important;
  padding:0 11px!important;
  border:1px solid rgba(255,255,255,.16)!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,#334155,#1e293b)!important;
  color:#fff!important;
  font-family:"Quicksand",sans-serif!important;
  font-size:12px!important;
  font-weight:850!important;
  line-height:1!important;
  letter-spacing:.01em!important;
  text-shadow:none!important;
  box-shadow:0 4px 12px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.10)!important;
  pointer-events:none!important;
}

/* TopMovie keeps its editorial sizing but uses the exact unified palette. */
.topmovie-item--editorial .topmovie-thumb .apx-card-badge{
  height:34px!important;min-height:34px!important;padding:0 12px!important;font-size:14px!important;border-radius:10px!important;
}
.topmovie-item--editorial .topmovie-year-badge{top:auto!important;right:8px!important;bottom:8px!important;}

/* Featured / ordinary poster cards use the same three-corner contract. */
:is(.apx-catalog-card__poster,.apx-movie-card__poster,.apx-wide-card__poster,.apx-rank-card__poster,.pcgh-native-media,.apiphim-search-poster){position:relative!important;}

/* Sidebar widget: same colors and geometry, scaled for the much smaller poster. */
.apx-sidebar-movies__poster .apx-card-badges{top:4px!important;right:4px!important;left:4px!important;gap:3px!important;z-index:9!important;}
.apx-sidebar-movies__poster .apx-card-badge{
  height:18px!important;min-height:18px!important;max-width:62%!important;padding:0 4px!important;border-radius:5px!important;font-size:7px!important;font-weight:900!important;box-shadow:0 2px 6px rgba(0,0,0,.3)!important;
}
.apx-sidebar-movies__poster .apx-card-year-badge{
  right:4px!important;bottom:4px!important;min-width:30px!important;height:18px!important;min-height:18px!important;padding:0 4px!important;border-radius:5px!important;font-size:7px!important;z-index:9!important;
}
/* Widget rank moves away from top badge corners and the year pill. */
.apx-sidebar-movies--compact .apx-sidebar-movies__rank,
.apx-sidebar-movies--poster .apx-sidebar-movies__rank,
.apx-sidebar-movies--ranking .apx-sidebar-movies__rank{
  top:auto!important;right:auto!important;bottom:4px!important;left:4px!important;z-index:8!important;
}
.apx-sidebar-movies--compact .apx-sidebar-movies__rank{font-size:28px!important;}
.apx-sidebar-movies--compact .apx-sidebar-movies__rank--10{font-size:24px!important;}
.apx-sidebar-movies--compact .apx-sidebar-movies__rank--other{font-size:22px!important;}

/* Year now lives on the poster; suppress known legacy year echoes on unified card surfaces. */
.apx-featured-editorial__year{display:none!important;}

@media(max-width:767px){
  .apx-card-badges{top:5px!important;right:5px!important;left:5px!important;gap:4px!important;}
  .apx-card-badge{
    height:28px!important;min-height:28px!important;padding:0 8px!important;border-radius:8px!important;font-size:11px!important;
  }
  .apx-card-year-badge,.topmovie-year-badge{
    top:auto!important;right:5px!important;bottom:5px!important;min-width:42px!important;height:27px!important;min-height:27px!important;padding:0 8px!important;border-radius:8px!important;font-size:10px!important;
  }
  .apx-sidebar-movies__poster .apx-card-badges{top:3px!important;right:3px!important;left:3px!important;gap:2px!important;}
  .apx-sidebar-movies__poster .apx-card-badge{height:17px!important;min-height:17px!important;padding:0 3px!important;border-radius:5px!important;font-size:6.5px!important;}
  .apx-sidebar-movies__poster .apx-card-year-badge{right:3px!important;bottom:3px!important;min-width:28px!important;height:17px!important;min-height:17px!important;padding:0 3px!important;font-size:6.5px!important;}
}

/* Explicit TopMovie overrides beat the v2.1.2.1 scoped Cinema Sticker rules. */
.topmovie-item--editorial .topmovie-thumb .apx-card-badge::before{display:none!important;content:none!important;}
.topmovie-item--editorial .topmovie-thumb .apx-card-badge--quality{
  background:linear-gradient(135deg,#facc15,#ca8a04)!important;
  color:#111!important;
  border-color:rgba(255,222,92,.52)!important;
  text-shadow:none!important;
}
.topmovie-item--editorial .topmovie-thumb .apx-card-badge--language,
.topmovie-item--editorial .topmovie-thumb .apx-card-badge--language-pd,
.topmovie-item--editorial .topmovie-thumb .apx-card-badge--language-tm,
.topmovie-item--editorial .topmovie-thumb .apx-card-badge--language-lt,
.topmovie-item--editorial .topmovie-thumb .apx-card-badge--language-mixed,
.topmovie-item--editorial .topmovie-thumb .apx-card-badge--language-generic{
  background:linear-gradient(135deg,#2563eb,#1e40af)!important;
  color:#fff!important;
  border-color:rgba(96,165,250,.52)!important;
  text-shadow:none!important;
}
.topmovie-item--editorial .apx-card-year-badge.topmovie-year-badge{
  top:auto!important;
  right:8px!important;
  bottom:8px!important;
  left:auto!important;
  background:linear-gradient(135deg,#334155,#1e293b)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.16)!important;
  box-shadow:0 4px 12px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.10)!important;
}

/* Keep lower-left status readable when a year occupies the lower-right corner. */
:is(.apx-catalog-card__poster,.apx-movie-card__poster,.apx-wide-card__poster,.apx-rank-card__poster,.pcgh-native-media,.apiphim-search-poster):has(>.apx-card-year-badge) .apx-card-status{
  max-width:calc(100% - 72px)!important;
}
@media(max-width:767px){
  .topmovie-item--editorial .apx-card-year-badge.topmovie-year-badge{right:5px!important;bottom:5px!important;}
  :is(.apx-catalog-card__poster,.apx-movie-card__poster,.apx-wide-card__poster,.apx-rank-card__poster,.pcgh-native-media,.apiphim-search-poster):has(>.apx-card-year-badge) .apx-card-status{max-width:calc(100% - 58px)!important;}
}
