/* AbibitumiTV: Abibinnwom finishing layer (loads after fx2).
   1) Hex carbon really visible: the full-page wrappers that still
      painted a solid colour are cleared with selectors that outrank
      the theme's "html body #main-container.home-container ..." rules.
   2) Hardware details carried over from abibinnwom.app. */

/* ----------------------------------------------- 1. clear the covers */
html#html body#pt-body .yp_side_menu,
html#html body#pt-body #main-container #container_content,
html#html body#pt-body #main-container.home-container #container_content,
html#html body#pt-body #main-container.home-container .pt_homepg_whote_bg.margin,
html#html body#pt-body .yp_side_drawer,
html#html body#pt-body .yp_side_drawer .sections,
html#html body#pt-body .page-margin,
html#html body#pt-body .content-container,
html#html body#pt-body .channel-content,
html#html body#pt-body .setting-panel-wrapper,
html#html body#pt-body .pt_vdo_watch_page,
html#html body#pt-body .pt_search_page,
html#html body#pt-body .owl-carousel.pt_new_home_feat_vidd {
  background-color: transparent !important;
  background-image: none !important;
}

/* Carbon: same recipe as abibinnwom.app (448px tile, lit top-right). */
html:has(link.night-mode-css) body#pt-body {
  background:
    radial-gradient(110% 100% at 100% 0%, rgba(0,0,0,.6), rgba(0,0,0,.84) 45%, rgba(0,0,0,.95)),
    var(--abn-tex-carbon) 0 0 / 448px 448px,
    #050506 !important;
}
html:has(link.night-mode-css) body#pt-body::before {
  opacity: .7 !important;
  -webkit-mask-image: radial-gradient(60% 55% at 100% 0%, #000 0%, rgba(0,0,0,.45) 45%, transparent 85%) !important;
  mask-image: radial-gradient(60% 55% at 100% 0%, #000 0%, rgba(0,0,0,.45) 45%, transparent 85%) !important;
}
/* Light mode: silver carbon (the red-hex tile, desaturated and lifted). */
html:not(:has(link.night-mode-css)) body#pt-body {
  background: #d3d5d8 !important;
  position: relative;
  z-index: 0;
}
html:not(:has(link.night-mode-css)) body#pt-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--abn-tex-carbon) 0 0 / 448px 448px;
  filter: grayscale(1) invert(1) brightness(1.05) contrast(.55);
  opacity: .5;
  -webkit-mask-image: radial-gradient(130% 120% at 100% 0%, #000 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.35) 100%);
  mask-image: radial-gradient(130% 120% at 100% 0%, #000 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.35) 100%);
}

/* Side rail: brushed metal over the carbon, not a flat slab. */
html#html body#pt-body .left_menu {
  background:
    linear-gradient(90deg, rgba(0,0,0,.25), rgba(0,0,0,0) 30%, rgba(255,255,255,.04) 60%, rgba(0,0,0,.2)),
    var(--abn-bar) !important;
}
html:has(link.night-mode-css) body#pt-body .left_menu {
  background:
    linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.35)),
    var(--abn-tex-carbon) 0 0 / 448px 448px,
    #0b0b0d !important;
}
html#html body#pt-body .yp_side_drawer ul.sections li > a {
  border-radius: 12px !important;
  transition: background .2s, transform .2s;
}
html#html body#pt-body .yp_side_drawer ul.sections li > a:hover { transform: translateX(2px); }
html#html body#pt-body .yp_side_drawer .menu_static_text {
  letter-spacing: .18em !important;
  font-size: 10px !important;
  opacity: .7;
}

/* ------------------------------------------- 2. hardware details */

/* Featured hero: twin red/green rule under the title. */
html body#pt-body .feature_wrap .feature_text_title::after {
  content: "";
  display: block;
  width: 200px;
  max-width: 60%;
  height: 4px;
  margin-top: 14px;
  background:
    linear-gradient(90deg, #b0102a, #e01e37 45%, transparent 45%, transparent 55%, #0f8a3c 55%, #19b24f);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(224,30,55,.35);
}

/* "See all" links read like engraved plate text. */
html body#pt-body .view_more_link {
  text-transform: uppercase;
  letter-spacing: .16em !important;
  font-size: 10px !important;
}

