/* Transparent Footer Bar */
.transparent-bar { position: absolute; right: 0; bottom: 0; width: 100%; display: flex; align-items: center; justify-content: flex-end; padding: 5px; background: rgba(0,0,0,0); color: #000;}

/* =========================================================
   FOOTERS — FULL DROP-IN CSS
   (keeps #results-footer-results CSS unchanged)
   ========================================================= */
:root{
  --footer-h: 66px;
  --footer-safe: env(safe-area-inset-bottom, 0px);

  --footer-fg: #333;
  --footer-night-fg: #fff;

  /* more transparent */
  --footer-glass-light: rgba(255, 255, 255, 0.34);
  --footer-glass-dark: rgba(10, 10, 10, 0.34);

  /* slightly softer shadows */
  --footer-shadow-light: 0 10px 30px rgba(0, 0, 0, 0.12);
  --footer-shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.32);

  --footer-radius: 22px;
  --footer-side-gap: 12px;
  --footer-bottom-gap: 12px;
}

/* =========================================================
   Shared selector groups
   ========================================================= */

:is(
  #results-footer-initial,
  #results-footer-results,
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) a,
:is(
  #results-footer-initial,
  #results-footer-results,
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) a:link,
:is(
  #results-footer-initial,
  #results-footer-results,
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) a:visited,
:is(
  #results-footer-initial,
  #results-footer-results,
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) a:hover,
:is(
  #results-footer-initial,
  #results-footer-results,
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) a:active{
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  text-decoration-color: transparent !important;
}

:is(
  #results-footer-initial,
  #results-footer-results,
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) a *{
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
}

/* remove any old hairlines/highlights */
:is(
  #results-footer-initial,
  #results-footer-results,
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
)::before,
:is(
  #results-footer-initial,
  #results-footer-results,
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
)::after{
  content: none !important;
  display: none !important;
}

/* =========================================================
   Results initial footer fade
   ========================================================= */

#results-footer-initial{
  opacity: 0;
  transition: opacity 0.8s ease;
}
#results-footer-initial.visible{
  opacity: 1;
}

/* =========================================================
   Shared search circle
   ========================================================= */

.search-circle{
  width: 70px;
  height: 70px;
  margin-top: -8px;   /* was -20px */
  margin-bottom: 0;    /* was 4px */
  padding-top: 0;      /* was 8px */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: center;
  border-radius: 50%;
  background: #007bff;
  border: 1px solid #ccc;
}

.search-circle > .footer-item{
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   1) Initial results footer
   ========================================================= */

#results-footer-initial{
  position: fixed;
  left: var(--footer-side-gap);
  right: var(--footer-side-gap);
  bottom: var(--footer-bottom-gap);
  min-height: var(--footer-h);
  padding: 8px 0 calc(8px + var(--footer-safe));
  box-sizing: border-box;
  overflow: visible;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-radius: var(--footer-radius);
  background: var(--footer-glass-dark);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);

  /* new: make the floating shape obvious */
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.32),
    0 2px 10px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

#results-footer-initial > .footer-item{
  flex: 0 1 80px;
  max-width: 100px;
  padding: 2px 4px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none !important;
}

#results-footer-initial .footer-item svg{
  width: 25px !important;
  height: 25px !important;
  display: block;
  color: #fff;
}

#results-footer-initial .footer-label{
  margin-top: 4px;
  line-height: 1;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-decoration: none !important;
}

/* =========================================================
   2) All floating footers except #results-footer-results
   ========================================================= */

:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
){
  position: fixed;
  left: var(--footer-side-gap);
  right: var(--footer-side-gap);
  bottom: var(--footer-bottom-gap);
  width: auto;
  max-width: calc(100vw - (2 * var(--footer-side-gap)));
  min-height: var(--footer-h);
  padding: 8px 0 calc(8px + var(--footer-safe));
  box-sizing: border-box;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-radius: var(--footer-radius);
  background: var(--footer-glass-light);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--footer-shadow-light);
  color: var(--footer-fg);
  text-decoration: none !important;
  z-index: 999;
}

html[data-theme="night"] :is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
){
  background: var(--footer-glass-dark);
  box-shadow: var(--footer-shadow-dark);
  color: var(--footer-night-fg);
}

#results-footer_details{
  z-index: 1999;
}

/* footer item defaults */
:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) .footer-item{
  padding: 2px 4px;
  box-sizing: border-box;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;

  text-align: center;
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) .footer-item svg{
  width: 25px !important;
  height: 25px !important;
  display: block;
  vertical-align: middle;
}

:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) .footer-label{
  margin-top: 4px;
  line-height: 1;
  font-size: 10px;
  font-weight: 700;
  color: inherit;
  text-decoration: none !important;
}

/* =========================================================
   3-icon footers
   ========================================================= */

:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #history-footer-results,
  #credits-footer-initial,
  #saved-footer-initial
){
  justify-content: center;
  gap: 20px;
  padding-top: 10px;
}

:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #history-footer-results,
  #credits-footer-initial,
  #saved-footer-initial
) > .footer-item{
  flex: 0 1 80px;
  max-width: 100px;
}

:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #history-footer-results,
  #credits-footer-initial,
  #saved-footer-initial
) > .search-circle{
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   Results-style floating footers except #results-footer-results
   ========================================================= */

:is(
  #agentlisting-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results
){
  display: flex;
  align-items: center;
}

:root{
  --footer-progress-inset: 10px;
  --footer-progress-h: 3px;
}

/* progress bar for floating results-style footers */
:is(
  #results-footer-results,
  #saved-footer-results,
  #viewed-footer-results,
  #recommended-footer-results,
  #agentlisting-footer-results
) .scroll-progress{
  position: absolute !important;
  top: 3px !important;
  left: 12px !important;
  right: auto !important;
  height: 2px !important;
  width: 0%;
  max-width: calc(100% - 24px) !important;
  border-radius: 999px !important;
  background-color: #007bff !important;
  transition: width 0.1s !important;
  z-index: 1000 !important;
}

:is(
  #agentlisting-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results
) > :not(.scroll-progress):not(.search-circle){
  flex: 1 1 0;
  min-width: 0;
}

:is(
  #agentlisting-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results
) > .search-circle{
  flex: 0 0 auto;
}

/* =========================================================
   Details footer
   ========================================================= */

#results-footer_details{
  justify-content: space-around;
  padding-top: 0 !important;
  padding-bottom: var(--footer-safe) !important;
  align-items: center !important;
}

#results-footer_details a:hover{
  text-decoration: none;
}

#results-footer_details #closeModalButton{
  height: 100% !important;
  min-width: 0;
  margin: 0;
  padding: 10px 12px !important;
  box-sizing: border-box;
  border: none;
  background: transparent;
  cursor: pointer;

  display: flex !important;
  align-items: center !important;
  align-self: stretch !important;
  gap: 6px;
}

#results-footer_details #closeModalButton > span:first-child{
  width: 40px;
  height: 40px;
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;
}

#results-footer_details #closeModalButton .backText{
  min-width: 0;
  max-width: 110px;
  height: 100% !important;
  line-height: 1.1;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;

  display: flex;
  flex-direction: column;
  justify-content: center !important;
  align-items: flex-start;
}

#results-footer_details #closeModalButton .backText > span{
  display: block;
  line-height: 1.05;
}

#results-footer_details #closeModalButton .backText span{
  color: var(--footer-fg);
}

html[data-theme="night"] #results-footer_details #closeModalButton .backText span{
  color: var(--footer-night-fg) !important;
}

/* =========================================================
   Night: lighten image icons where needed
   ========================================================= */

html[data-theme="night"] :is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) .footer-item img:not(.no-theme):not([src*="_white"]):not([src*="white_"]){
  filter: invert(1) brightness(1.6) contrast(1.05);
}

/* =========================================================
   3) #results-footer-results
   ========================================================= */

#results-footer-results{
  position: fixed;
  left: var(--footer-side-gap);
  right: var(--footer-side-gap);
  bottom: var(--footer-bottom-gap);

  width: auto;
  max-width: calc(100vw - (2 * var(--footer-side-gap)));
  min-height: var(--footer-h);
  padding: 10px 0 calc(10px + var(--footer-safe));
  box-sizing: border-box;
  overflow: visible;
  z-index: 999;

  display: flex;
  align-items: center;

  border-radius: var(--footer-radius);
  background: var(--footer-glass-light);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--footer-shadow-light);

  color: var(--footer-fg);
}

html[data-theme="night"] #results-footer-results{
  background: var(--footer-glass-dark);
  box-shadow: var(--footer-shadow-dark);
  color: var(--footer-night-fg);
}

/* equal columns */
#results-footer-results .scroll-progress{
  flex: 0 0 auto;
}

#results-footer-results > :not(.scroll-progress):not(.search-circle){
  flex: 1 1 0;
  min-width: 0;
}

/* clickable blocks */
#results-footer-results > .footer-item,
#results-footer-results > .search-circle > .footer-item,
#results-footer-results #toggle-map-btn{
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  box-sizing: border-box;
}

