/* PeerTube 8.3.1: scoped compatibility for the installed theme versions.
   Keep flag values adjacent to the colon: Firefox can retain CSS token whitespace. */
:root[data-pt-theme="peertube-core-light-beige"]{--is-dark:0;}
:root[data-pt-theme="peertube-core-dark-brown"]{--is-dark:1;}
:root[data-pt-theme="default"]{--is-dark:0;}
:root[data-pt-theme="dark"]{--is-dark:1;}
:root[data-pt-theme="dark-troo.tube-red"]{--is-dark:1;}
:root[data-pt-theme="framasoft"]{--is-dark:0;}
:root[data-pt-theme="icn"]{--is-dark:1;}
:root[data-pt-theme="mephi-dark"]{--is-dark:1;}
:root[data-pt-theme="okmq-dark"]{--is-dark:1;}
:root[data-pt-theme="okmq-helles"]{--is-dark:0;}
:root[data-pt-theme="uni-rostock"]{--is-dark:0;}

/* Make existing body-scoped theme colors visible to the core root palette. */
:root[data-pt-theme="dark-troo.tube-red"]{
  --mainBackgroundColor: #111111;
  --mainForegroundColor: #fff;
  --submenuColor: rgb(32, 32, 32);
  --inputColor: gray;
  --inputPlaceholderColor: #fff;
  --mainColor: #EB2E37;
  --mainHoverColor: #B52325;
}

/* Make existing body-scoped theme colors visible to the core root palette. */
:root[data-pt-theme="mephi-dark"]{
    --is-dark:1;
    --menu-bg: #2C3945;
    --menu-fg: #C7C7C7;
    --fg: #C7C7C7;
    --bg: #1A222A;
    --bg-secondary: #2B3945;
    --primary: rgb(0, 85, 187);
    --on-primary: #C7C7C7;
    --red: rgb(255, 80, 0);
    --green: #3C753D;
    --input-fg: #C7C7C7;
    --input-bg: #2C3945;
    --input-placeholder: #808080;
    --input-border-color: #2C3945;
    --input-check-active-fg: #C7C7C7;
    --input-check-active-bg: rgb(0, 85, 187);
    --textarea-fg: #C7C7C7;
    --textarea-bg: #2C3945;
    --secondary-icon-color: rgb(0, 85, 187);
    --active-icon-color: rgb(143, 144, 146);
    --active-icon-bg: rgb(0, 85, 187);
    --border-primary: rgb(0, 187, 238);
    --alert-primary-fg: #1A222A;
    --alert-primary-bg: rgb(255, 80, 0);
    --alert-primary-border-color: rgb(255, 80, 0);
    --header-bg: var(--bg);
    --header-fg: var(--fg);
}

/* Make existing body-scoped theme colors visible to the core root palette. */
:root[data-pt-theme="uni-rostock"]{
  --mainColor: #004a99;
  --mainHoverColor: #ffa100;
}

/* Repair the three invalid pvar() declarations in mephi-dark 0.1.1. */
:root[data-pt-theme="mephi-dark"] body{
  background-color:var(--bg);
  --header-bg:var(--bg);
  --header-fg:var(--fg);
}

/* Inherit the root aliases so administrator color settings still take precedence. */
:root[data-pt-theme="dark-troo.tube-red"] body{
  --mainBackgroundColor:inherit;
  --mainForegroundColor:inherit;
  --submenuColor:inherit;
  --inputColor:inherit;
  --inputPlaceholderColor:inherit;
  --mainColor:inherit;
  --mainHoverColor:inherit;
}

/* Inherit the root aliases so administrator color settings still take precedence. */
:root[data-pt-theme="mephi-dark"] body{
  --is-dark:inherit;
  --menu-bg:inherit;
  --menu-fg:inherit;
  --fg:inherit;
  --bg:inherit;
  --bg-secondary:inherit;
  --primary:inherit;
  --on-primary:inherit;
  --red:inherit;
  --green:inherit;
  --input-fg:inherit;
  --input-bg:inherit;
  --input-placeholder:inherit;
  --input-border-color:inherit;
  --input-check-active-fg:inherit;
  --input-check-active-bg:inherit;
  --textarea-fg:inherit;
  --textarea-bg:inherit;
  --secondary-icon-color:inherit;
  --active-icon-color:inherit;
  --active-icon-bg:inherit;
  --border-primary:inherit;
  --alert-primary-fg:inherit;
  --alert-primary-bg:inherit;
  --alert-primary-border-color:inherit;
  --header-bg:inherit;
  --header-fg:inherit;
}

/* Inherit the root aliases so administrator color settings still take precedence. */
:root[data-pt-theme="uni-rostock"] body{
  --mainColor:inherit;
  --mainHoverColor:inherit;
}
.orion-content {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 40px;
    margin-bottom: 40px;
}

.orion-previous-30-days .orion-ranking-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.orion-previous-30-days .orion-ranking-views {
    flex-shrink: 0;
    white-space: nowrap;
}

.orion-previous-30-days .orion-audience {
    border-top: 1px solid currentColor;
}

.orion-previous-30-days .orion-audience-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.orion-previous-30-days [data-ranking-status]:empty {
    display: none;
}
/* Prevent background scroll while focus overlay is open */
body#custom-css.pt-focus-embed-open {
  overflow: hidden;
}

/* Fullscreen overlay that shows the real PeerTube embed page (1:1 UI) */
body#custom-css .pt-focus-embed-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #000;
}

body#custom-css .pt-focus-embed-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Hide Focus + Exit Focus buttons while the player is in browser fullscreen */
body#custom-css .video-js.vjs-fullscreen .vjs-focus-mode-control,
body#custom-css .video-js.vjs-fullscreen .vjs-exit-focus-control {
  display: none !important;
}

/* Ensure Focus/Exit buttons match default control sizing/spacing */
body#custom-css .vjs-control-bar .vjs-focus-mode-control,
body#custom-css .vjs-control-bar .vjs-exit-focus-control {
  width: 3em;
  margin: 0;
  padding: 0;
}
