/*.centered{
    min-height:1200px;
}*/
#wrapper{
    padding-top:40px;
    min-height:95vh;
}

.video-container{
    position: relative;
    height: fit-content;
    /*width: fit-content;*/
    padding:0.7vmax;
    padding-bottom:0.7vmax;
    font-family: "Futura Round Demi", Arial, Calibri;
}

/* Ensure video container fills screen in fullscreen */
.video-container:fullscreen {
  width: 100%;
  height: 100%;
  padding:0;
  display: flex;
  justify-content: flex-end; /* push controls to bottom */
  background: black;
}

/* Video fills available space */
.video-container:fullscreen video {
  flex: 1; /* video takes remaining space */
  width: 100%;
  height: auto;
  object-fit: contain;
}

.video-controls {
  display: flex;
  align-items: center;
  gap: 1rem; 
  padding: 0.25rem; 
  background: rgba(0, 0, 0, 0.9);
}

.video-controls button {
  border: none;
  cursor: pointer;
  display: flex;               
  align-items: center;
  justify-content: center;
  width: 1.5rem;                 
  height: 1.5rem;
  padding: 0;              
  border-radius:0.2rem;
  background-color: #00a0bd;
  background-repeat: no-repeat;
  background-position: center;
}
.video-controls button:hover,
.video-controls button:focus {
  color: black; 
}

.video-controls button img {
    
  width: 80%;  
  height: 80%;
}

.video-controls input[type="range"] {
  height: 0.25rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: #ccc;
  border-radius: 0.5rem; 
}

/* Thumb styling */
.video-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.7vmax;   
  height: 0.7vmax;  
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.video-controls input[type="range"]::-moz-range-thumb {
  width: 0.7vmax;  
  height: 0.7vmax;  
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.progress-bar {
  flex: 1;              /*  takes all remaining space */
  height: 0.75rem;
  -webkit-appearance: none;
  appearance: none;
  background: #ccc;
  border-radius: 0.5rem;
}

/* Volume bar: short */
.volume-bar {
  width: 6rem;          /*  fixed width */
  height: 0.75rem;
  -webkit-appearance: none;
  appearance: none;
  background: #ccc;
  border-radius: 0.5rem;
}

.video-controls .fullscreen {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: black;
}

/* Controls overlay at bottom in fullscreen */
.video-container:fullscreen .video-controls {
  position: absolute;       /* 🔵 overlay controls */
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  padding: 0.75rem;
}

.video-title{
    position:relative;
    color: #09132e;
}
.video-container:fullscreen .video-title{
    display:none;
    position:absolute;
    top:0.5vmax;
    left:1vmax;
    font-size:2rem;
    color:rgba(200,200,200,1);
}
.video-container:fullscreen .video-title h2{
    font-size:2rem;
    margin:0;
}

.play-big{
    position:absolute;
    top: 50%;
    left: 50%;
	transform: translate(-50%, -50%);
	height: 4vmax;
	width:4vmax;
    background-color: #00a0bd;
    cursor: pointer;
    border-radius:2vmax;
}
.play-big img{
    position:absolute;
    top: 50%;
    left: 55%;
	transform: translate(-50%, -50%);
	height: 80%;
	width:80%;
}

.pause-screen{
    position:absolute;
    top: 1.7%;
    bottom: 10%;
    left:1%;
    right:1%;
    background:none;
    /*background:rgba(0,100,0,0.5);*/
}

/* Desktop + phones landscape */
@media screen and (min-aspect-ratio: 9/16){ /* 9/16 refers to the inner window ratio which is different from the total ratio */

    .video-container{
        border: 1px solid grey;
        background: linear-gradient(0deg, #e6f9ff 25%, #e9f7f9 100%);
        color: #09132e;
        box-shadow: 2px 3px 15px -4px rgba(0,0,0,0.7);
    }
    @media screen and (min-aspect-ratio: 16/9){ /* phones landscape */
        #debug{
            display:none;
            position:absolute;
            width:40px;
            height:40px;
            background:red;
        }
            
        .video-container{
            height: fit-content;
        
        }
        video{
            width: 100%;
            height: auto;
        }
    }
    @media screen and (max-aspect-ratio: 16/9){ /* other devices */
        video{
            width: 100%;
            height: auto;
        }
    }
}

/*phones & tablets portrait*/
@media screen and (max-aspect-ratio: 9/16){
    #wrapper{
        width: 100%;
    }
    video {
      width: 100%;     
      height: auto;   
      display:block;
    }
    .video-container{
        margin-left:2vw;
        margin-right:2vw;
        margin-bottom: 2vw;
        border-radius: 1vmax;
        padding:1vmax;
        height: fit-content;
        border: 1px solid grey;
        background: linear-gradient(0deg, #e6f9ff 25%, #e9f7f9 100%);
        color: #09132e;
        box-shadow: 2px 3px 15px -4px rgba(0,0,0,0.7);
    }
    
    .video-container:fullscreen{
        display:flex;
        flex-direction: column;
        justify-content: center;       /* center horizontally */
        align-items: center;
    }
    
    .video-container:fullscreen video {
        flex:0;
        width:100%;
        height: auto;
        object-fit: contain;    /* maintain aspect ratio */
        display: block;     
    }
    
    .video-container:fullscreen .video-controls {
        display: flex;
        align-items: center;
        width: 95%;
        position:static;
    }
    .video-container .video-title h2{
        font-size:1.5rem;
    }
}