html, body {
  margin: 0;
  padding: 0;
}

/* Map container */
#map {
  width: 100%;
  height: 100vh;
}

/* Popup Overlay */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.65); /* semi-transparent without blur */
  z-index: 1500;
  backdrop-filter: none !important; /* Remove any blur */
}

/* Core popup container */
.custom-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  background-color: #ffffff;
  color: #2d3436;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  filter: none !important; /* Remove any internal blur */
  z-index: 1600;
}

/* Generic header style */
.popup-header {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  color: #ffffff;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid rgba(255, 255, 255, 0.15);
  position: relative;
}

/* Close button */
.popup-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.popup-close:hover {
  color: #ff7675;
  transform: scale(1.2);
}

/* Content area */
/* Enhance popup content styling */
.popup-content {
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.92rem;
}

.popup-content table {
  width: 100%;
  border-collapse: collapse;
}
.popup-content th,
.popup-content td {
  padding: 6px 8px;
  border-bottom: 1px solid #eaeaea;
  vertical-align: top;
}
.popup-content th {
  background-color: #f8f9fa;
  text-align: left;
}

/* Exchange calculator layout tweaks - removed old styles */

/* Country Info Table */
.country-info-table {
  width: 100%;
  border-collapse: collapse;
}

.country-info-table th {
  background: #ecf0f1;
  color: #2d3436;
  padding: 10px 8px;
  font-weight: 600;
  border: 1px solid #dfe6e9;
}

.country-info-table td {
  padding: 8px 8px;
  border: 1px solid #f0f3f4;
}

/* Weather popup */
.current-weather {
  background: #dff9fb;
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  border-left: 4px solid #0984e3;
}

.weather-day {
  background: #ffffff;
  border-left: 4px solid #74b9ff;
  padding: 14px 16px;
  border-radius: 6px;
  margin-bottom: 14px;
}

/* Exchange Rate Calculator - Professional Design */
.exchange-calculator-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.calculator-header {
  text-align: center;
  margin-bottom: 24px;
}

.calculator-title {
  color: #2d3436;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.calculator-title i {
  color: #0984e3;
  font-size: 1.2rem;
}

.calculator-subtitle {
  color: #636e72;
  font-size: 0.95rem;
  margin: 0;
  font-weight: 500;
}

.calculator-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.currency-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 280px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.currency-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.currency-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.currency-label i {
  color: #0984e3;
  font-size: 0.85rem;
}

.currency-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: #0984e3;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(9, 136, 227, 0.3);
}

.control-btn:hover {
  background: #74b9ff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(9, 136, 227, 0.4);
}

.control-btn:active {
  transform: scale(0.95);
}

.currency-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.currency-input {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: right;
  background: #f8f9fa;
  color: #2d3436;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 120px;
}

.currency-input:focus {
  outline: none;
  border-color: #0984e3;
  box-shadow: 0 0 0 3px rgba(9, 136, 227, 0.1);
  background: #ffffff;
}

.currency-code {
  font-size: 0.9rem;
  font-weight: 700;
  color: #636e72;
  min-width: 40px;
  text-align: center;
}

.exchange-arrow {
  color: #0984e3;
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-4px);
  }
  60% {
    transform: translateY(-2px);
  }
}

.exchange-rate-info {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.rate-display {
  margin-bottom: 8px;
}

.rate-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #636e72;
  margin-right: 8px;
}

.rate-value {
  font-size: 1rem;
  font-weight: 700;
  color: #2d3436;
}

.last-updated {
  color: #a4b0be;
  font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 480px) {
  .exchange-calculator-container {
    padding: 16px;
  }

  .currency-section {
    min-width: 240px;
    padding: 12px 16px;
  }

  .currency-input {
    font-size: 1rem;
    min-width: 100px;
  }

  .calculator-title {
    font-size: 1.2rem;
  }
}

/* Wikipedia & News links */
.popup-content a {
  color: #0984e3;
  text-decoration: none;
  font-weight: 600;
}

.popup-content a:hover {
  text-decoration: underline;
}

/* News cards */
.news-card {
  background: #ffffff;
  border-left: 4px solid #636e72;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 6px;
}

.news-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 6px;
}

.news-description {
  font-size: 0.9rem;
  color: #636e72;
  margin-bottom: 8px;
}

/* Bootstrap button override */
.btn-outline-primary {
  --bs-btn-color: #0984e3;
  --bs-btn-border-color: #0984e3;
  --bs-btn-hover-bg: #0984e3;
  --bs-btn-hover-border-color: #0984e3;
  --bs-btn-hover-color: #ffffff;
}

/* Custom country dropdown styling */
.custom-dropdown {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1600;
  width: 280px;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: white;
  border: 1px solid #dcdde1;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2d3436;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dropdown-toggle:hover {
  border-color: #007bff;
  box-shadow: 0 4px 20px rgba(0,123,255,0.2);
}

.dropdown-toggle.open {
  border-color: #007bff;
  box-shadow: 0 4px 20px rgba(0,123,255,0.3);
}

.arrow {
  margin-left: auto;
  color: #666;
  transition: transform 0.2s ease;
}

.dropdown-toggle.open .arrow {
  transform: rotate(180deg);
  color: #007bff;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border: 1px solid #dcdde1;
  border-radius: 0 0 8px 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  z-index: 1001;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu li {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #2d3436;
  transition: background-color 0.2s ease;
}

.dropdown-menu li:hover {
  background-color: #f8f9ff;
}

.dropdown-menu li:last-child {
  border-bottom: none;
}

.flag {
  font-size: 20px;
  line-height: 1;
}

/* Weather Icon Styles */
.weather-icon{font-size:24px;margin-right:6px;vertical-align:middle;}
.weather-icon.sunny{color:#f1c40f;}
.weather-icon.cloudy{color:#95a5a6;}
.weather-icon.rain{color:#3498db;}
.weather-icon.snow{color:#ecf0f1;}
.weather-icon.thunder{color:#e67e22;}

/* Custom Emoji Icon Styles */
.custom-emoji-icon {
  background: transparent !important;
  border: none !important;
}

.custom-emoji-icon div {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Weather day card */
.weather-day{background:#f8f9fa;border-radius:6px;padding:6px;margin-bottom:6px;box-shadow:0 1px 3px rgba(0,0,0,0.1);}
