@charset "UTF-8";
/* CSS Document */
 
#playPauseBtn,
#videoProgress,
.closevideo {
  opacity: 1;
  transition: opacity 0.25s linear;
}

#videoProgress {
  pointer-events: auto;
}

/* optional: when opacity is 0, still allow taps anywhere else (UI won't block) 
#playPauseBtn[style*="opacity: 0"],
#videoProgress[style*="opacity: 0"],
.closevideo[style*="opacity: 0"] {
  pointer-events: none;
}*/

.closevideo {
    background-image: url("../img/closeX.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;  
    position: absolute;
    top: 0;
    margin-top: -70px;
    left: calc(100% - 80px);
    width: 56px;
    height: 56px;
    cursor: pointer;
    z-index: 36; /* make sure it's above everything */
}


.wrappervideo {
  position: fixed;
  left: 10px;
  right: 10px;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  padding-top: 10px;     /* ensures ≥10px top gutter */
  padding-bottom: 10px;  /* ensures ≥10px bottom gutter */
  z-index: 25;
  display: flex;
  align-items: center;    /* keep video centered vertically */
  justify-content: center;
  background: #e4ebe6;
 /* overflow: hidden;*/
	  overflow: visible;
}

.video-toggle {
  background-repeat: no-repeat;
  background-size: 100%;
  background-position: center;
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: 46px;
  height: 46px;
  cursor: pointer;
  z-index: 99;
    background-color: #5fcdb2;
}


/* Darken only the SVG on hover */
.video-toggle:hover {
  filter: brightness(0.7) grayscale(100%) contrast(200%); /* 0.7 = 70% brightness, slightly darker */
}

/* State icons */
.video-toggle.pause {
  background-image: url("../img/pause.svg");
}
.video-toggle.play {
  background-image: url("../img/play.svg");
}


/* iOS safe areas: keep at least 10px while respecting notches/home bar */
@supports (padding: max(0px)) {
.wrappervideo {
    left: 0;
    right: 0;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
.video-frame {
  position: relative;
  /* width: 100%;   <-- remove this */
  display: inline-block;
  max-height: calc(100vh - 20px);  /* keep your existing constraint */
  max-width: 100%;                  /* don't exceed the available space */
  inline-size: fit-content;         /* modern shrink-wrap */
}
/* Track */
.video-progress {
  position: absolute;
  left: 46px;
  right: 0px;    /* 100% of .video-frame, not the viewport */
  bottom: 0;
  height: 46px;
  background: rgba(0,0,0,0.12);
  border-radius: 0px;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
  z-index: 26;
  box-sizing: border-box;
}
     
/* Fill */
.video-progress__fill {
  width: 0%;
  height: 100%;
  background: rgba(0,0,0,0.2);
  transition: width 0.08s linear;
}

#demoreel {
  display: block;
  width: auto;          /* <-- was 100%; let it auto-size */
  max-width: 100%;      /* still prevent overflow on narrow viewports */
  height: auto;
  max-height: inherit;  /* keeps your height rule */
  object-fit: contain;
  background: transparent;
}
#demoreel {
    /* subtract the actual (safe-area-aware) paddings from viewport height */
    max-height: calc(
      100vh
      - max(10px, env(safe-area-inset-top))
      - max(10px, env(safe-area-inset-bottom))
    );
  }
}





/* ---- Sizing variables you can tweak ---- */
:root{
  --gutter: 20px;
  --radius: 8px;
  --ratio-w: 1440; /* video intrinsic ratio width */
  --ratio-h: 958; /* video intrinsic ratio height */
}


/*
@media screen and (orientation: portrait) and (max-width: 579px) {

}*/

@media screen and (orientation: portrait) and (max-width: 736px) {
.closevideo {
    position: absolute;
    top: 0;
    margin-top: -68px;
    left: calc(100% - 80px);
	transform: translateY(10px);
    width: 56px;
    height: 56px;
    cursor: pointer;
    z-index: 36; /* make sure it's above everything */
}

	
  /* 10px gutters on the sides (body visible) */
  .wrappervideo {
	  
	      left: 10px !important;
    right: 10px !important;
	  
    padding-left: 0px;
    padding-right: 0px;
  box-sizing: border-box;
    /* 20px gutters top & bottom */
    padding-top: 55px;
    padding-bottom: 15px;
	    overflow: visible;
  }

  /* The clipping window */
  .video-frame {
	position: relative;
	width: 100%;
    height: 100%;  
	  
    display: flex;
    align-items: center;
    justify-content: center;


    max-height: calc(
      100vh
      - max(50px, env(safe-area-inset-top))
      - max(50px, env(safe-area-inset-bottom))
    );

  /*  overflow: hidden;  /* keeps side crop */
	     overflow: visible;  /* keeps side crop */
  }

  /* The video itself: full height, side crop */
  #demoreel {
   /* width: auto;
    height: 100%;
    max-width: none;
    max-height: 100%;

    object-fit: cover;
    object-position: center;
	*/
	width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    display: block;
	  
  }
}