/* search circle */
#results-footer-results > .search-circle{
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

#results-footer-results > .search-circle > .footer-item{
  flex: 0 0 auto !important;
  align-self: center !important;
  height: var(--search-d, 48px);
  aspect-ratio: 1 / 1;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 50%;
  background: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#results-footer-results > .search-circle > .footer-item svg{
  width: 25px !important;
  height: 25px !important;
  display: block;
}

#results-footer-results > .search-circle > .footer-item .footer-label{
  margin-top: 4px;
  line-height: 1;
  font-size: 10px;
  font-weight: 700;
  color: inherit;
}

/* map/list toggle */
#results-footer-results #toggle-map-btn{
  all: unset;
  position: relative;
  flex: 1 1 0;
  align-self: stretch;
  box-sizing: border-box;
  cursor: pointer;
  line-height: 1;
  color: inherit;
  -webkit-tap-highlight-color: transparent;

  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#results-footer-results #toggle-map-btn svg{
  width: 25px !important;
  height: 25px !important;
  display: none !important;
}

#results-footer-results #toggle-map-btn[aria-pressed="false"] .icon-map{
  display: block !important;
}

#results-footer-results #toggle-map-btn[aria-pressed="true"] .icon-list{
  display: block !important;
}

#results-footer-results #toggle-map-btn .footer-label{
  margin-top: 4px !important;
  min-height: 12px;
  line-height: 12px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: inherit !important;
  text-decoration: none !important;
}

html[data-theme="night"] #results-footer-results #toggle-map-btn{
  color: #fff;
}

/* normalize other results-footer items */
#results-footer-results > :is(a.footer-item, button.footer-item){
  padding: 1px;
  line-height: 1;
  color: inherit !important;
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

#results-footer-results .footer-label{
  margin-top: 4px !important;
  line-height: 1 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: inherit !important;
  text-decoration: none !important;
}

#results-footer-results .search-circle .footer-label{
  color: #fff !important;
}

#results-footer-results > :is(a.footer-item, button.footer-item):not(#toggle-map-btn) svg{
  width: 25px !important;
  height: 25px !important;
  display: block !important;
  vertical-align: middle;
}

/* filter icon wrapper */
#results-footer-results #filter-btn2{
  font-size: inherit !important;
}

#results-footer-results #filter-btn2 .icon-wrapper{
  width: 25px !important;
  height: 25px !important;
  line-height: 0 !important;
  position: relative !important;

  display: flex !important;
  align-items: center;
  justify-content: center;
}

#results-footer-results #filter-btn2 .filter-badge{
  top: -3px;
  right: -5px;
}

/* more icon */
#results-footer-results #toggle-more-btn svg{
  width: 25px !important;
  height: 25px !important;
}


/* =========================================================
   VERTICAL CENTRE FIX
   Keep content centred in the visible bar,
   not in the safe-area padding underneath
   ========================================================= */

:root{
  --footer-h: 66px;
  --footer-safe: env(safe-area-inset-bottom, 0px);
  --footer-total-h: calc(var(--footer-h) + var(--footer-safe));
}

/* Footer shells */
#results-footer-initial,
#results-footer-results,
:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
){
  min-height: var(--footer-total-h) !important;
  padding-top: 0 !important;
  padding-bottom: var(--footer-safe) !important;
  align-items: flex-start !important;   /* was centering inside total height */
  box-sizing: border-box;
}

/* Normal footer items */
#results-footer-initial > .footer-item,
#results-footer-results > .footer-item,
#results-footer-results > #toggle-map-btn,
:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results,
  #results-footer_details
) > .footer-item{
  height: var(--footer-h) !important;
  min-height: var(--footer-h) !important;
  align-self: flex-start !important;

  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;             /* true vertical centring */
  box-sizing: border-box;
}

/* Search circle column */
#results-footer-initial > .search-circle,
#results-footer-results > .search-circle,
:is(
  #profile-footer-initial,
  #notifications-footer-initial,
  #credits-footer-initial,
  #saved-footer-initial,
  #agentlisting-footer-results,
  #history-footer-results,
  #recommended-footer-results,
  #viewed-footer-results,
  #results-footer-saved,
  #saved-footer-results
) > .search-circle{
  height: var(--footer-h) !important;
  min-height: var(--footer-h) !important;
  align-self: flex-start !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Details back button */
#results-footer_details #closeModalButton{
  height: var(--footer-h) !important;
  min-height: var(--footer-h) !important;
  align-self: flex-start !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}