/* Base Styles for Overlays and Popups */
.popup-overlay, .scrolling-announcement {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100; /* Adjusted for base overlay */
  transition: all 0.3s ease-in-out;
}
.popup-overlay {
  top: 0; /* Extends full screen for overlay */
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
  display: flex;
  justify-content: center;
  align-items: center;
}
.popup-announcement {
  background-color: white;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 5px;
  z-index: 101; /* Ensured above the overlay */
}
.popup-content { margin-bottom: 20px; }
.popup-actions { text-align: right; }
/* Scrolling Announcement Styles */
.scrolling-announcement {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  text-align: center;
  padding: 5px 0;
  height: 45px;
  display: flex;
  flex-direction: row;
}
.scrolling-announcement .content-area, .dismiss-bar {
  display: flex;
  justify-content: center;
  align-items: center;
}
.scrolling-announcement .content-area {
  white-space: nowrap;
  overflow: hidden;
  margin: 0px 5px;
  width: 90%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.dismiss-bar {
  width: calc(10% - 10px);
}
/* Animation for scrolling text */
@keyframes scroll-text {
  0% { transform: translateX(10%); }
  100% { transform: translateX(-100%); }
}
.scrolling-announcement .content-area div {animation: scroll-text 25s linear infinite; margin-left: 150%}
.scrolling-announcement .content-area div strong {font-weight: 500;}
.close-scrolling, .close-popup {
  background: #da3834;
  padding: 5px 20px;
  cursor: pointer;
}
.close-scrolling:hover, .close-popup:hover {
  background: #74161f;
}
.show-scrolling {width: 50px; height: 50px; position: fixed; Bottom: 0; right: 0; background-color: #da3834; opacity: 0.5; transition: all 0.3s ease-in-out; z-index: 1000; display: flex; justify-content: center; align-items: center;}
.show-scrolling:hover {background-color: #74161f; opacity: 0.75;}
/* Responsive Styles for Smaller Screens */
@media screen and (max-width: 768px) {
  .scrolling-announcement { bottom: 60px; }
  
  .scrolling-announcement .content-area div { animation: scroll-text 30s linear infinite; position: relative; left: 250%; margin-left: 0px}

  .scrolling-announcement .content-area, .dismiss-bar { margin: 0 20px; width: 100%; }

  .dismiss-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 45px; }

  .close-scrolling, .close-popup {
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 0;
  }

  .show-scrolling {bottom: 60px;}

  @keyframes scroll-text {
    0% { transform: translateX(5%); }
    100% { transform: translateX(-100%); }
  }
}
