
html{
  scrollbar-width: thin;
  scroll-behavior: auto;
}

body{
  scroll-behavior: auto;
  margin:0;
  overflow: hidden;
  flex: 1;
}

body{
  overflow:auto; /* for native hiding of addressbar on mobile */
  /*overflow-x: hidden; 
  overflow-y: scroll;*/
  
}

img, video{
  position: relative;
}



flow-root {
  position: relative;
  height: 100dvh; /* Ensure the body takes the full viewport height */
  display: flex;
  flex-direction: column;
}

#_fullscreen{
  position: fixed;
  flex: 1;
  overflow: hidden; /* Enable scrolling in the main content area */
  pointer-events: none;
  z-index:1050;
  /*z-index:2;*/
}

.flow-layouts{
  position: relative;
  width: 100%;
}

flow-template{
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.flow-layout{

  transform: unset;
}


flow-layout{
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: unset;
}

/*pointer-events on .current determine what flow-layer can be interacted with*/
flow-stack{
  /* custom elements default to display:inline, which ignores width/height -
     the stack collapsed to 0px unless its parent happened to be a flex
     container (flex items are blockified). */
  display: block;
  position: relative;
  /* overflow: hidden; /* Enable scrolling in the main content area */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;

}


flow-layer{
  
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  width: -webkit-fill-available;
  height: 100%;
  display: flex;
  flex-direction: column;
  will-change: position, top;
  transform: translateY(0);
  -webkit-transform: translateY(0); 
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden; /* iOS Safari-specific */
  overflow: hidden;
  overscroll-behavior: none;
}


flow-layer{
  pointer-events: none;
}

flow-layer.current{
  pointer-events: auto;
  /*overflow: unset;*/
}

/*this is temporary, should use .current*/
.flow-fullscreen{
  pointer-events: auto
}


header[data-flow="header"]{
  position: relative;  
  overflow: hidden;
}


footer[data-flow="footer"]{
  position: relative;  
  overflow: hidden;
}


div[data-flow="hidden"]{
  visibility: hidden;
  opacity: 0;
}

div[data-flow="reference"] {
  position: absolute;
  top:0;
  left:0;
  visibility: hidden;
  opacity: 0;
  height: 100cqh;
  width: 100cqw;
}

div[data-flow="content"]{
  height:100%;
}

/*PROXY LEVEL*/
.flow-proxy{
  /*overflow: clip;*/
  position: absolute;
  top:0;
  left:0;
  z-index:1000;
  width: inherit;
  height: inherit;
  
}

.flow-placeholder{
  position: relative;
  top:0;
  left:0;
  visibility: hidden;
  /*opacity: 0;*/
  z-index:0;
}


/*PAGE LEVEL*/

.flow-overlay-auto {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
}

.flow-overlay {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /*min-height: 100%;*/
  /*display: grid;*/
  /*grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));*/
  /*display: flex;/*
  /*flex-direction: column;*/
  opacity:1;
  /*transition: none;*/
  
}


.flow-absolute{
  
}


.opacity-fade {
  transition:opacity .3s ease-in-out;
}



/*
 * PAGE LEVEL
 *
 * IMPORTANT — overflow-y: auto below is NOT redundant with flow-template's
 * own overflow-y:auto, and must not be removed.
 *
 * .flow-fill is the child that page authors put their real scrollable
 * content into, directly inside a <flow-template>. Without its OWN
 * overflow-y:auto, .flow-fill is just a plain flex child that inherits its
 * box size straight from <flow-template> — and <flow-template> is exactly
 * the element flow-transitions.js reparents into a proxy and animates
 
 * Giving .flow-fill its own overflow-y:auto makes IT the real scrolling
 * box instead of flow-template. flow-template's own overflow-y:auto is left in
 * place for pages that don't use .flow-fill, and as a fallback.
 *
 * Do not "simplify" this away — see flow-transitions.js's own comments on
 * getScrollContainer()/the SCROLL RESTORE bridge for the full incident
 * history, and confirm any refactor against a manual back-navigation test
 * on a long, scrolled, non-trivial page.
 */


/*PAGE LEVEL*/
.flow-fill {
  position: relative;  
  top: 0;
  left: 0;
  flex: auto;

  overflow-y: auto;
  scrollbar-width: thin;
  
}

/*PAGE LEVEL*/
.flow-flex {
  position: relative;  
  top: 0;
  left: 0;
  /*overflow-y: auto;  this maybe should be enable just like flow-fill*/ 
  /*width: 100%;*/
  height: 100%; /*comment out when flow-overlay is being used*/
  /*display: grid;*/
  /*grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));*/ 
  display: flex;
  flex-direction: column;
  /*overflow-y: auto;*/
}


.flow-not-scrollable{
/* not sure what this should be, or if important to make not scrollable */
}

.flow-scroll-y {
  overflow-y: auto; /* Allow to be scrollable */
}

.flow-scroll-x {
  overflow-x: auto; /* Allow to be scrollable */
}

.flow-hidden{
  visibility: hidden;
  opacity: 0;
}


.wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.video-container {
  display: flex;
}

.video{
  max-height: 40vh;
}

.content-container {
  flex: 1;
  box-sizing: border-box;
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.os-menu {   
  position: absolute;
  width: 100% ;
  height:100%;
  overflow: hidden;
  top: 0;
  left: 0;
  margin: 0;
  padding:0;          
  z-index: 2;
  touch-action: manipulation;
}



/* Scroll bar styling */
.scrollbar-thin {
  /*background-color: rgba(37, 81, 95, 0.116);*/ /*this is background color of the scrollbox */
  /*overflow: auto; /* Use overflow: auto; instead of -webkit-overflow-scrolling */
}

/*hack for firefox */
@supports (-moz-appearance: none) {
  /* Define scrollbar styles for Firefox */
  .scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: #454545 #00000010;
  }
}

/* Set the width of the scrollbar */
.scrollbar-thin::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}



