/* Reset & base */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Map */
#map {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Country selector container */
#selectContainer {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background: rgba(255,255,255,0.95);
}

#countrySelect {
    min-width: 200px;
    max-width: 300px;
}

/* Modal styling */
.modal {
    z-index: 1050 !important;
}

.modal-backdrop {
    z-index: 1040 !important;
}

./* Custom modal-content styling */
.modal-content {
    border-radius: 16px; /* Custom radius */
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); /* Custom shadow */
    padding: 40px 60px; /* Optional: you can also use Bootstrap spacing utilities */
    max-width: 700px; /* Optional if you want a fixed width, else use modal-md / modal-lg */
    margin: auto; /* Center modal */
}

/* Flag images inside modal */
img.flag {
    max-height: 100px; /* Limit height */
    border: 1px solid #ccc; /* Custom border */
    border-radius: 4px; /* Slight rounding */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Small shadow */
}

/* Modal header utilities */
.modal-header {
    border-bottom: 0; /* Remove default Bootstrap border */
    padding-bottom: 0; /* Optional spacing */
}

.modal-header .modal-title {
    font-size: 1.5rem; /* Custom size */
    font-weight: 600; /* Semi-bold */
    color: #333; /* Custom color */
}

/* Modal body customization */
.modal-body {
    font-size: 1.1rem; /* Slightly larger text */
    color: #555; /* Custom text color */
    padding-top: 10px; /* Optional spacing */
    padding-bottom: 20px; /* Optional spacing */
}

/* Modal footer utilities */
.modal-footer {
    border-top: 0; /* Remove top border */
    padding-top: 0; /* Remove default padding */
    justify-content: flex-end; /* Right-align buttons */
}

/* Sidebar - default for desktop */
#sidebar {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1040;
}

/* Sidebar buttons size */
.sidebar-btn {
    width: 48px;
    height: 48px;
}

/* Mobile toggle content - default hidden for mobile */
#mobileToggleContent {
    position: fixed;
    bottom: 60px; /* above the bottom sidebar */
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    z-index: 1050;
    display: none; /* hidden by default */
}

/* Desktop: always show toggle content in top-right */
@media (min-width: 768px) {
    #mobileToggleContent {
        display: block !important;
        top: 20px;
        right: 20px;
        bottom: auto;
        left: auto;
        transform: none;
        max-width: 220px;
    }

    /* Sidebar on desktop: vertical column */
    #sidebar {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Mobile: sidebar horizontal row at bottom; toggle content above it */
@media (max-width: 767.98px) {
    #sidebar {
        flex-direction: row;
        gap: 0.5rem;
        bottom: 10px;        /* move sidebar to bottom */
        left: 50%;           /* center horizontally */
        transform: translateX(-50%); /* center horizontally */
        top: auto;           /* reset top */
    }

    #mobileToggleContent {
        bottom: 70px; /* slightly above sidebar to prevent overlap */
        display: none; /* toggled via JS */
    }
}






/* Hide Leaflet layers control */
.leaflet-control-layers {
    display: none !important;
}

/* Optional: custom modal max-width override if needed */
.modal-content {
    max-width: 90vw;
    padding: 5px 10px !important;
}

#toggleWiki {
    margin-top: 10px;
}

.weather-modal-content {
    text-align: center;
}

.weather-main-icon {
    width: 80px;
    margin-bottom: 10px;
}

.weather-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.weather-info img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.weather-temp {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.weather-temp img {
    width: 24px;
    height: 24px;
}

.forecast-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.forecast-heading img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.forecast-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.country-flag {
    max-height: 100px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
    object-fit: contain;
}

/* Preloader overlay covering the modal-body */
.pre-load {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9); /* slightly opaque white */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: opacity 0.5s linear, visibility 0s 0.5s; /* smooth fade-out */
}

/* Spinning loader */
.pre-load:before {
  content: "";
  width: 50px;
  height: 50px;
  border: 6px solid #f2f2f2;
  border-top: 6px solid #2D8E5D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Fade-out class to hide preloader */
.pre-load.fadeOut {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Remove black focus outline on clicked country borders */
.leaflet-interactive:focus {
    outline: none;
}

/* Ensure all news images have the same height and cover the card top */
.news-card-img {
    height: 180px;           /* fixed height for all images */
    object-fit: cover;       /* image fills area without distortion */
}

/* Add subtle shadow to cards */
.news-card {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;  /* smooth hover effect */
}

/* Hover effect: lift card slightly and intensify shadow */
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.news-card-col {
    margin-top: 10px;
    margin-bottom: 10px;
}

.forecast-card {
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.forecast-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.myBtn {
  width: 70px;
}

.footer {
  position: fixed;
  bottom: 0;
}


#currencyModalContent input,
#currencyModalContent select {
    width: 100%;  /* full width of container */
    box-sizing: border-box;
}

#currencyModalContent select {
    border-radius: 0.375rem;  /* matches standard Bootstrap input */
    width: 100%;              /* ensures same width as other inputs */
    box-sizing: border-box;   /* keeps padding inside the width */
    padding: 5px;
}

