/* Papabd-only layout repair. Native data bindings and visibility stay intact. */
main.py-4 { padding-top: 14px !important; }
main > .container { width: calc(100% - 24px); }
main > .container > .row { margin-left: 0; margin-right: 0; }
main > .container:empty, main > p:empty { display: none; }

/* Keep every existing friend group in a single visible top region. */
.papabd-friends-top {
  margin: 0 auto 16px; padding: 12px !important;
  border: 1px solid #ffa94d; border-radius: 10px; background: #343a40;
}
.papabd-friends-top > h2 {
  margin: 0 0 10px; color: #ffd08a; font-size: 18px; font-weight: 700;
}
.papabd-friends-top .fleet-native-friends {
  padding: 0; gap: 8px !important; justify-content: flex-start !important;
}
.papabd-friend-group + .papabd-friend-group { margin-top: 8px; }
.papabd-friends-top .fleet-native-friends > a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 7px 14px; border-radius: 6px;
  border: 1px solid #ffb657; background: #ffe3b5; color: #402600;
  font-size: 14px; font-weight: 700; line-height: 1.4;
  white-space: normal; overflow-wrap: anywhere;
}
.papabd-friends-top a:hover, .papabd-friends-top a:focus-visible {
  background: #ffc477; color: #231500; text-decoration: underline;
}

/* Wrap tag controls to the same container as the page content. */
.papabd-tags-wrap { margin: 10px auto 16px; }
html body .menu-color .card-body.fleet-native-tags {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  align-items: stretch; gap: 8px; padding: 8px !important; width: 100%;
}
html body .menu-color .card-body.fleet-native-tags > a {
  display: flex; justify-content: center; align-items: center;
  width: 100% !important; height: auto; min-height: 36px;
  margin: 0; padding: 7px 6px; line-height: 1.4;
  white-space: normal; overflow-wrap: anywhere;
}
.papabd-tags-wrap > .row > .col-md-12 { padding: 0; }

/* Only the nine real ten-card groups use this grid, not the more-links rows. */
.vodlist.papabd-vod-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px; margin: 0;
}
.vodlist.papabd-vod-grid > a.link_re { display: block; width: auto; min-width: 0; margin: 0; }
.vodlist.papabd-vod-grid > a.link_re > div {
  position: relative; width: 100%; height: auto; aspect-ratio: 1.12;
  background-size: cover; background-position: center; overflow: hidden;
}
.vodlist.papabd-vod-grid > a.link_re table,
.vodlist.papabd-vod-grid > a.link_re tbody { display: block; width: 100%; }
.vodlist.papabd-vod-grid > a.link_re tr:first-child { position: absolute; top: 0; right: 0; }
.vodlist.papabd-vod-grid > a.link_re th { height: auto; }
.vodlist.papabd-vod-grid > a.link_re tr:last-child { position: absolute; bottom: 0; left: 0; width: 100%; }
.vodlist.papabd-vod-grid > a.link_re td { display: block; width: 100%; }
.vodlist.papabd-vod-grid > a.link_re td > div {
  display: block; width: 100%; height: auto; min-height: 48px;
  padding: 6px 8px; border: 0; border-left: 3px solid #ff9900; background: #fff;
}
.vodlist.papabd-vod-grid > a.link_re td strong {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; font-size: 13px; line-height: 18px;
}