/* Thumbnails: metal bezel + amber glint sweep on hover. */
html body#pt-body .video-list-image,
html body#pt-body .video-thumb,
html body#pt-body .pt_video_thumb {
  position: relative;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 6px 16px -8px rgba(0,0,0,.8);
}
html body#pt-body .video-list-image::after,
html body#pt-body .video-thumb::after,
html body#pt-body .pt_video_thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,214,150,.0) 42%, rgba(255,214,150,.28) 50%, rgba(255,214,150,0) 58%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .7s ease;
}
html body#pt-body .video-list:hover .video-list-image::after,
html body#pt-body .video-thumb:hover::after,
html body#pt-body .pt_video_thumb:hover::after { transform: translateX(120%); }

/* Duration chips: smoked glass with a hairline. */
html body#pt-body .video-duration,
html body#pt-body .abv-cw-dur {
  background: rgba(8,8,10,.72) !important;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 8px !important;
  font-variant-numeric: tabular-nums;
}

/* Scrollbar: thin chrome rail. */
html#html { scrollbar-width: thin; scrollbar-color: #6d7076 transparent; }
html#html ::-webkit-scrollbar { width: 10px; height: 10px; }
html#html ::-webkit-scrollbar-track { background: transparent; }
html#html ::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 10px;
  background: linear-gradient(90deg, #9a9da2, #e6e8ea 50%, #8a8d92) padding-box;
}

/* Text selection in brand red. */
html#html ::selection { background: rgba(224,30,55,.55); color: #fff; }

/* Keyboard focus: green lamp ring (accessibility). */
html#html body#pt-body :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #19b24f !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(25,178,79,.25) !important;
}


/* ============ 3. Lamp rings, as on abibinnwom.app ============
   green throb  = go / playing
   red throb    = not playing (idle, ended, error)
   yellow throb = paused
   State comes from abibinnwom-fx3.js (data-abn-state on the player). */
:root {
  --abn-lamp-green: #3cf06a;
  --abn-lamp-red: #ff3b4f;
  --abn-lamp-yellow: #ffd23a;
}
@keyframes abn-lamp {
  0%, 100% { opacity: .9; }
  50% { opacity: .15; }
}

/* Go buttons: steady green lamp that throbs. */
html body#pt-body :is(.button_watch, .btn-success, .abib-btn-primary, .upload-btn, #upload-button) {
  position: relative;
  --abn-lamp: var(--abn-lamp-green);
}

/* Shared lamp ring (drawn on ::before so fx.css's ::after edge light stays). */
html body#pt-body :is(.button_watch, .btn-success, .abib-btn-primary,
  .mejs__overlay-button, .mejs__playpause-button > button)::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--abn-lamp, var(--abn-lamp-red)), 0 0 14px 2px var(--abn-lamp, var(--abn-lamp-red));
  opacity: .9;
  animation: abn-lamp 2.6s ease-in-out infinite;
  z-index: 2;
}
/* PlayTube's watch button already breathes in fx2; the ring replaces it. */
html body#pt-body .button_watch { animation: none !important; }

/* ---- the video player ---- */
html body#pt-body .mejs__container { --abn-lamp: var(--abn-lamp-red); }
html body#pt-body .mejs__container[data-abn-state="playing"] { --abn-lamp: var(--abn-lamp-green); }
html body#pt-body .mejs__container[data-abn-state="paused"]  { --abn-lamp: var(--abn-lamp-yellow); }

/* Big centre button: round machined knob instead of the blue square. */
html#html body#pt-body .mejs__overlay-button {
  position: relative;
  width: 78px !important;
  height: 78px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.35), rgba(255,255,255,0) 55%),
    repeating-conic-gradient(from 0deg, rgba(255,255,255,.05) 0 2deg, rgba(0,0,0,.05) 2deg 4deg),
    radial-gradient(circle, #3a3c40 0%, #17181a 70%, #0b0b0c 100%) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -2px 4px rgba(0,0,0,.7), 0 10px 26px rgba(0,0,0,.6) !important;
  transition: transform .15s ease;
}
html#html body#pt-body .mejs__overlay-button::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent #f4f5f6;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.6));
}
html#html body#pt-body .mejs__overlay-button:hover { transform: scale(1.06); }
html#html body#pt-body .mejs__overlay-button svg,
html#html body#pt-body .mejs__overlay-button img { display: none !important; }

/* Control-bar play/pause: small metal button with the same lamp. */
html#html body#pt-body .mejs__playpause-button,
html#html body#pt-body .mejs__playpause-button > button { overflow: visible !important; }
html#html body#pt-body .mejs__playpause-button > button {
  position: relative;
  border-radius: 50% !important;
  background-color: rgba(20,20,22,.85) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), inset 0 -1px 0 rgba(0,0,0,.6) !important;
}

