/* ============================================
   REGION SWITCHER POP-UP - MODERN DESIGN
   ============================================ */

/* Overlay backdrop */
#change_region {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

#change_region.show {
  display: flex !important;
}

/* Pop-up container */
#change_region .region-pop-up,
#change_region > div {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.3s ease;
}

/* Pop-up title */
#change_region h2,
#change_region h3 {
  margin: 0 0 30px 0;
  font-size: 28px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

/* Close button */
#close-region {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  color: #333;
  font-weight: 300;
}

#close-region:hover {
  transform: scale(1.1) rotate(90deg);
  background: #f5f5f5;
}

#close-region::before {
  content: '×';
  display: block;
  line-height: 1;
}

/* Region/Currency options */
#change_region a,
#change_region .region-option {
  display: block;
  padding: 18px 24px;
  margin: 10px 0;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

#change_region a:hover,
#change_region .region-option:hover {
  background: #e9ecef;
  border-color: #607d8b;
  transform: translateX(5px);
}

/* Current region highlight */
#change_region a#current_region,
#change_region .region-option.current {
  background: #607d8b;
  color: #ffffff;
  border-color: #607d8b;
}

#change_region a#current_region:hover {
  background: #4a6572;
}

/* Grid layout for multiple options */
#change_region .region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

/* List styling */
#change_region ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#change_region li {
  margin: 0;
  padding: 0;
}

/* Make sure all links are visible */
#change_region * {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

#change_region a,
#change_region button,
#change_region .region-link {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  #change_region .region-pop-up,
  #change_region > div {
    padding: 30px 20px;
    width: 95%;
    border-radius: 15px;
  }
  
  #change_region h2,
  #change_region h3 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  #close-region {
    width: 45px;
    height: 45px;
    font-size: 20px;
    top: 15px;
    right: 15px;
  }
  
  #change_region a,
  #change_region .region-option {
    padding: 15px 20px;
    font-size: 15px;
  }
}

/* Scrollbar styling for pop-up */
#change_region .region-pop-up::-webkit-scrollbar,
#change_region > div::-webkit-scrollbar {
  width: 8px;
}

#change_region .region-pop-up::-webkit-scrollbar-track,
#change_region > div::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#change_region .region-pop-up::-webkit-scrollbar-thumb,
#change_region > div::-webkit-scrollbar-thumb {
  background: #607d8b;
  border-radius: 10px;
}

#change_region .region-pop-up::-webkit-scrollbar-thumb:hover,
#change_region > div::-webkit-scrollbar-thumb:hover {
  background: #4a6572;
}