/* Make the track (the area behind the scrollbar) transparent */
.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

/* Set the color of the scrollbar thumb */
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 10px; /* Add rounded corners to the scrollbar */
  transition: opacity 0.5s ease; /* Apply transition for fade-out effect */
}

/* Adjust the color on hover to give a slight fade-in effect */
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: #777;
}


/* Scroll bar styling for Firefox */
.scrollbar-none {
  scrollbar-width: none;
}

/* Scroll bar styling */
.scrollbar-none::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  display: none;
}



/*transition freeze */

.freeze-scroll {
  position: fixed;
  top: 0;
  width: 100%;
  left: 0;
}

/*
 * A FITTED STACK cross-fades its layers.
 *
 * `.current` is the model's own flag (flow-effector.js's applyCurrentFlag):
 * it moves to the incoming layer at commit, and off the outgoing one in the
 * same pass - so a rule keyed on it fades one out exactly as the other
 * arrives, in both directions, with no JS.
 *
 * This is flow-router-loader.js's load() behavior, which added `.opacity-0`
 * to the previous layer on the way forward and swapped it for `.opacity-fade`
 * on the way back. Needed because a forward navigation only ever animates
 * the INCOMING node (flow-commit-pipeline.js's startTransitions): the layer
 * underneath is left fully opaque until it is disposed, which for a stack of
 * absolutely-positioned layers means both are painted on top of each other
 * for the length of the transition.
 *
 * Scoped to `[data-fit]` so ordinary mounts - where the outgoing page SHOULD
 * stay put under a sliding incoming one - are untouched.
 */
flow-stack[data-fit] flow-layer{
  opacity: 0;
  transition: opacity .3s ease-in-out;
}

flow-stack[data-fit] flow-layer.current{
  opacity: 1;
}


/* A page's scroller that took focus for keyboard scrolling (src/flow-keyboard-scroll.js):
   focus there is for the arrow keys, not something to point at. */
[data-flow-keyscroll]:focus {
  outline: none;
}