/* Controls bar: smoked glass with a chrome top edge. */
html#html body#pt-body .mejs__controls {
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.75)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

/* Thumbnail play knobs (cards are not playing: red lamp throbs). */
@keyframes abn-knob-red {
  0%, 100% { box-shadow: 0 0 0 1.5px rgba(255,59,79,.95), 0 0 14px rgba(255,59,79,.6), 0 6px 16px rgba(0,0,0,.6); }
  50% { box-shadow: 0 0 0 1.5px rgba(255,59,79,.2), 0 0 4px rgba(255,59,79,.1), 0 6px 16px rgba(0,0,0,.6); }
}
html body#pt-body .video-list:hover .video-list-image a::before {
  animation: abn-knob-red 2.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  html body#pt-body :is(.button_watch, .btn-success, .abib-btn-primary,
    .mejs__overlay-button, .mejs__playpause-button > button)::before,
  html body#pt-body .video-list:hover .video-list-image a::before {
    animation: none;
  }
}
html[data-abn-lite="on"] body#pt-body :is(.button_watch, .btn-success, .abib-btn-primary,
  .mejs__overlay-button, .mejs__playpause-button > button)::before {
  animation: none;
}

/* ============ 4. Install / notification / update prompt ============
   Compact toast like abibinnwom.app: icon left, text and buttons right;
   bottom-right on desktop, bottom sheet on phones. */
html#html body#pt-body :is(#abib-install-banner, #abib-push-banner, #abib-update-banner) .abib-banner-inner {
  display: grid !important;
  grid-template-columns: 44px 1fr;
  grid-template-areas: "icon text" "icon actions";
  align-items: start;
  column-gap: 12px !important;
  row-gap: 10px !important;
}
html#html body#pt-body :is(#abib-install-banner, #abib-push-banner, #abib-update-banner) .abib-banner-icon { grid-area: icon; }
html#html body#pt-body :is(#abib-install-banner, #abib-push-banner, #abib-update-banner) .abib-banner-text {
  grid-area: text;
  display: flex; flex-direction: column; gap: 2px;
  border: 0 !important;
}
html#html body#pt-body :is(#abib-install-banner, #abib-push-banner, #abib-update-banner) .abib-banner-actions {
  grid-area: actions;
  display: flex; gap: 8px;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
html#html body#pt-body :is(#abib-install-banner, #abib-push-banner, #abib-update-banner) .abib-banner-text::after,
html#html body#pt-body :is(#abib-install-banner, #abib-push-banner, #abib-update-banner) .abib-banner-inner hr { display: none !important; }
@media (min-width: 768px) {
  html#html body#pt-body :is(#abib-install-banner, #abib-push-banner, #abib-update-banner) {
    left: auto !important;
    right: 20px !important;
    width: 420px !important;
    margin: 0 !important;
  }
}


/* ============ 5. Phone header: logo and icons no longer overlap ============ */
@media (max-width: 767px) {
  html#html body#pt-body .pt_main_hdr > .navbar-header {
    flex: 0 0 auto !important; width: auto !important; max-width: none !important; min-width: 0 !important;
  }
  html#html body#pt-body .pt_main_hdr .navbar-header .mobile { width: auto !important; }
  html#html body#pt-body .pt_main_hdr .navbar-header .mobile a.navbar-brand.logo-img {
    margin-left: 6px !important; padding: 0 !important; width: auto !important;
  }
  /* the logo file is 180x52 with the emblem on the left; show the emblem */
  html#html body#pt-body a.navbar-brand.logo-img img {
    width: 42px !important; max-width: 42px !important;
    object-fit: cover !important; object-position: left center !important;
  }
  html#html body#pt-body .pt_main_hdr > .navbar-right { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
  html#html body#pt-body .pt_main_hdr > .navbar-right > li { width: auto !important; min-width: 0 !important; }
  html#html body#pt-body .pt_main_hdr > .navbar-right > li > a {
    width: 42px !important; min-width: 42px !important;
    padding-left: 0 !important; padding-right: 0 !important; justify-content: center;
  }
}
/* empty message/notification counters drew dark dashes above the icons */
html#html body#pt-body :is(#new-messages, #new-notifications):empty { display: none !important; }

/* --------------------------------------------- lite / reduced motion */
html[data-abn-lite="on"] body#pt-body::after { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  html body#pt-body .video-list-image::after,
  html body#pt-body .video-thumb::after,
  html body#pt-body .pt_video_thumb::after { display: none; }
  html#html body#pt-body .yp_side_drawer ul.sections li > a:hover { transform: none; }
}
