/* ========================================
   PDS D3 Globe Styles
   ======================================== */


/* Globe Country Tooltip Styles */
.country-tooltip {
  position: absolute;
  background: white;
  color: black;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  font-weight: normal;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid #e0e0e0;
  min-width: 200px;
  width: auto;
  height: auto;
  line-height: 1.4;
  white-space: pre-line;
  text-align: left;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow: visible;
  max-width: none;
  /* Completely disable scrollbars */
  overflow-x: hidden !important;
  overflow-y: visible !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* Hide scrollbars for webkit browsers */
.country-tooltip::-webkit-scrollbar {
  display: none !important;
}

/* Style for country names in tooltip */
.country-tooltip .country-name {
  font-weight: bold;
  color: #333;
}

/* Ensure proper text wrapping for address content */
.country-tooltip * {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.country-tooltip.show {
  opacity: 1;
  visibility: visible;
}

/* Default arrow (pointing down) */
.country-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid white;
}

/* Arrow pointing up (when tooltip is below region) */
.country-tooltip.arrow-bottom::after {
  top: -6px;
  border-top: none;
  border-bottom: 6px solid white;
}

/* Arrow pointing down (when tooltip is above region) */
.country-tooltip.arrow-top::after {
  top: 100%;
  border-top: 6px solid white;
  border-bottom: none;
}


/* ========================================
   Mobile Responsive Styles
   ======================================== */

/* Mobile styles for globe checklist */
@media (max-width: 767px) {
  form.source-list {
    margin-top: 50px !important;
  }
}

@media (min-width: 300px) and (max-width:991px) {

  .world-row {
    flex-direction: column;
    gap: 30px;
  }

  .world-grid {
    order: 1;
    padding: 0 15px 40px 15px;
    margin-bottom: 30px;
    margin-top: 15px;
  }

  .world-grid .sec-title {
    padding: 30px 0 0 0;
  }
  
  .world-grid .source-list {
    margin-top: 20px !important;
  }
  
  .world-img {
    order: 2;
    margin: 30px 0 30px 0;
    padding: 0;
  }

  /* Override any existing mobile styles from pds.css */
  .world-img img {
    max-width: 100% !important;
    width: auto !important;
  }

  .globe-container {
    margin: 0 auto;
    padding: 0;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #globe {
    height: 400px !important;
    width: 400px !important;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
  }
}

/* Medium mobile devices (iPhone Pro Max, larger phones) */
@media (min-width: 481px) and (max-width: 768px) {
  .world-grid .sec-title {
    padding: 30px 0 0 0;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .world-row {
    gap: 25px;
  }
  
  .world-grid {
    margin-bottom: 5px;
    margin-top: 20px;
    padding: 0 15px 5px 15px;
  }

  .world-grid .sec-title {
    padding: 30px 0 0 0;
  }
  
  .world-grid .source-list {
    margin-top: 20px !important;
  }
  
  .world-img {
    margin: 25px 0 25px 0;
  }
  
  .globe-container {
    width: 350px;
    height: 350px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  #globe {
    height: 350px !important;
    width: 350px !important;
    margin: 0;
    margin-bottom: 10px;
    border-radius: 50%;
    overflow: hidden;
  }
}


/* ========================================
   Globe Container Styles
   ======================================== */

.globe-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.globe-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}

.globe-canvas:active {
  cursor: grabbing;
}

/* Globe loading state */
.globe-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-size: 18px;
  color: #666;
}

/* Globe error state */
.globe-error {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-size: 16px;
  color: #ff4444;
  text-align: center;
  padding: 20px;
}
/* ========================================
Image Masking
   ======================================== */
   /* Responsive adjustments for wave masked container */

/* Wave masked container */
.wave-masked-container {
    position: relative;
    width: 100%;
    min-height: 80vw;
    overflow: hidden;
}

