/* RinaTube overrides on top of the original 2008 stylesheet (base_all.css). */

/* ---- logo ---------------------------------------------------------------- */
#masthead .logo img { background: white url(../img/rt/logo.png) no-repeat scroll 0 0; }

/* ---- 2008-era scrollbars (Windows look) ----------------------------------- */
.watch-discoverbox::-webkit-scrollbar { width: 17px; }
.watch-discoverbox::-webkit-scrollbar-track { background: #f0f0f0; border-left: 1px solid #e6e6e6; }
.watch-discoverbox::-webkit-scrollbar-thumb {
  background: linear-gradient(to right, #eaeaea, #dcdcdc 45%, #cfcfcf);
  border: 1px solid #9a9a9a; border-radius: 2px; min-height: 20px;
}
.watch-discoverbox::-webkit-scrollbar-thumb:hover { background: linear-gradient(to right, #e3f2fb, #c8e4f6 45%, #b2d8f2); border-color: #3c7fb1; }
.watch-discoverbox::-webkit-scrollbar-button:single-button { display: block; height: 17px; background-color: #f0f0f0; background-repeat: no-repeat; background-position: center; }
.watch-discoverbox::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 4h7L3.5 0z' fill='%23404040'/%3E%3C/svg%3E"); }
.watch-discoverbox::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 0h7L3.5 4z' fill='%23404040'/%3E%3C/svg%3E"); }

/* =========================================================================
   Player: fills its host. Watch page 480 x 385 (480x360 screen + 25px control bar),
   channel page 425 x 344.
   Sprites are 2x captures of the real SWF, shown at 1x size.
   ========================================================================= */
#watch-player-div { width: 480px; height: 385px; }
.rtp { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden;
  -webkit-user-select: none; user-select: none; font-family: Arial, Helvetica, sans-serif; }
.rtp-screen { position: absolute; left: 0; top: 0; right: 0; bottom: 25px; overflow: hidden; background: #000; }

/* YouTube frame: laid out big (for quality) and scaled down; taller than the screen so its
   own title bar and controls fall outside. Size and scale are set by player.js. */
.rtp-ytwrap { position: absolute; left: 0; top: -200px; width: 100%; height: calc(100% + 400px); transform-origin: 0 0; visibility: hidden; }
.rtp.is-started .rtp-ytwrap { visibility: visible; }
.rtp-ytwrap iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
/* local file: letterboxed into the 4:3 screen like the Flash player did */
.rtp-video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
.rtp-shield { position: absolute; inset: 0; cursor: default; }

/* loading spinner (12 frames from the SWF) */
.rtp-spinner { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  background: url(../img/player/spinner_all.png) 0 0 / 480px 40px no-repeat; display: none; pointer-events: none;
  animation: rtp-spin 1s steps(12) infinite; }
.rtp.is-loading .rtp-spinner { display: block; }
@keyframes rtp-spin { from { background-position-x: 0; } to { background-position-x: -480px; } }

/* end screen: dimmed last frame + Share / Replay */
.rtp-end { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.698); display: none; }
.rtp.is-ended .rtp-end { display: block; }
/* centred in the screen (the SWF drew them near the top-left; centred on request), 156 px apart */
.rtp-end-btn { position: absolute; top: calc(50% - 37px); width: 49px; height: 74px; text-decoration: none; cursor: pointer; }
.rtp-end-btn:hover { text-decoration: none; }
.rtp-end-share { left: calc(50% - 103px); }
.rtp-end-replay { left: calc(50% + 53px); }
.rtp-end-icon { position: absolute; left: 0; top: 0; width: 49px; height: 48px; background: 0 0 / 49px 48px no-repeat; }
.rtp-end-share .rtp-end-icon { background-image: url(../img/player/end_share.png); }
.rtp-end-replay .rtp-end-icon { background-image: url(../img/player/end_replay.png); }
.rtp-end-label { position: absolute; left: -40px; right: -40px; top: 54px; text-align: center;
  color: #fff; font: 17px/20px Arial, Helvetica, sans-serif; white-space: nowrap; }

/* control bar: left cap, stretchable middle, right part */
.rtp-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 25px; }
.rtp-bar-l { position: absolute; left: 0; top: 0; width: 42px; height: 25px; background: image-set(url(../img/player/bar_l@1x.png) 1x, url(../img/player/bar_l.png) 2x) 0 0 / 42px 25px no-repeat; }
/* --rtp-extra: extra room for long times ("19:55 / 19:55"); the seek bar gets shorter by that much.
   Column 0 of bar_r is the groove's end; ::before draws it, followed by plain bar for the extra room. */
.rtp-bar-m { position: absolute; left: 42px; right: calc(139px + var(--rtp-extra, 0px)); top: 0; height: 25px; background: image-set(url(../img/player/bar_m@1x.png) 1x, url(../img/player/bar_m.png) 2x) 0 0 / 1px 25px repeat-x; }
.rtp-bar-r { position: absolute; right: 0; top: 0; width: 138px; height: 25px;
  background: image-set(url(../img/player/bar_r@1x.png) 1x, url(../img/player/bar_r.png) 2x) right 0 / 139px 25px no-repeat; }
.rtp-bar-r::before { content: ''; position: absolute; right: 100%; top: 0; width: calc(1px + var(--rtp-extra, 0px)); height: 25px;
  background: image-set(url(../img/player/bar_r@1x.png) 1x, url(../img/player/bar_r.png) 2x) left 0 / 139px 25px no-repeat; }

.rtp-pp { position: absolute; left: 1px; top: 0; width: 27px; height: 25px; cursor: pointer; }
.rtp-pp span { position: absolute; left: 1px; top: 2px; width: 25px; height: 21px; background: image-set(url(../img/player/pp_play@1x.png) 1x, url(../img/player/pp_play.png) 2x) 0 0 / 25px 21px no-repeat; }
.rtp-pp:hover span { background-image: image-set(url(../img/player/pp_play_h@1x.png) 1x, url(../img/player/pp_play_h.png) 2x); }
.rtp.is-playing .rtp-pp span, .rtp.is-loading .rtp-pp span { background-image: image-set(url(../img/player/pp_pause@1x.png) 1x, url(../img/player/pp_pause.png) 2x); }
.rtp.is-playing .rtp-pp:hover span, .rtp.is-loading .rtp-pp:hover span { background-image: image-set(url(../img/player/pp_pause_h@1x.png) 1x, url(../img/player/pp_pause_h.png) 2x); }

.rtp-seek { position: absolute; left: 33px; right: calc(131px + var(--rtp-extra, 0px)); top: 0; height: 25px; cursor: pointer; }
.rtp-track { position: absolute; left: 9px; right: 9px; top: 8px; height: 9px; }
.rtp-loaded, .rtp-played { position: absolute; left: 0; top: 0; height: 9px; width: 0; }
.rtp-loaded { background: image-set(url(../img/player/fill_loaded@1x.png) 1x, url(../img/player/fill_loaded.png) 2x) 0 0 / 1px 9px repeat-x; }
.rtp-played { background: image-set(url(../img/player/fill_played@1x.png) 1x, url(../img/player/fill_played.png) 2x) 0 0 / 1px 9px repeat-x; }
.rtp-knob { position: absolute; top: 3px; width: 18px; height: 18px; margin-left: 0; transform: translateX(0);
  background: image-set(url(../img/player/knob@1x.png) 1x, url(../img/player/knob.png) 2x) 0 0 / 18px 18px no-repeat; }
/* knob centre sits on the playhead: track starts 9px into .rtp-seek, knob is 18px wide */

.rtp-time { position: absolute; right: 69px; top: 1px; height: 25px; line-height: 25px; color: #000;
  font: 11px/25px Arial, Helvetica, sans-serif; white-space: nowrap; pointer-events: none; }

.rtp-vol { position: absolute; right: 35px; top: 1px; width: 28px; height: 23px; cursor: pointer;
  background: image-set(url(../img/player/vol_4@1x.png) 1x, url(../img/player/vol_4.png) 2x) 0 0 / 28px 23px no-repeat; }
.rtp-vol[data-icon="0"] { background-image: url(../img/player/vol_0.png); }
.rtp-vol[data-icon="1"] { background-image: url(../img/player/vol_1.png); }
.rtp-vol[data-icon="2"] { background-image: url(../img/player/vol_2.png); }
.rtp-vol[data-icon="3"] { background-image: url(../img/player/vol_3.png); }
.rtp-vol[data-icon="m"] { background-image: image-set(url(../img/player/vol_m@1x.png) 1x, url(../img/player/vol_m.png) 2x); }
.rtp-vol.hover[data-icon="0"] { background-image: url(../img/player/vol_0h.png); }
.rtp-vol.hover[data-icon="1"] { background-image: url(../img/player/vol_1h.png); }
.rtp-vol.hover[data-icon="2"] { background-image: url(../img/player/vol_2h.png); }
.rtp-vol.hover[data-icon="3"] { background-image: url(../img/player/vol_3h.png); }
.rtp-vol.hover[data-icon="4"] { background-image: url(../img/player/vol_4h.png); }
.rtp-vol.hover[data-icon="m"] { background-image: url(../img/player/vol_mh.png); }

.rtp-volpop { position: absolute; right: 34px; bottom: 25px; width: 29px; height: 62px; display: none; cursor: pointer;
  background: url(../img/player/vol_pop.png) 0 0 / 29px 62px no-repeat; }
.rtp.vol-open .rtp-volpop { display: block; }
.rtp-volthumb { position: absolute; left: 2px; top: 4px; width: 25px; height: 10px; background: url(../img/player/vol_thumb.png) 0 0 / 25px 10px no-repeat; }

.rtp-fs { position: absolute; right: 2px; top: 1px; width: 31px; height: 23px; cursor: pointer;
  background: image-set(url(../img/player/fs@1x.png) 1x, url(../img/player/fs.png) 2x) 0 0 / 31px 23px no-repeat; }
.rtp-fs.anim-in { background-image: url(../img/player/fs_in.png); background-size: 341px 23px; }
.rtp-fs.anim-out { background-image: url(../img/player/fs_out.png); background-size: 155px 23px; }

/* full screen: same parts, stretched */
.rtp.is-fs { width: 100vw; height: 100vh; }
