/* PUBLIC FEED - RESPONSIVE DESIGN */

body.public-feed {
  background: url(/public-assets/images/background2.jpg);
  background-position: 0 0;
  background-size: cover;
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

body.public-feed img.toolbar-logo {
  height: 60px !important;
  width: auto !important;
  padding: 10px;
}


.content-window{
  margin:0;
  height:100%;
  box-sizing:content-box;
  overflow-y:auto;
  background:#fff;
  overflow-x:hidden
}

/* MAIN LAYOUT CONTAINERS */
.public-feed .subscribe-form {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.public-feed .subscribe-form .form-header {
  width: 100% !important;
  flex-shrink: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  height: 78px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.public-feed .subscribe-form .header-info {
  display: none;
}

.feed-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 78px; /* Account for fixed header */
}

/* PUBLIC FEED HOME - MAIN CONTENT AREA */
.public-feed-home {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ALERT FEED CONTAINER */
#active-alert-feed {
  background: #DDD;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ALERT CARDS */
.alert-card {
  background: #FFF;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  box-sizing: border-box;
}

.alert-card h1 {
  margin: 0 0 10px 0;
  font-size: 1.4em;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-card h2 {
  margin: 0 0 15px 0;
  font-size: 0.9em;
  color: #666;
  font-weight: normal;
}

.alert-card-text {
  margin: 0 0 15px 0;
  line-height: 1.5;
  color: #444;
}

/* TIME REMAINING INDICATOR */
.alert-time-remaining {
  background: #ff9800;
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.85em;
  font-weight: 500;
  margin-bottom: 15px;
  display: inline-block;
}

.alert-time-remaining.expires-soon {
  background: #f44336;
}

.alert-time-remaining.expires-later {
  background: #4caf50;
}

/* ALERT CARD SECTIONS */
.alert-card-channels, 
.alert-card-groups, 
.alert-card-locations, 
.alert-card-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.alert-card h2:not(.alert-card h2:first-of-type) {
  margin-top: 20px;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
  font-size: 0.95em;
}

.group-bubble, 
.location-bubble, 
.language-bubble {
  background: #007cba;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8em;
  font-weight: 500;
}

.location-bubble {
  background: #28a745;
}

.language-bubble {
  background: #6f42c1;
}

/* META INFO */
.alert-card-meta {
  background: #d11232;
  color: white;
  padding: 12px;
  box-sizing: border-box;
  margin: 15px -20px -20px -20px;
  border-radius: 0 0 8px 8px;
}

.meta-bubble a {
  color: white;
  text-decoration: underline;
}

/* NO ACTIVE ALERTS */
#no-active-alert {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  background-color: white;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-active-alert-lang {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 45%;
  padding: 20px;
}

.vertical-bar-seperator {
  height: 80px;
  width: 1px;
  background-color: #ccc;
  margin: 0 20px;
}

#no-active-alert h2 {
  margin: 0 0 10px 0;
  font-size: 1.6em;
  color: #333;
}

#no-active-alert-sub {
  font-size: 1em;
  color: #666;
  margin: 0;
}

#no-active-alert .fa-check {
  background: #28a745;
  color: white;
  padding: 8px;
  border-radius: 50%;
  margin-bottom: 15px;
  font-size: 1.2em;
}

/* MAP CONTAINER */
.public-feed-active-alerts {
  background: transparent;
  flex: 1;
  display: flex;
  flex-direction: column;
}

#map {
  width: 100%;
  height: 100%;
  border: none;
  box-sizing: border-box;
}

/* UNUSED ELEMENTS - HIDDEN */
.alert-tool-bar,
#alert-feed,
#feed-pages,
#calendar-container {
  display: none !important;
}

/* SCROLLBAR STYLING - ENHANCED VISIBILITY */
#active-alert-feed::-webkit-scrollbar {
  width: 12px;
}

#active-alert-feed::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 6px;
  border: 1px solid #ddd;
}

#active-alert-feed::-webkit-scrollbar-thumb {
  background: #007cba;
  border-radius: 6px;
  border: 2px solid #f1f1f1;
}

#active-alert-feed::-webkit-scrollbar-thumb:hover {
  background: #005a8b;
}

/* Firefox scrollbar styling */
#active-alert-feed {
  scrollbar-width: auto;
  scrollbar-color: #007cba #f1f1f1;
}

/* General scrollbar styling for any scrollable content */
.scrollable::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.scrollable::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

.scrollable::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

.scrollable::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* RESPONSIVE BREAKPOINTS */

/* LARGE SCREENS (1200px+) - Sidebar Layout */
@media screen and (min-width: 1200px) {
  .public-feed-home {
    flex-direction: row;
  }
  
  #active-alert-feed {
    width: 35%;
    max-width: 450px;
    min-width: 350px;
    flex-shrink: 0;
  }
  
  .public-feed-active-alerts {
    width: 65%;
    flex: 1;
  }
  
  #map {
    border-left: 3px solid #ddd;
  }
}

/* MEDIUM SCREENS (768px-1199px) - Vertical Stack with Scrollable Alerts */
@media screen and (min-width: 768px) and (max-width: 1199px) {
  .public-feed-home {
    flex-direction: column;
  }
  
  #active-alert-feed {
    height: 45%;
    min-height: 250px;
    max-height: 400px;
    width: 100%;
    /* Keep single column with vertical scrolling */
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .public-feed-active-alerts {
    height: 55%;
    width: 100%;
  }
  
  #map {
    border-top: 3px solid #ddd;
  }
}

/* MOBILE SCREENS (767px and below) - Single column stacked */
@media screen and (max-width: 767px) {
  body.public-feed img.toolbar-logo {
    height: 50px !important;
    margin-top: 8px;
  }
  
  .public-feed .subscribe-form .form-header {
    height: 66px; /* Smaller header on mobile */
  }
  
  .feed-box {
    margin-top: 66px; /* Adjust for smaller mobile header */
  }
  
  .public-feed-home {
    flex-direction: column;
  }
  
  #active-alert-feed {
    height: 45%;
    min-height: 250px;
    max-height: 350px;
    width: 100%;
    padding: 15px;
    gap: 15px;
  }
  
  .alert-card h1 {
    font-size: 1.2em;
  }
  
  #no-active-alert {
    flex-direction: column;
    padding: 30px 15px;
  }
  
  .no-active-alert-lang {
    width: 100%;
    padding: 15px;
  }
  
  .vertical-bar-seperator {
    height: 1px;
    width: 80px;
    margin: 15px 0;
  }
  
  .public-feed-active-alerts {
    height: 55%;
    width: 100%;
  }
  
  #map {
    border-top: 3px solid #ddd;
  }
  
  /* Mobile scrollbar adjustments */
  #active-alert-feed::-webkit-scrollbar {
    width: 8px;
  }
  
  .alert-time-remaining {
    font-size: 0.8em;
    padding: 4px 10px;
  }
}

/* EXTRA SMALL SCREENS (480px and below) */
@media screen and (max-width: 480px) {
  #active-alert-feed {
    padding: 10px;
    gap: 10px;
  }
  
  .alert-card h1 {
    font-size: 1.1em;
  }
  
  #no-active-alert {
    padding: 20px 10px;
  }
  
  .no-active-alert-lang {
    padding: 10px;
  }
  
  .alert-time-remaining {
    font-size: 0.75em;
    padding: 3px 8px;
  }
}