/* Ensure the map fills its column/section */
#igmap-64377-sc,
#igmap-64377-sc .elementor-widget-container,
#igmap-64377-sc .elementor-shortcode,
#igmap-64377-sc .map_wrapper,
#igmap-64377-sc .map_box,
#igmap-64377-sc .map_aspect_ratio,
#igmap-64377-sc .map_container,
#igmap-64377-sc .map_render {
  height: 100% !important;
  min-height: 100%;
}

/* If the section uses flex (Elementor default), allow it to stretch */
.elementor-section,
.elementor-column {
  align-items: stretch !important;
}

@media (min-width: 768px) {
  #igmap-64377-sc,
  #igmap-64377-sc .elementor-widget-container,
  #igmap-64377-sc .elementor-shortcode,
  #igmap-64377-sc .map_wrapper,
  #igmap-64377-sc .map_box,
  #igmap-64377-sc .map_aspect_ratio,
  #igmap-64377-sc .map_container,
  #igmap-64377-sc .map_render {
    height: 100% !important;
  }
}

/* OUTER TOOLTIP WRAPPER
   (No max-height or overflow! Allows amCharts to position it properly.) */


/* 1. Fix the foreignObject height so amCharts does not clip the HTML */
.imapsTooltip foreignObject {
  height: 360px !important; /* Adjust as needed */
  overflow: visible !important;
  position: relative !important;
  z-index: 2000 !important;
}

/* 2. Push background behind HTML */
.imapsPointedShape-group {
  position: relative !important;
  z-index: 1 !important;
}



.elysium-tooltip {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  max-height: none !important; /* let inner handle it */
  max-width: 260px;
  padding: 0; /* padding moved to inner */
  color: #00313C;
  font-family: inherit;
  position: relative;
}

/* 3. Scroll area inside HTML */
.elysium-tooltip-inner {
  max-height: 330px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* WebKit scrollbars */
.elysium-tooltip-inner::-webkit-scrollbar {
  width: 6px;
}
.elysium-tooltip-inner::-webkit-scrollbar-thumb {
  background: #58A7AF;
  border-radius: 4px;
}
.elysium-tooltip-inner::-webkit-scrollbar-track {
  background: #f2f2f2;
}



/* -----------------------------------------------
   Content styling
------------------------------------------------ */
.elysium-tooltip h4 {
  margin-top: 6px;
  margin-bottom: 12px;
  color: #004F57;
  font-size: 1.4rem;
  font-weight: 600;
  border-bottom: 1px solid #58A7AF;
  padding-bottom: 10px;
}

.elysium-tooltip-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
  display: block;
}

.elysium-tooltip p {
  margin: 6px 0 12px;
  font-size: 1.2rem;
  line-height: 1.4;
}

.elysium-tooltip .btn-view {
  display: block;
  width: 100%;
  text-align: center;
  background: #58A7AF;
  color: #fff;
  padding: 8px 0;
  border-radius: 6px;
  margin-top: 6px;
  font-size: 1.2rem;
  text-decoration: none;
}
.elysium-tooltip .btn-view:hover {
  background: #004F57;
}


/* ----------------------------------------
   Elysium Tooltip Responsive Enhancements
---------------------------------------- */
@media (max-width: 768px) {
  .elysium-tooltip {
    max-height: 340px;           /* allow taller tooltip on phones */
    width: 88vw;                 /* slightly wider for readability */
    font-size: 1.1rem;
    padding: 14px 14px 16px 14px;
  }
  .elysium-tooltip h4 {
    font-size: 1.4rem;
  }

  .elysium-tooltip .btn-view {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 10px 0;
    font-size: 1.1rem;
  }  
}

@media (max-width: 600px) {
  .elysium-tooltip {
    max-width: 90vw;          /* Allow tooltip to fill more horizontal space */
    padding: 12px 14px;
    font-size: 1.1rem;
  }

  .elysium-tooltip h4 {
    font-size: 1.4rem;
  }

  .elysium-tooltip-img {
    border-radius: 6px;
    margin-bottom: 10px;
  }

  .elysium-tooltip p {
    font-size: 1.1rem;
    line-height: 1.45;
  }

  .elysium-tooltip .btn-view {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 0;
    margin-top: 8px;
    font-size: 1.1rem;
  }
}

/* Optional: handle very small viewports (e.g., portrait phones) */
@media (max-width: 400px) {
  .elysium-tooltip {
    max-height: 380px;
    font-size: 1rem;
    width: 94vw;
  }

  .elysium-tooltip h4 {
    font-size: 1.2rem;
  }

  .elysium-tooltip .btn-view {
    font-size: 1rem;
    padding: 7px 0;
  }
}
