/* Reset margins and padding for the entire document */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

/* Fullscreen map styling */
#map {
  width: 100%;
  height: 100%;
}

/* Preloader styles */
#preloader {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 16px solid #f3f3f3;
  border-top: 16px solid #3498db;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Container for the country selection dropdown */
#selectContainer, #countryDropdown {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px 0;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Styling for the country selection dropdown */
#countryDropdown {
  width: 200px;
  margin: 0 auto;
  border-radius: 30px;
  padding: 5px;
  border: 1px solid #ccc;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Modal Styling */
.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* Red Header Bar */
.modal-header {
  background-color: #d9534f;
  color: white;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  text-align: center;
  padding: 15px;
  position: relative;
  width: 100%;
}

/* Close Button Styling */
.modal-header .btn-close {
  position: absolute;
  right: 15px;
  top: 15px;
  border: none;
  border-radius: 100%;
  padding: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #d9534f;
  font-size: 18px;
  line-height: 1;
}

.modal-header .btn-close:hover {
  background-color: #f2f2f2;
  cursor: pointer;
}

/* News Item Styling */
.news-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.news-thumbnail img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.news-content {
  padding: 0;
}

.news-title {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 5px;
  text-decoration: none;
}

.news-title:hover {
  text-decoration: underline;
}

.news-source {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 5px;
}

/* Modal styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1055 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Button styling */
.btn-primary, .btn-secondary {
  background-color: white;
}

.btn-primary:hover, .btn-secondary:hover {
  background-color: orange;
  color: black;
}

/* Custom styling for the table in the modal */
.modal-body table {
  width: 100%;
  margin-bottom: 0;
}

.modal-body table td {
  padding: 10px;
  vertical-align: middle;
}

/* Styling for the close button */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover, .close:focus {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

/* Input fields and dropdown styling */
.input-group {
  margin-bottom: 15px;
}

input, select {
  width: calc(50% - 10px);
  padding: 10px;
  margin-right: 10px;
}

/* Hide the top bar */
#topBar {
  display: none;
}

/* Ensure spacing between articles */
.modal-body .news-item:not(:last-child) {
  border-bottom: 1px solid #ddd;
  margin-bottom: 15px;
  padding-bottom: 10px;
}

/* Styling for weather */
.weather-table th, .weather-table td {
  padding: 5px;
  text-align: center;
  vertical-align: middle;
}

.weather-icon {
  width: 40px;
  height: 40px;
}

.today-weather, .forecast {
  margin-bottom: 10px;
}

.temperature-info {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.max-temp {
  font-weight: bold;
}

.min-temp {
  opacity: 0.7;
  margin-top: -4px;
}

/* Ensuring the footer does not overlap the content and remains fixed */
.weather-footer {
  text-align: center;
  padding: 10px;
  background-color: white;
  border-top: 1px solid #ddd;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 50%;  /* Ensure footer spans the full width */
  z-index: 10;
  white-space: nowrap;
}

#weatherContainer {
  padding-bottom: 80px; /* Ensure space for the footer */
}

/* Make sure the modal's content is scrollable, keeping the footer fixed */
.modal-dialog-scrollable .modal-content {
  max-height: calc(100vh - 1rem);
  display: flex;
  flex-direction: column;
}

.modal-dialog-scrollable .modal-body {
  overflow-y: auto;
  padding-bottom: 20px; /* Adjust the bottom padding to prevent content overlap */
}

.modal-footer {
  padding-bottom: 0; /* Remove extra padding in footer */
}

/* Ensures that dropdowns are not obscured */
.modal-content {
  position: relative;
  z-index: 1;
}

.dropdown {
  position: relative;
  z-index: 1000; /* Higher than modal content */
}

.dropdown-menu {
  z-index: 1050; /* Ensure the dropdown remains visible */
}

/* Adjusting the layout for holiday cards without image */
.holiday-card {
  width: 100%;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  padding: 15px;
  margin-bottom: 10px;
}

/* Adjusting gap between cards */
.holiday-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

/* Adjust font sizes and padding for better layout */
.holiday-info h5 {
  font-size: 18px;
  margin: 0 0 10px 0;
}

.holiday-info p {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

/* Modal header adjustment */
#holidaysModal .modal-header {
  background-color: #d9534f;
  color: white;
  padding: 15px;
}

#holidaysModal .modal-footer {
  padding: 15px;
}

.modal-lg {
  max-width: 90%;
}

.modal-body img {
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 15px;
}

.image-item {
  text-align: center;
  margin-bottom: 20px;
}

/* Style for input placeholders */
input::placeholder {
  color: #999;
  opacity: 1;
}

/* Style for select placeholders */
select option[disabled] {
  color: #999;
}

/* Additional styles for the input fields and dropdown */
input, select {
  font-weight: normal;
}

/* Style for labels to differentiate them from placeholders */
label {
  font-weight: bold;
  color: #333;
  font-size: 14px;
  display: block;
  margin-bottom: 5px;
}

/* Style for input/select fields when they have actual values */
input:not(:placeholder-shown), select:not(:placeholder-shown) {
  font-weight: lighter;
}

/* General styling for input and select fields */
input, select {
  padding: 10px;
  border: 1px solid #ccc;   /* Border color and size */
  border-radius: 4px;       /* Rounded corners */
  width: 100%;              /* Full width */
  box-sizing: border-box;    /* Makes sure padding and border are included in the element's width */
}

/* Styling for read-only input fields */
input[readonly] {
  background-color: #f0f0f0; /* Light grey background for readonly fields */
  font-weight: bold;         /* Make the font bold */
}

/* Modal and footer styling */
.modal-body {
  overflow-y: auto;
  padding-bottom: 60px; /* Space for footer */
}

.weather-footer p {
  margin: 0;
  font-size: 14px;
}

#weatherContainer {
  padding-bottom: 80px; /* Ensure space for the footer in scrollable content */
}

/* Weather table styling */
.weather-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
}

.weather-table th, .weather-table td {
  padding: 5px;
  text-align: center;
  vertical-align: middle;
}

.weather-icon {
  width: 40px;
  height: 40px;
}

.today-weather, .forecast {
  margin-bottom: 10px;
}

.temperature-info {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.today {
  font-size: 20px;
}

.max-temp {
  font-weight: bold;
  font-size: 30px;
}

.min-temp {
  opacity: 0.7;
  margin-top: -4px;
  font-size: 20px;
}

.last-updated {
  font-size: 13px;
  opacity: 0.7;
}