/* Details should end after their actual content, without a viewport-sized spacer. */
.net-page.papabd-detail { min-height: 0; margin-bottom: 20px; }
.papabd-detail .net-poster { align-items: start; grid-template-columns: 220px minmax(0, 1fr); }
.papabd-detail .net-poster > img { width: 100%; max-height: 310px; object-fit: contain; }
.papabd-detail .net-poster > div { min-width: 0; overflow-wrap: anywhere; }
.papabd-detail .net-poster > div > p:empty,
.papabd-detail .net-poster > div > div:empty { display: none; }
.net-title { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .vodlist.papabd-vod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html body .menu-color .card-body.fleet-native-tags { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .papabd-friends-top .fleet-native-friends > a { flex: 1 1 calc(50% - 8px); padding: 7px 8px; }
  .papabd-detail .net-poster { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
  .papabd-detail .net-poster > img { max-height: 156px; }
  .papabd-detail .net-title { font-size: 17px; }
}

/* Keep carousel controls inside their columns on narrow screens. */
main > .container:has(.title_1) > .row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 8px;
}
main > .container:has(.title_1) > .row > :is(.col-1, .col-10) {
  width: auto; max-width: none; padding: 0;
}
.avlive-show > .avlive:has(> a > table) {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
@media (min-width: 361px) and (max-width: 700px) {
  html body .menu-color .card-body.fleet-native-tags {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* One shared home tag section, below search. */
.papabd-home-tags { margin: 12px auto 16px; }
.papabd-home-tags > .row > .col-md-12 { padding: 0; }

/* Preserve the existing more-video button styling outside the old profile block. */

    .avlive a {
			border-style:double;
			color: #FFF !important;	
			text-align:center !important;
			display:inline-block;
		    border: 0px solid #f90 !important;
			text-decoration: none;
		}
	.avlive a table tr td a span{
	    color: #FFF !important;
	    
	}
	.avlive a table tr td a img{
	    border-radius: 15rem;
	    
	}
	.avlive .page_link {
	    color: #FFF !important;
	    border: rgba(51,51,51,.6) 1px solid;
	    background: rgba(51,51,51,.6);
	    text-align:center !important;
	    padding-left: 15px;
		padding-right: 15px;
	    height: 30px;
	    line-height: 30px;
	    border-radius: 15rem;
	}
	.avlive .page_lr {
	    color: #FFF !important;
	    border: rgba(51,51,51,.6) 1px solid;
	    background: rgba(51,51,51,.6);
	    text-align:center !important;
	    padding-left: 15px;
		padding-right: 15px;
	    height: 30px;
	    line-height: 30px;
	    border-radius: 15rem;
	}

/* Cover-only latest strip, with usable scrolling controls. */
.papabd-latest-strip .title_1 { overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none; }
.papabd-latest-strip .title_1::-webkit-scrollbar { display: none; }
.papabd-latest-strip .title_1 td { padding: 0 5px; }
.papabd-latest-strip button { cursor: pointer; border: 1px solid #dedede; }
.papabd-latest-strip button:focus-visible { outline: 2px solid #ffb657; outline-offset: -3px; }
/* Name chips replace performer profiles and lead to the matching search. */
main > .papabd-performer-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 8px auto 18px;
  padding: 12px !important; border-radius: 9px; background: #515b65;
}
.papabd-performer-tags > a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 7px 14px; border-radius: 20px;
  background: #ff9900; color: #2a1a00; font-size: 14px; font-weight: 600;
  line-height: 1.4; max-width: 100%; overflow-wrap: anywhere;
}
.papabd-performer-tags > a:hover, .papabd-performer-tags > a:focus-visible { background: #ffb547; text-decoration: underline; }
/* Category headings and their existing more links share one aligned row. */
main > .papabd-section-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 18px auto 8px; padding: 5px 12px !important;
  border-left: 5px solid #dcdcdc; background: #343a40;
}
.papabd-section-heading > h2 { margin: 0; min-width: 0; color: #fff; font-size: 18px; line-height: 1.4; }
.papabd-section-heading > .papabd-more-link {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 5px 12px; border-radius: 5px; color: #fff;
  background: #56616d; font-size: 13px; line-height: 1.4;
}
.papabd-more-link:hover, .papabd-more-link:focus-visible { background: #6c7986; text-decoration: underline; }
@media (max-width: 700px) {
  .papabd-section-heading > h2 { font-size: 16px; }
  .papabd-section-heading > .papabd-more-link { padding: 5px 9px; }
  .papabd-performer-tags > a { padding: 7px 10px; }
}
