/* Custom CSS for styling */
html, body {
   margin: 0;
   padding: 0;
   width: 100vw;
   height: 100vh;
   overflow: hidden;
   background-color: black;
   font-family: "Montserrat", serif;
}

* {
 margin: 0;
 padding: 0;
 box-sizing: border-box;
}

/* --- Video Player Sizing - Container --- */
#videoScreen {
 position: fixed;
 top: 0;
 left: 0;
 width: 100vw;
 height: 100vh;
 /* CRUCIAL FIX for mobile 100vh bug: ensures it fills the available viewport */
 height: -webkit-fill-available; 
 background-color: black !important;
 z-index: 3; /* Video is layer 3 */
 object-fit: contain; /* Ensures video fits cleanly */
}

/* --- NEW: Hide ALL Standard Video.js UI elements & Subtitles --- */
/* (Insert this block if you are using Video.js in your Australian app) */
#videoScreen .vjs-control-bar, 
#videoScreen .vjs-big-play-button,
#videoScreen .vjs-loading-spinner,
#videoScreen .vjs-poster,
#videoScreen .vjs-modal-dialog,
#videoScreen .vjs-error-display,
/* --- Text Track/Subtitle Hiding --- */
#videoScreen .vjs-text-track-display, 
#videoScreen .vjs-caption-settings,
#videoScreen .vjs-subtitles-button,
#videoScreen .vjs-chapters-button,
#videoScreen .vjs-menu-button, /* Catches generic menu buttons */
#videoScreen .vjs-subs-caps-button 
{
   display: none !important;
   visibility: hidden !important;
   opacity: 0 !important;
   z-index: -1 !important;
}


/* --- Overlay Styling (Uses transform for sliding) --- */
 #overlay {
   position: fixed;
   width: 100vw;
   height: 100vh;
   top: 0;
   left: 0;
   color: white; 
   z-index: 10; /* Overlay is layer 10 */
   background-color: 	#005929; /* AU Red Color */
   overflow-x: hidden;
   overflow-y: auto;
   display: block; 
   
   /* --- NEW: Transition and Default Visible State --- */
   transition: transform 0.3s ease-in-out; 
   transform: translateX(0); 
 }

 /* --- NEW: Class to slide the overlay off-screen (to the left) --- */
 #overlay.hidden {
   transform: translateX(-100vw);
 }

 .top-bar {
   position: sticky;
   top: 0;
   left: 0;
   width: 100%;
   height: 100px;
   background-color: 	#005929; /* AU Red */
   color: #fff;
   padding: 5px 10px;
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 11; /* Top bar is layer 11 (always on top) */
 }

 /* --- Top Bar Buttons --- */
 #menuButton {
    color: white;
    font-size: 2em;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 1000;
    padding: 5px;
}

#mapButton { /* Map Icon for City Modal */
    color: white;
    font-size: 2em;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 1000;
    padding: 5px;
}

 /* --- STOP BUTTON POSITION (Desktop - Inside top-bar) --- */
 .top-bar #stopButton {
    position: absolute;
    right: 55px; /* Position next to the map button */
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em; /* Smaller, better fit for the top bar */
    color: white;
    cursor: pointer;
    z-index: 1001; 
    padding: 5px;
    display: none; 
    text-shadow: none;
 }

 #topBarHeading {
   height: 90%;
   max-height:100px;
   width: auto;
 }


 /* --- Channel List Container --- */
 #channelInfo {
   width: 90%;
   max-width: 1200px;
   margin: 0 auto;
   padding: 10px;
   -ms-overflow-style: none;
   scrollbar-width: none;
   padding-top: 50px; /* Added Top Padding for the sticky top-bar */
 }
 #channelInfo::-webkit-scrollbar { display: none; }


 .channelDiv {
   min-height: 250px;
   display: flex;
   align-items: center;
   padding: 10px;
   background-color: #F1F1F1;
   margin-bottom: 15px;
   border-radius: 20px;
   color: #333333;
   position: relative;
   cursor: pointer;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
 }

 /* --- Channel Number Container (Left side) --- */
 .channel-number-container {
   display: flex;
   flex-direction: column;
   justify-content: space-around;
   align-items: center;
   flex: 0 0 80px;
   text-align: center;
   min-height: 100% !important;
   align-self: stretch;
 }

