Global styles
body {
  font-family: 'Tajawal', sans-serif;
  background-color: #f7f7f7;
  color: #222;
  margin: 0;
}

/* Container for the result page */
.result-container {
  max-width: 600px;
  background: #ffffff;
  padding: 30px;
  margin: 40px auto;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

h1 {
  text-align: center;
  color: #004d40;
  margin-bottom: 30px;
  font-size: 28px;
}

/* Form styling */
form label {
  display: block;
  margin: 10px 0 5px;
  color: #333;
  font-weight: 500;
}

form input,
form select {
  width: 100%;
  padding: 6px 12px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 16px;
  margin-bottom: 15px;
  box-sizing: border-box;
  font-family: 'Tajawal', sans-serif;
  background-color: #fff;
  color: #222;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  line-height: 1.5;
}

/* Specifically target input[type="date"] */
input[type="date"] {
  padding-right: 35px; /* Ensure space for the calendar dropdown */
  font-size: 16px;
  line-height: 1.5;
  width: 100%;
  border-radius: 4px;
  background-color: #fff;
  color: #222;
}

/* Flatpickr Customization */
.flatpickr-calendar {
  font-family: 'Tajawal', sans-serif; /* Ensure it matches the rest of your styling */
}

/* Styling for year dropdown */
.flatpickr-current-month {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper {
  width: 48% !important;
  font-size: 14px !important;
  box-sizing: border-box;
  margin: 0;
}

/* Larger and better styled year dropdown */
.flatpickr-year {
  pointer-events: auto !important;
  background-color: #fff !important;
  color: #000 !important;
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 4px;
}

/* Remove default calendar icon spacing on Chrome */
input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
  opacity: 0.6;
  cursor: pointer;
}

/* Focus state styling for inputs */
form input:focus,
form select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 77, 64, 0.2);
}

form button {
  width: 100%;
  background-color: #004d40;
  color: white;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: #00332c;
}

/* Result section styles */
#resultSection {
  margin-top: 20px;
  text-align: center;
}

a {
  text-decoration: none;
  color: #DAF7A6;
}

a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .result-container {
    padding: 20px;
    margin: 20px 15px;
  }

  h1 {
    font-size: 24px;
  }

  form input,
  form input[type="date"],
  form button {
    font-size: 15px;
    padding: 10px 12px;
  }

  #downloadLink {
    font-size: 15px;
  }

  .result p {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .result-container {
    padding: 15px;
    margin: 15px 10px;
  }

  h1 {
    font-size: 22px;
  }

  form input,
  form input[type="date"],
  form button {
    font-size: 14px;
    padding: 10px 12px;
  }

  #downloadLink {
    font-size: 14px;
  }

  .result p {
    font-size: 14px;
  }
}

/* Style for iframe in result section */
iframe {
  display: block;
  border: none;
  height: 700px;
  width: 100%;
  overflow: hidden;
}

.result-banner {
  height: 100%;
  width: 100%;
}

@media screen and (max-width: 480px) {
  iframe {
    height: 550px;
  }

  /* Hide black bar on mobile by masking bottom part */
  .result-iframe-wrapper {
    height: 530px;
    overflow: hidden;
    border-radius: 10px;
  }
}

.result-iframe-wrapper {
  overflow: hidden;
  width: 100%;
  border-radius: 10px;
}

.result-iframe-wrapper iframe {
  width: 100%;
  height: 700px;
  border: none;
  display: block;
}

@media screen and (max-width: 480px) {
  .result-iframe-wrapper {
    height: 530px;
    overflow: hidden;
  }

  .result-iframe-wrapper iframe {
    height: 550px;
  }
}

/* Result Banner background image */
.result-banner {
  background-image: url('../img/bg/bdrc-bg.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  min-height: 85vh;
  width: 100%;
  padding: 50px 15px;
}

/* Fee error message styling */
.fee-error {
  background-color: #ffebee;
  color: #c62828;
  padding: 15px;
  border-left: 5px solid #c62828;
  margin-top: 20px;
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
}

/* Flatpickr dropdown customization */
.flatpickr-current-month {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper {
  width: 48% !important;
  font-size: 14px !important;
  box-sizing: border-box;
  margin: 0;
}

.flatpickr-year {
  pointer-events: auto !important;
  background-color: #fff !important;
  color: #000 !important;
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 4px;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
  input[type="date"] {
    display: none; /* Hide default native picker */
  }
}