/*!
 * antonios-scrollbar.css  —  v2.0  (2026-11-20)
 * Hides the browser's scrollbars and styles the thin custom bar drawn by
 * antonios-scrollbar.js (load both). Same look as xevouloman.com.cy.
 *
 * v2.0: the bar is now moved by the browser itself (CSS scroll-driven animation),
 * in step with the page — no script work while scrolling, so no judder on
 * iPhone/Android, and no jumps when the address bar shows/hides.
 * Older phones that can't do that keep their own native scrollbar instead.
 *
 * INSTALL: in <head>, after the other CSS:
 *     <link rel="stylesheet" href="css/antonios-scrollbar.css">
 *
 * Change the look here: colour, thickness, length, roundness, distance from the edge.
 */
:root {
  --ag-bar-color: rgb(119, 119, 119);   /* #777 */
  --ag-bar-width: 4px;
  --ag-bar-length: 96px;
  --ag-bar-radius: 8px;
  --ag-bar-inset: 2px;                  /* gap between the bar and the screen edge */
}

/* ---------- 1. browser scrollbars: gone ------------------------------------- */
html:not(.ag-native-scrollbar) { scrollbar-width: none; -ms-overflow-style: none; }
html:not(.ag-native-scrollbar)::-webkit-scrollbar,
html:not(.ag-native-scrollbar) body::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ---------- 2. the custom bar ---------------------------------------------- */
.ag-scrollbar {
  position: fixed;
  top: 0;
  bottom: 0;                            /* always exactly the visible screen height */
  right: 0;
  width: calc(var(--ag-bar-width) + var(--ag-bar-inset) * 2);
  z-index: 100000;
  pointer-events: none;                 /* never blocks clicks underneath */
  contain: strict;
}
/* the track is as tall as the distance the bar can travel; it slides 0 → 100% of
   its own height, carrying the bar from the top to the bottom of the screen */
.ag-scrollbar > i {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100% - var(--ag-bar-length));
  will-change: transform;
}
.ag-scrollbar > i > span {
  position: absolute;
  top: 0;
  right: var(--ag-bar-inset);
  width: var(--ag-bar-width);
  height: var(--ag-bar-length);
  border-radius: var(--ag-bar-radius);
  background: var(--ag-bar-color);
  opacity: 0;
  transition: opacity 0.4s;
}
.ag-scrollbar.is-on > i > span { opacity: 1; }

@supports (animation-timeline: scroll()) {
  .ag-scrollbar > i {
    animation: ag-bar-travel linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes ag-bar-travel {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, 100%, 0); }
}

/* phones/tablets that can't do the above → native scrollbar, no custom bar */
html.ag-native-scrollbar .ag-scrollbar { display: none; }

/* hide the bar while a pop-up / modal has locked the page */
body.modal-open .ag-scrollbar > i > span,
html.ag-scroll-lock .ag-scrollbar > i > span { opacity: 0 !important; }