.start-time { 
  font-size: 0.8em; 
  opacity: 0.9; 
  font-weight: bold;
  /* --- The Fix --- */
  white-space: normal; /* Allows wrapping */
  word-break: normal;  /* Ensures breaking only happens at spaces */
  max-width: 35px;     /* Forces the break at the space after 10:30 */
  line-height: 1.1;    /* Keeps the two lines close together */
  text-align: center;  /* Makes it look neat */
}
 .channel-number { font-size: 1.2em; font-weight: bold; }

 /* --- Program Content Structure (Middle - 70/30 Split) --- */
 .program-content {
   padding-left: 15px;
   flex: 1 1 auto;
   display: flex;
   flex-direction: column; 
   overflow: hidden;
   align-self: stretch; 
 }

 .program-title {
  height: 70%; 
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centers vertically */
  align-items: center; 
  
   font-size: 1.3em;
   font-weight: bold;
   margin-bottom: 0;
   line-height: 1.2;
   white-space: normal;
   overflow-wrap: break-word;
   word-wrap: break-word;
   hyphens: auto;
   padding: 5px 0;
   text-align: center; 
 }

/* Wrapper for Upcoming Programs (Bottom 30%) */
.upcoming-programs-wrapper {
  height: 30%; 
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  font-weight: bold;
}

.program-title-text {
    /* Essential for flex item ellipsis: */
    min-width: 0;
    flex-grow: 1; /* Make it take up the rest of the available space */
    
    /* The actual ellipsis properties (copied from .next-program) */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Next/Later Programs - Use flex-grow to share 30% */
 .next-program {
   margin-top: 0; 
   /* Change: Use flex shorthand (grow, shrink, basis) to ensure min-width of 0 */
   flex: 1 1 0; 
   flex-shrink: 0; /* Keeping explicit shrink for safety */
   
   display: flex; /* Keep this if you have items inside to align */
   justify-content: flex-start;
   font-size: 0.95em;
   width: 100%;
   line-height: 1.3;
   opacity: 0.9;
   padding: 0 5px;
   align-items: flex-end;
   /* min-width: 0 is no longer explicitly needed with flex: 1 1 0; but you can keep it if you prefer */
   /* min-width: 0; */ 
 }
 
 /* Next Program 2 */
 .next-program2 {
   /* Change: Use flex shorthand (grow, shrink, basis) to ensure min-width of 0 */
   flex: 1 1 0;
   
   font-size: 0.9em;
   font-weight: bold;
   margin-top: 1px;
   padding: 0;
   width: 100%;
   line-height: 1.2; 
   opacity: 0.9;
   display:flex;
   align-items: flex-start; /* Changed from flex-end to flex-start for next-program2 */
   /* min-width: 0 is no longer explicitly needed with flex: 1 1 0; but you can keep it if you prefer */
   /* min-width: 0; */
 }

 .end-time { margin-right: 5px; opacity: 0.8; } 
 .program-desc, .episode { display: none; }

 /* --- Program Image Container (Right side) --- */
 .program-image {
   flex: 0 0 20%;
   display: flex;
   justify-content: center;
   align-items: center;
   padding-left: 15px;
 }

 .program-image > img {
   max-height: 80%;
   max-width: 100%;
   object-fit: contain;
 }

 /* --- Floating Buttons (BMH) --- */
 .bmhButton {
   position: fixed;
   bottom: 15px;
   left: 15px;
   max-height: 45px;
   width: auto;
   z-index: 5;
   opacity: 0.8;
 }

/* --- About/Menu Panel (Portfolio/Disclaimer) --- */
#aboutPanel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    overflow-y: auto;
    color: #f1f1f1;
    padding: 20px;
    text-align: left;
}
.close-about {
  /* Set the background color to blue */
  background-color: #005929;
  width: 70%;
  color: white; 
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 15%;
}



/* --- City Modal (Region Selector) --- */
.modal {
  display: none; 
  position: fixed; 
  z-index: 9000; 
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: 	#005929; 
  align-items: center; 
  justify-content: center; 
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: 	#005929;
    color: white;
    padding: 40px 20px 20px 20px;
    border-radius: 8px;
    width: 30%; 
    max-width: 400px;
    height: auto;
    max-height: 90%;
    position: relative;
    overflow-y: auto;
    border: 2px solid white;
}

.modal-content > h2 {
    text-align: center;
    background-color: white;
    color: 	#005929;
    font-weight: 900;
    border-radius: 5px;
    width: 100%;
    padding: 5px 10px;
    margin-bottom: 10px;
}

.cityButton {
  padding: 2px 20px;
  margin: 8px 0;
  height: auto;
  width: 60%;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  background-color: rgba(255,255,255,1);
}

.modal .close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.2em;
    color: white;
    cursor: pointer;
}

.myHeading {
    text-align: left;
    font-weight: 700;
    font-size: 1.6em;
    color: #0D6EFD;
   margin: 30px;
}

#aboutPanel{
  width: 50%;
  max-width: 600px;
}

.about-content img {

display: block;
margin-left: auto;
margin-right: auto;
}

