.tooltip {
  display: none;
  position: absolute;
  background-color: #333;
  color: #fff;
  padding: 8px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  white-space: nowrap;
  font-size: 14px;
  transition: opacity 0.2s;
  opacity: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  top: -5px;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.has-tooltip:hover + .tooltip {
  display: block;
  opacity: 1;
}

body,
h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd,
ul,
ol,
pre,
hr {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #f4f4f4;
}

h1,
h2,
h3 {
  color: #333;
}

h3 {
  margin-top: 15px;
  margin-bottom: 5px;
  color: #555;
}

h2 {
  margin-bottom: 15px;
}

label > span,
h3 > span {
  color: #cc0000;
  font-weight: 900;
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  box-sizing: border-box;
}

button {
  padding: 10px 20px;
  background-color: rgb(4, 42, 73);
  color: #fff;
  border: none;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button.faq-button {
  font-size: 26px;
  border-radius: 50%;
  font-weight: bold;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(220, 53, 69);
}

button.faq-button:hover {
  background-color: rgb(220, 53, 69, 0.8);
}

button.faq-button:active {
  background-color: rgb(220, 53, 69, 0.8);
}

button:hover:not(.disabled-button):not(.toggle) {
  background-color: rgb(4, 42, 73, 0.8);
}

button:active:not(.disabled-button):not(.toggle) {
  background-color: rgb(4, 42, 73, 0.8);
  transform: translateY(2px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}

.disabled-button {
  opacity: 0.5;
  cursor: not-allowed;
}

.title {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
}

#auth-body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  background-color: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 35px;
}

.form h1 {
  padding: 15px;
}

.failed-notification {
  background-color: #cc0000;
  opacity: 0.7;
  color: white;
  padding: 10px;
  margin-bottom: 10px;
  text-align: center;
  border-radius: 5px;
}

.success-notification {
  background-color: #2dc539;
  opacity: 0.7;
  color: white;
  padding: 10px;
  margin-bottom: 10px;
  text-align: center;
  border-radius: 5px;
}

#authenticate-button {
  width: 100%;
  margin-top: 10px;
}

#fourwaves-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.upload-section {
  padding: 20px;
}

.upload-section input[type="file"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
}

.show-password-container {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #70757a;
}

.show-password-container input[type="checkbox"] {
  margin-right: 8px;
  width: auto;
}

.disabled-button {
  background-color: #ccc;
  cursor: not-allowed;
}

#form-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#info-release-doc-container {
  font-size: 14px;
  font-style: italic;
  color: #555;
}

.dropdown-add {
  display: flex;
  align-items: flex-start;
  position: relative;
}

#year-container #year h3 {
  display: inline;
}

#year-container {
  width: 20%;
}

#recipient-container select {
  flex: 1;
}

#other-institution {
  width: 50%;
}

.add-button {
  margin-left: 10px;
}

#amount-container {
  display: flex;
}

#amount-awarded {
  flex: 1;
  margin-right: 10px;
}

#amount-confirmed {
  flex: 1;
}

/* Style review container */
#review-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Style review table */
#review-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#review-table td {
  padding: 10px;
  border: 1px solid #ddd;
}

#back-to-edit-button,
#generate-certificate-button {
  margin-top: 20px;
}

.confirmation-box {
  max-width: 400px;
  margin: auto;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.confirmation-box h2 {
  color: #333;
  text-align: center;
}

.confirmation-box p {
  color: #666;
  text-align: center;
}

.confirmation-box button {
  align-items: center;
}

#initials-container {
  text-align: center;
  margin-top: 20px;
}

#initials-container input {
  padding: 10px;
  width: 50%;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#placement-tie-container {
  justify-content: space-between;
  align-items: center;
}

#placement-container {
  width: 100%;
}

#tie-container {
  width: 20%;
  width: fit-content;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: baseline;
}

#tie-container h3 {
  margin-right: 10px;
}

.column {
  flex: 1;
}

/* Modal CSS */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 4px;
  width: 50%;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#sponsor-modal {
  margin: 20px auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#info-release-container {
  width: fit-content;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
}

#info-release-container label {
  white-space: nowrap;
  margin-right: 10px;
}

.modal-content button {
  margin-top: 15px;
}

/* Responsive design for smaller screens */
@media screen and (max-width: 600px) {
  #form-container,
  #review-container {
    width: 90%;
  }
}

.loader {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: auto;
  margin-top: 20px;
}

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

/* show/hide password*/
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #042a49;
  font-size: 18px;
  z-index: 1;
}