/* Top section - clipped by wave shape (wave moved higher) */
.top-section-masked {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 85vw;
    background: linear-gradient(to bottom, #e0dce7 0%, #bbc5e9 100%);
    padding: clamp(3.75rem, 4vw, 7.5rem) 0 clamp(2.5rem, 3vw, 5rem) 0;
    clip-path: url(#wave-top);
    -webkit-clip-path: url(#wave-top);
    z-index: 2;
}

/* Bottom section - clipped by wave shape (new background color) */
.bottom-section-masked {
    position: absolute;
    top: 35vw;
    left: 0;
    width: 100%;
    height: 85vw;
    background: #e2dde6;
    z-index: 1;
    padding: clamp(2.5rem, 3vw, 5rem) 0;
    padding-top: 20vw;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Remove old banner wave styles */
.banner-wave-img {
  display: none;
}
/* Black Wave SVG Overlay - Control both SVGs position from here */
.wave-svg-overlay {
    position: absolute;
    top: 39.1vw; /* Adjust this single value to move both SVGs up/down */
    left: 0;
    width: 100%;
    height: auto;
    z-index: 3;
    pointer-events: none;
    transform: translateY(-75%); /* Fine-tune vertical position */
}

/* Static and Animated SVG positioning - both positioned relative to parent */
.wave-svg-static,
.wave-svg-animated {
    position: absolute;
    width: 100%;
    height: auto;
    top: 0;
    left: 0;
}

.wave-svg-static {
    z-index: 10; /* Behind - stays static to cover border */
}

.wave-svg-animated {
    z-index: 20; /* On top - animates (higher z-index = on top) */
}

/* Ensure static stripe paths don't animate */
.stripe-static {
    transform: none !important;
    animation: none !important;
}

.wave-svg-image {
  width:100vw;
  height: auto;
  object-fit: cover;
  object-position: center;
}
@media (min-width:768px) and (max-width:991px)
 {
 .wave-masked-container {
    min-height: 50rem;
  }

  .top-section-masked {
    height: 38rem !important; /* Fixed height for proper wave alignment */
    padding: clamp(2.5rem, 4vw, 5rem) 0 clamp(1.875rem, 3vw, 3.75rem) 0;
    padding-top: 8rem;
    padding-bottom: 10rem;
    /* Remove clipping on mobile - normal rectangular background */
    clip-path: none;
    -webkit-clip-path: none;
  }

  .bottom-section-masked {
        top: 35rem;
        min-height: 40rem;
        padding: clamp(1.875rem, 3vw, 3.75rem) 0;
        padding-top: 18rem;
        height: auto;
  }

  /* Show starting part of black wave SVG zoomed on mobile */
  .wave-svg-overlay {
        margin-top: 42rem;
        overflow: hidden;
        height: 500px;
        position: relative;
        width: 100%;
        z-index: 3;
        transform: translateY(-50%);
        top: 0;
  }

  .wave-svg-overlay .wave-svg-image {
    width: 100%;
    height: auto;
    margin-top: 17rem;
    transform: scale(3.5) translateY(-20%); /* More zoom, move up and RIGHT to show extreme left part */
    transform-origin: left ; /* Start from top-left to show beginning of waves */
  }
}
@media (max-width: 767px) {
  .wave-masked-container {
    min-height: 80rem;
  }

  .top-section-masked {
        height: 40rem;
        padding: clamp(2.5rem, 4vw, 5rem) 0 clamp(1.875rem, 3vw, 3.75rem) 0;
        padding-top: 8rem;
        padding-bottom: 10rem;
        clip-path: none;
        -webkit-clip-path: none;
  }

  .bottom-section-masked {
top: 40rem;
        min-height: 50rem;
        padding: clamp(1.875rem, 3vw, 3.75rem) 0;
        padding-top: 12rem;
        height: auto;
  }

  /* Show starting part of black wave SVG zoomed on mobile */
  .wave-svg-overlay {
margin-top: 50rem;
        overflow: hidden;
        height: 500px;
        position: relative;
        width: 100%;
        z-index: 3;
        transform: translateY(-50%);
        top: 0;
  }

  .wave-svg-overlay .wave-svg-image {
    width: 100%;
    height: auto;
    margin-top: 17rem;
    transform: scale(3.5) translateY(-20%); /* More zoom, move up and RIGHT to show extreme left part */
    transform-origin: left ; /* Start from top-left to show beginning of waves */
  }
}
@media(max-width:480px){
  .globe-container{
    height: 250px;
    overflow: visible;
  }
}