.about-content p {
    text-align: left;
    font-weight: 400;
    font-size: 0.9em;
    color: white;
    margin-left: 30px;
    margin-right: 30px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.about-content h4 {
  color: #0D6EFD;
}

.about-content li {
  margin-left: 40px;
  margin-right: 40px;
}

    #aboutPanel .close-about {
        top: 10px;
        right: 10px;
        font-size: 1.2em;
    }

       #aboutPanelLogo {
        height: 60px; /* Reduce logo size */
        display: flex;
        width: auto;
        margin: 0 auto;
    }

 /* --- Media Query Adjustments (Mobile - max-width: 768px) --- */
 @media screen and (max-width: 768px){
   
   /* Overlay/Header adjustments */
   .top-bar { height: 60px; }
   #topBarHeading { max-height: 50px; }
   #menuButton { font-size: 1.5em; left: 8px;}
   #mapButton { font-size: 1.5em; right: 8px; } 

   #channelInfo {
    max-width: 90%;
    padding: 10px 8px 30px 8px;
    padding-top: 30px; /* Added Top Padding for the sticky top-bar on mobile */
  }

  /* --- MOBILE: Top Bar Stop Button Position --- */
  .top-bar #stopButton {
      right: 45px;
      font-size: 1.5em;
  }
  
  /* Channel Item adjustments */
  .channelDiv {
    min-height: 125px;
    margin-bottom: 8px;
    padding: 6px;
    background-color: #F1F1F1;
    color: #333333;
  }

.channel-number-container { 
  flex-basis: 45px; 
  justify-content: space-evenly; 
}

.start-time { 
  font-size: 0.65em; 
  opacity: 0.7; 
  /* --- The Fix --- */
  white-space: normal; /* Allows wrapping */
  word-break: normal;  /* Ensures breaking only happens at spaces */
  max-width: 35px;     /* Forces the break at the space after 10:30 */
  line-height: 1.1;    /* Keeps the two lines close together */
  text-align: center;  /* Makes it look neat */
}

.channel-number { 
  font-size: 0.85em; 
  font-weight: normal;
}
 
  /* --- KEY ALIGNMENT FIX: Program Content Structure (70/30 Split) --- */
  .program-content {
    padding-left: 8px;
    justify-content: flex-start; 
    align-self: stretch;
    overflow: hidden;
  }

  /* Program Title - 70% Height */
  .program-title {
    padding-top: 5px; 
    margin-bottom: 0;
    width: 100%;
    font-size: 0.95em; 
    font-weight: bolder; 
    
    justify-content: center; 
    align-items: center; 
    text-align: center;
    
    height: 70%; 
    max-height: none; 
    overflow: hidden;
    white-space: normal;
  }
 
  /* Upcoming Wrapper - 30% Height */
  .upcoming-programs-wrapper {
    height: 30%; 
    padding: 0;
  }
 
  /* Next/Later Programs - Use flex-grow to share 30% */
  .next-program {
    margin-top: 0; 
    flex-grow: 1; 
    font-size: 0.8em; 
    font-weight: bold;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.2; 
    opacity: 0.9;
    display:flex;
    align-items: flex-end;
    min-width: 0;
  }
 
  /* Next Program 2 */
  .next-program2 {
    flex-grow: 1; 
    font-size: 0.7em;
    font-weight: bold;
    margin-top: 1px;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.2; 
    opacity: 0.9;
    display:flex;
    align-items: flex-end;
    min-width: 0;
  }

  /* Logo */
  .program-image { flex-basis: 60px; padding-left: 5px; }
  .program-image > img { max-height: 40px; }

  /* Floating Buttons */
  .bmhButton { 
      bottom: 8px; 
      left: 8px;
      max-height: 35px;
      display: block; 
  }

   /* Modal Styling for Mobile */
  .modal-content {
    width: 80%; 
    height: auto;
    margin: 10% auto;
    padding: 40px 20px 20px 20px;
  }

  .cityButton {
    margin: 6px 0;
    width: 80%;
  }


     #aboutPanel {
        padding: 10px; /* Reduce overall padding */
  width: 100%;

    }

    #aboutPanel h3 {
        font-size: 1.2em; /* Reduce main heading size */
        margin-top: 10px;
    }

    #aboutPanel h4 {
        font-size: 1em; /* Reduce sub-heading size */
        margin-top: 15px;
    }

    #aboutPanel p, #aboutPanel li {
        font-size: 0.8em; /* Reduce paragraph/list item size */
    }

    #aboutPanel .close-about {
        top: 10px;
        right: 10px;
        font-size: 1.2em;
    }

    #aboutPanelLogo {
        height: 40px; /* Reduce logo size */
        display: flex;
        width: auto;
        margin: 0 auto;
    }

    .myHeading {
    text-align: center;
    font-weight: 700;
    font-size: 1.0em;
    color: #0D6EFD;
   margin: 30px;
}

 }