.apply_form ol {
  list-style: none;
}
.apply_form ol li {
  display: block;
  margin: 10px 0;
}
.apply_form ol .tall {
  line-height: 3em;
}

/* ============================================ */
/* CEP Auto-fill Styles */
/* ============================================ */

/* Spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Loading state for CEP field */
#apply-postal_code.loading {
  padding-right: 35px;
}

/* Spinner positioned inside the field */
#apply-postal_code.loading::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Error state for CEP field */
#apply-postal_code.error {
  border: 2px solid #dc3545;
}

/* CEP message styling */
.cep-message {
  display: block;
  font-size: 12px;
  color: #dc3545;
  padding: 4px 0;
  margin-top: 4px;
}

/* Responsive font size for larger screens */
@media (min-width: 768px) {
  .cep-message {
    font-size: 14px;
  }
}

/* Modal Overlay */
.hr-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

/* Modal Box */
.hr-modal {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  max-width: 400px;
  width: 100%;
  max-height: calc(100vh - 40px);
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: hr-modal-appear 0.3s ease-out;
  display: flex;
  flex-direction: column;
  margin: auto;
}

@keyframes hr-modal-appear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modal Icon */
.hr-modal-icon {
  font-size: 48px;
  margin-bottom: 15px;
  flex-shrink: 0;
}

.hr-modal-icon.success {
  color: green;
}

.hr-modal-icon.error {
  color: #900;
}

/* Modal Title */
.hr-modal-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
  flex-shrink: 0;
}

.hr-modal-title.success {
  color: green;
}

.hr-modal-title.error {
  color: #900;
}

/* Modal Message */
.hr-modal-message {
  color: #333;
  margin-bottom: 20px;
  line-height: 1.5;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.hr-modal-message ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.hr-modal-message ul li {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.hr-modal-message ul li:last-child {
  border-bottom: none;
}

/* Modal Button */
.hr-modal-btn {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.hr-modal-btn:hover {
  background-color: green;
}

.hr-modal-btn.success {
  background-color: green;
}

.hr-modal-btn.success:hover {
  background-color: #006400;
}

/* Submit Button States */
#hr-apply-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#hr-apply-form button[type="submit"] .hr-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: hr-spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes hr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .hr-modal {
    padding: 20px;
  }

  .hr-modal-icon {
    font-size: 36px;
  }

  .hr-modal-title {
    font-size: 18px;
  }
}

/* Campos de data inline */
.apply_form select[name="birthdate_d"],
.apply_form select[name="birthdate_m"],
.apply_form select[name="birthdate_y"],
.apply_form select[name="mopp_expiration_d"],
.apply_form select[name="mopp_expiration_m"],
.apply_form select[name="mopp_expiration_y"],
.apply_form select[name="last_experience_start_m"],
.apply_form select[name="last_experience_start_y"],
.apply_form select[name="last_experience_end_m"],
.apply_form select[name="last_experience_end_y"],
.apply_form select[name="second_last_experience_start_m"],
.apply_form select[name="second_last_experience_start_y"],
.apply_form select[name="second_last_experience_end_m"],
.apply_form select[name="second_last_experience_end_y"] {
  display: inline-block !important;
  width: auto !important;
  min-width: 80px;
  margin-right: 5px;
}