/* Reset and Box-Sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
}

#map {
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
}

#search-select-box {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 11px 0;
}

#select-country {
  width: 200px;
  margin: 0 auto;
}

/* Leaflet Map Controls */
.leaflet-control, .leaflet-bar {
  z-index: 1000 !important;
}

/* Standard Modal Styling */
.modal-dialog {
  max-width: 400px; 
  width: auto;
  margin: 1.75rem auto;
}

.modal-content {
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  padding: 20px;
}

/* Modal Header */
.modal-header {
  background-color: #1d87ce;
  color: white;
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
}

.modal-header h6, .modal-header h5 {
  color: white;
  font-weight: bold;
}

.modal-header .btn-close {
  color: white;
  font-size: 1.2rem;
}

.modal-header .btn-close:hover {
  color: #f1f1f1;
}

/* Modal Body */
.modal-body {
  padding: 15px;
  font-size: 1rem;
  color: #333;
}

/* Modal Footer */
.modal-footer {
  padding: 10px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: flex-end;
  background: #f8f9fa;
}

/* Standardized Buttons */
.modal-footer .btn {
  font-size: 0.9rem;
  padding: 8px 15px;
}

/* Primary Button */
.modal-footer .btn-primary {
  background-color: #007bff;
  color: white;
  border: none;
  transition: 0.3s;
}

.modal-footer .btn-primary:hover {
  background-color: #0056b3;
}

/* Secondary Button */
.modal-footer .btn-secondary {
  background-color: #f8f9fa;
  color: #333;
  border: 1px solid #ddd;
}

.modal-footer .btn-secondary:hover {
  background-color: #e2e6ea;
}

/* Input Fields inside Modals */
.modal-body .form-control {
  border-radius: 5px;
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 16px;
  width: 100%;
}

/* Exchange Modal Custom Styling */
#exchangeModal {
  margin-top: 30px;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#exchangeModal .modal-dialog {
  max-width: 350px; 
  margin: 1.75rem auto;
}

#exchangeModal .modal-header,
#exchangeModal .modal-body {
  padding: 10px;
}

/* Converted Amount Display */
#finalAmount {
  margin-top: 20px;
}

.finalValue {
  color: green;
  font-weight: bold;
}

/* Weather Modal Styling */
.weather-info {
  border: hidden;
  overflow: hidden;
}

.card.weather {
  border-radius: 5px;
  overflow: hidden;
  width: auto;
  border: none;
}

/* Table Weather */
.table-weather td, .table-weather th {
  color:  #1d87ce !important;
}

#weather-location {
  color: #0f4061;
}

#min-temp {
  color: #b8b8b8;
}

/* News Card */
.news-item {
  display: flex;
  justify-content: start;
  align-items: center;
}

.news-image {
  width: 50%;
  max-width: 250px;
  margin-right: 10px;
}

.news-title {
  flex-grow: 1;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 14px;
}

.news-author {
  font-style: italic;
  opacity: 0.6; 
}

/* Country Info Card */
.card.country {
  border: hidden;
}

.card.country img {
  width: 100%;
  border: 5px solid #1d87ce;
  border-radius: 5px;
}

.card-body.country {
  background-color: #fff;
}

.card-body.country h4 {
  text-align: center;
  font-weight: bold; 
}

.card-body.country a {
  color: #1d87ce;
  text-decoration: none;
}

.card-body.country a:hover {
  color: #0f4061;
  text-decoration: underline;
}

/* Table Country */
.table-country th, .table-country td {
  color:  #1d87ce !important;
}

.table-country td {
  text-align: right;
}

.modal {
    background: transparent !important;
}

.modal-backdrop {
    display: none !important;
}

.weather-day {
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid black;
  padding: 15px;
}

/*Weather */
#weatherToday {
  display: flex;
  justify-content: space-evenly;
  border: 1px solid black;
  padding: 15px 5px ;
}

.weather-day h4 {
  margin-bottom: 10px;
}

.weather-day h2 {
  font-size: 2em;
  margin: 10px 0;
}

.weather-day h6 {
  color: grey;
}

.weather-day-row {
  display: flex;
  justify-content: space-evenly;
}

/* Loader Wrapper */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Preloader Animation */
.preloader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dual Ring Loader */
.lds-dual-ring {
    display: inline-block;
    width: 80px;
    height: 80px;
}

.lds-dual-ring:after {
    content: " ";
    display: block;
    width: 64px;
    height: 64px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid #3498db;
    border-color: #3498db transparent #3498db transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hidden State */
.hidden {
    display: none;
}


/* Mobile Responsiveness */
@media screen and (max-width: 400px) {
  .search-select-box {
    position: relative;
    display: flex;
    width: 100%;
  }
  #map {
    width: 100%;
    height: 100%;
  }
}
