/* Screen reader only */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* Hide the old nav-search column entirely */
#nav-search {
  display: none !important;
}

/* Pull menu away from the fixed RA button */
#main-nav .holesum {
  padding-right: 185px !important;
}

/* Button is icon-only below 1500px â€” much less clearance needed */
@media (max-width: 1500px) {
  #main-nav .holesum {
    padding-right: 70px !important;
  }
}

/* =====================
   WIDGET SECTION
   ===================== */
body {font-family: Montserrat, sans-serif;}   

#aiContainer {
  padding:20px;
  border-radius: 10px;
}

.gov-hero__btns {
  display: flex;
  gap: 1.3rem;
  margin: auto;
}
@media (max-width: 600px) {
  .gov-hero__btns {
    flex-wrap: wrap;
  }
}
 #aiFieldWrap {
  padding-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#homeAiInput {
  position: relative;
  flex: 1 0 100%;
  margin-bottom: 0.5rem;
}

#homeAiText {
  min-width: 100%;
  height: 46px;
  padding: 0 10px;
  background: #fff;
  font-size: 16px !important;
  color: #333;
  outline: none;
  font-family: Roboto, sans-serif;
  border: 1px solid #ccc;
  border-radius: 10px;
}

#homeAiText:focus { border-color: #00607d; }

.button_ai-voice-search {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px !important;
  color: #4c4a4a !important;
  background: none !important;
  border: 0 !important;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

.button_ai-voice-search:hover { color: #333333; }

.button_ai-voice-search i.listening {
  animation: pulse-icon-scale 1s infinite;
  color: #f2b14a;
}

#homeAiInputSubmit {
  background: none !important;
  position: absolute;
  right: 10px;
  top: 5px;
  height: 35px;
  width: 35px;
  border: 0;
  cursor: pointer;
  transition: 0.3s;
  padding: 0 !important;
}

#homeAiInputSubmit svg { font-size: 23px; color: #000; fill: #000;}
#homeAiInputSubmit:hover svg { fill: #000; }
#homeAiInputSubmit img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }

.gov-hero__btns .aiCard {
  opacity: 1;
  background: #f3eee7;
  border-radius: 10px;
  padding: 0;
  margin-top: 0;
  flex-basis: auto;
  cursor: pointer;
}

.gov-hero__btns .aiCard:hover {
  background: #ffffff;
}

.gov-hero__btns .aiCard p {
  margin: 0;
  color: #1a2744;
  padding: 0.45rem 1.1rem;
  white-space: wrap;
  text-align: left;
}

#aiDisclaimer {
    text-align: center;
    margin: 1rem auto 0 auto;
    color:#fff;
    font-family: Montserrat, sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

@keyframes pulse-icon-scale {
  0%   { transform: translateY(-50%) scale(1); }
  50%  { transform: translateY(-50%) scale(1.15); }
  100% { transform: translateY(-50%) scale(1); }
}

@media (max-width: 768px) {
  #aiFieldWrap { max-width: 100%; }
}

/* =====================
   Resident Assistant button
   ===================== */
#aiToggle {
  border: none;
  font-family: inherit;
  cursor: pointer;
  white-space: normal;
  vertical-align: middle;
}

#aiToggle:hover,
#aiToggle:focus {
  outline: none;
}

#aiToggle svg {
  vertical-align: sub;
}

#aiToggle span {
  padding-left: 5px;
}

/* =====================
   Fullscreen chat overlay
   ===================== */
#fullscreenChatOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999 !important;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 1.5rem !important;
  width: 100% !important;
}

#fullscreenChatOverlay.active {
  display: flex;
  opacity: 1;
}

/* History sidebar sits left of the chat; stacks above it on small screens */
#fullscreenChatOverlay {
  gap: 1rem;
}
@media screen and (max-width: 780px) {
  #fullscreenChatOverlay {
    flex-direction: column;
  }
}

#fullscreenChatOverlay #aiHistory {
  padding: 2rem;
  background: #EEE;
  border-radius: 10px;
  flex: 0 25%;
  overflow: auto;
}
@media screen and (max-width: 780px) {
  #fullscreenChatOverlay #aiHistory {
    padding: 0.5rem 1rem;
    flex: 0 105px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    overflow: auto;
    min-height: 105px;
  }
  #fullscreenChatOverlay #aiHistory h2 {
    min-width: 110px;
    margin-bottom: 0;
  }
  #fullscreenChatOverlay #aiHistory #aiHistoryList {
    white-space: nowrap;
    display: block !important;
    transform: rotate(180deg);
  }
  #fullscreenChatOverlay #aiHistory #aiHistoryList .history-item {
    display: inline-block !important;
    margin-left: 1rem;
    transform: rotate(180deg);
  }
  #fullscreenChatOverlay #aiHistory #aiHistoryList .history-empty {
    transform: rotate(180deg);
    width: 180px;
    white-space: normal;
    margin-bottom: 0 !important;
  }
  #fullscreenChatOverlay #aiHistory #aiHistoryClear {
    width: 90px;
    margin-bottom: 0;
    line-height: 1.3;
  }
  #fullscreenChatOverlay #aiHistory #aiHistoryClear span {
    margin-bottom: 0.25rem;
  }
}
@media screen and (max-width: 480px) {
  #fullscreenChatOverlay #aiHistory {
    display: none;
  }
}
#fullscreenChatOverlay #aiHistory h2 {
  font-size: 1.1rem;
  font-weight: bold;
  color: #001429;
}
@media screen and (max-width: 480px) {
  #fullscreenChatOverlay #aiHistory h2 {
    margin-left: 1rem;
  }
}
#fullscreenChatOverlay #aiHistory #aiHistoryList {
  margin: 0;
  display: flex;
  flex-direction: column-reverse;
}
#fullscreenChatOverlay #aiHistory #aiHistoryList .history-empty {
  list-style: none;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  line-height: 1rem;
  display: block;
  font-weight: bold;
  color: #555;
  border: solid 1px #DDD;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
}
#fullscreenChatOverlay #aiHistory #aiHistoryList .history-item {
  list-style: none;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  line-height: 1rem;
  display: block;
  font-weight: bold;
  color: #555;
  border: solid 1px #DDD;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  transition: all, 0.25s;
}
#fullscreenChatOverlay #aiHistory #aiHistoryList .history-item:hover {
  background: #DDD;
  border-radius: 0.75rem;
}
#fullscreenChatOverlay #aiHistory #aiHistoryList .history-item .history-text {
  display: block;
}
#fullscreenChatOverlay #aiHistory #aiHistoryList .history-item .history-time {
  display: block;
  margin-top: 0.5rem;
  font-style: italic;
  font-weight: normal;
  font-size: 0.75rem;
}
#fullscreenChatOverlay #aiHistory #aiHistoryClear {
  border-radius: 10px;
  width: 100%;
}

#fullscreenChatContainer {
  flex: 1;
  min-width: 0;
  position: relative;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100% !important;
  max-height: 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

#fullscreenChatHeader {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#fullscreenChatClose {
  background: none;
  border: none;
  color: #000;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

#fullscreenChatClose:hover {
  background: rgba(255, 255, 255, 0.1);
}

#fullscreenChatBody {
  flex: 1;
  overflow: hidden;
}

@media (max-width: 900px) {
  #fullscreenChatContainer {
    top: 1rem; left: 1rem; right: 1rem; bottom: 1rem;
  }
}

@media (max-width: 768px) {
  #fullscreenChatContainer {
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 0;
  }
}