@media screen and (min-width: 580px) {	
.wrappervideo {
    position: fixed;
    top: 0px;
    bottom: 0px;
    /* drop the left/right anchors */
 
	left: 20px !important;
    right: 45px !important;
    max-width: 650px;
    margin: 0 auto; /* centers horizontally */
    box-sizing: border-box;
      padding-top: 0px;     /* ensures ≥10px top gutter */
  padding-bottom: 0px;  /* ensures ≥10px bottom gutter */
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e4ebe6;
    overflow: visible;
  }
.closevideo {
    position: absolute;
  margin-top: -10px;
    transform: translateY(15px);
    left: calc(100% + 5px);
    width: 46px;
    height: 46px;
    }

} /*min-width: 540*/








@media screen and (min-width: 736px) {

.closevideo {
    position: absolute;
    margin-top: 0;
    transform: translateY(20px);
    left: calc(100% + 8px);
    width: 46px;
    height: 46px;
    }
}



@media screen and (min-width: 736px) and (min-height: 600px) {

.wrappervideo {
    position: fixed;
    left: 20px;
    right: 20px;
    top: 20px;         
    bottom: -10px;      
    max-width: 780px;
    box-sizing: border-box;
    padding-top: 20px;
    padding-bottom: 0px;
    padding-left: 20px;
    padding-right: 20px;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e4ebe6;
    overflow: hidden;
  }
.closevideo {
    position: absolute;
    background-size: 100%;
    margin-top: -52px;
    transform: translateY(0px);
    left: calc(100% - 70px);
    width: 46px;
    height: 46px;
}
  /* iOS safe areas: keep ≥20px while respecting notches/home bar */
  @supports (padding: max(0px)) {
    .wrappervideo {
      /* Keep the 20px offset from screen edges (do NOT zero out left/right/top/bottom) */
      padding-left:  max(20px, env(safe-area-inset-left));
      padding-right: max(20px, env(safe-area-inset-right));
      padding-top:   max(20px, env(safe-area-inset-top));
      padding-bottom:max(20px, env(safe-area-inset-bottom));
    }

  .video-frame {
      position: relative;
      display: inline-block;
      max-width: 100%;
      inline-size: fit-content;
      /* viewport height minus the outer 20+20 frame offsets */
      max-height: calc(100vh - 40px);
    }   
   #demoreel {
      /* subtract the actual (safe-area-aware) paddings */
      max-height: calc(
        100vh
        - max(20px, env(safe-area-inset-top))
        - max(20px, env(safe-area-inset-bottom))
      );
    }
  } 
}


    
 
@media screen and (min-width: 960px) and (min-height: 600px) {
 .wrappervideo {
    position: fixed;
    top: 20px;
    bottom: 0px;
    /* drop the left/right anchors */
    left: 0;
    right: 0;
    max-width: 860px;
    margin: 0 auto; /* centers horizontally */
    box-sizing: border-box;
    padding-top: 20px;
    padding-bottom: 0px;
    padding-left: 50px;
    padding-right: 50px;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e4ebe6;
    overflow: hidden;
  }
	.closevideo {
    position: absolute;
    margin-top: 0;
    transform: translateY(20px);
    left: calc(100% + 8px);
    width: 46px;
    height: 46px;
    }
}
    

    
 
@media screen and (min-width: 1024px) and (min-height: 600px) {
 .wrappervideo {
    position: fixed;
    top: 0px;
    bottom: 0px;
    /* drop the left/right anchors */
    left: 0;
    right: 0;
    max-width: 920px;
    margin: 0 auto; /* centers horizontally */
    box-sizing: border-box;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 50px;
    padding-right: 50px;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e4ebe6;
    overflow: hidden;
  }
	.closevideo {
    position: absolute;
    margin-top: 0;
    transform: translateY(20px);
    left: calc(100% + 8px);
    width: 46px;
    height: 46px;
    }
}
    

@media screen and (min-width: 1300px) and (min-height: 600px) {
 .wrappervideo {
    position: fixed;
    top: 0px;
    bottom: 0px;
    /* drop the left/right anchors */
    left: 0;
    right: 0;
    max-width: 1200px;
    margin: 0 auto; /* centers horizontally */
    box-sizing: border-box;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 50px;
    padding-right: 50px;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e4ebe6;
    overflow: hidden;
  }
	.closevideo {
    position: absolute;
    margin-top: 0;
    transform: translateY(20px);
    left: calc(100% + 8px);
    width: 46px;
    height: 46px;
    }
}
    
