/* ########################################## MODAL ########################################## */
.modal {
  font-family: 'Open Sans', Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #415868;
  position: fixed; /* Change to fixed to center relative to the viewport */
  top: 50%;
  left: 50%;
  width: 280px;
  height: 210px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 4px 8px 12px 0 rgba(0, 0, 0, 0.4);
  text-align: center;
  overflow: hidden;
  transform: translate(-50%, -50%); /* Center the modal */
  animation: show-modal 0.5s ease-in-out;
  z-index: 2;
}

.modal.hide {
  animation: hide-modal 0.4s ease-in-out both;
}

.modal img {
  margin-top: 24px;
}
.title {
  display: block;
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
  margin: 14px 0 5px 0;
}
.modal p {
  font-size: 14px;
  font-weight: 300;
  line-height: 19px;
  margin: 0;
  padding: 0 30px;
}
.modal .button {
  position: absolute;
  height: 40px;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2196F3;
  color: #fff;
  line-height: 40px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}
.modal .button:hover {
  background: #1e87f0;
}

.modal .critical-button {
  background: #CC00CC;
}

.modal .critical-button:hover {
  background: #a700a7;
}

.modal .error-button {
  background: #F65656;
}

.modal .error-button:hover {
  background: #EC3434;
}

.modal .success-button {
  background: #4CAF50;
}

.modal .success-button:hover {
  background: #45a049;
}

.modal .warning-button {
  background: #FFC107;
}

.modal .warning-button:hover {
  background: #e0a800;
}

.modal .info-button {
  background: #2196F3;
}

.modal .info-button:hover {
  background: #1e87f0;
}

@keyframes show-modal {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  60% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  80% {
    transform: translate(-50%, -50%) scale(0.95);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes hide-modal {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  20% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(0);
  }
}

/* ########################################## INPUT MODAL ########################################## */

#openModalBtn {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.input-modal {
  display: none; 
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed; 
  z-index: 2; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: hidden; 
  background-color: rgba(0,0,0,0.4); 
}

.input-modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 15% auto; 
  padding: 20px;
  border: 1px solid #888;
  width: 80%; 
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-modal-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.input-modal-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 99%;
  height: 1px;
  background-color: #b9b9b9;
  transform: translateX(-50%);
  border-radius: 10px;
  z-index: 1;
}

.input-modal-header h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

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

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

.modal-input-text {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal-select {
  margin: 10px 0;
}

#submitBtn {
  padding: 10px 20px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#submitBtn:hover {
  background-color: #45a049;
}



/* ########################################## CONFIRMATION MODAL ########################################## */

.confirmation-modal {
  display: none;
  position: fixed;
  font-family: 'Open Sans', Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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);
}

.confirmation-modal-content {
  align-items: center;
  background-color: #fefefe;
  margin: 15% auto;
  padding: 6px;
  border: 1px solid #888;
  width: 20%;
  font-size: 16px;
}

.confirmation-modal-sub-div {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.confirmation-close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
}

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

.confirmation-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.confirmation-modal-button {
  padding: 0.375rem 0.75rem;
  margin: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#confirm-yes {
  background-color: #28a745;
}

#confirm-yes:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

#confirm-no {
  background-color: #dc3545;
}

#confirm-no:hover {
  background-color: #c82333;
  border-color: #bd2130;
}