/* ==========================================================================
   ANNOUNCEMENT BANNER STYLES
   ========================================================================== */

.announcement-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 997;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-med) 100%);
  color: white;
  padding: 12px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.5s ease-out;
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
}

.announcement-text p{
  margin-bottom: 0;
}

.announcement-text,
#bo-api-content.announcement-text {
  margin: 0;
  flex: 1;
  text-align: center;
  padding: 0 20px;
  
}



.announcement-highlight {
  color: var(--cream);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.announcement-highlight:hover,
#bo-api-content a:hover {
  color: white;
}

/* Ensure API header links match site style */
#bo-api-content a {
  color: var(--cream);
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.announcement-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.announcement-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.announcement-close-icon {
  position: relative;
  width: 1.2rem;
  height: 1.2rem;
}

.announcement-close-icon::before,
.announcement-close-icon::after {
  content: '';
  position: absolute;
  width: 1.2rem;
  height: 1px;
  background: white;
  top: 50%;
  left: 0;
}

.announcement-close-icon::before {
  transform: rotate(45deg);
}

.announcement-close-icon::after {
  transform: rotate(-45deg);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

/* Dynamic positioning - handled by JavaScript */
.site-header,
.top-gradient {
  transition: top 0.3s ease-in-out;
}

body {
  transition: padding-top 0.3s ease-in-out;
}

/* Default positioning - will be overridden by JavaScript */
.site-header {
  top: 0;
  position: fixed;
}

.top-gradient {
  top: 0;
  position: fixed;
}

body {
  padding-top: 0;
}

/* When announcement is active */
body.announcement-active .site-header,
body.announcement-active .top-gradient {
  position: fixed;
}

/* When announcement is closed */
body.announcement-closed .site-header,
body.announcement-closed .top-gradient {
  position: fixed;
}

/* Mobile responsiveness for announcement banner */
@media (max-width: 768px) {
  .announcement-banner {
    padding: 10px 15px;
  }
  
  .announcement-text {
    padding: 0 15px;
  }
  
  .announcement-close-btn {
    width: 1.8rem;
    height: 1.8rem;
  }
  
  .announcement-close-icon {
    width: 1rem;
    height: 1rem;
  }
  
  .announcement-close-icon::before,
  .announcement-close-icon::after {
    width: 1rem;
  }
  

  

  /* Ensure closed state is properly reset on mobile */
  body.announcement-closed .site-header {
    top: 0 !important;
  }
  
  body.announcement-closed {
    padding-top: 0 !important;
  }
}

/* BO Banner Styling (Backend Admin System) */
.bo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-med) 100%);
  color: white;
  padding: 12px 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.bo-banner #header-content-api {
  flex: 1;
  text-align: center;
  font-family: 'Ode', sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
}

.bo-banner .close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

.bo-banner .close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Adjust header positioning when BO banner is active */
body.bo-banner-active .site-header,
body.bo-banner-active .top-gradient {
  top: 55px; /* Height of BO banner */
}

body.bo-banner-active {
  padding-top: 55px;
}

/* Mobile responsiveness for BO banner */
@media (max-width: 768px) {
  .bo-banner {
    padding: 10px 15px;
  }
  
  .bo-banner #header-content-api {
    font-size: 0.8rem;
    padding: 0 10px;
  }
  
  .bo-banner .close-btn {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
  
  body.bo-banner-active .site-header {
    top: 50px; /* Adjust for mobile BO banner height */
  }
  
  body.bo-banner-active {
    padding-top: 50px;
  }
}


.announcement-content .text-smallcontent {
  font-family: 'Ode', serif;
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1.1;
}



/* Responsive text sizes to match Programme.css across media */
@media (max-width: 530px) {
.announcement-content .text-smallcontent { font-size: 1.1rem; }
}

@media (min-width: 530px) and (max-width: 991px) {
.announcement-content .text-smallcontent { font-size: 1.2rem; }
}

@media (min-width: 992px) and (max-width: 1199px) {
.announcement-content .text-smallcontent { font-size: 1.3rem; }
}

@media (min-width: 1600px) {
.announcement-content .text-smallcontent { font-size: 1.4rem; }
}