body {
  font-family: Arial, sans-serif;
  background: #304BB1; /* Soft blue background */
  margin: 0;
  padding: 0;
}

h2, p, small {
  padding-left: 5%;
  padding-right: 5%;
  line-height: 1.5;
}

#surveyTitle {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: -5px;
}

#surveyInstruction {
  margin-top: 20px;
}


small {
  margin-bottom: 20px;
}

/* --- If needed, revert to previous background: background: #f7f7f7; --- */

.sv-header__description {
  display: none !important;
}

#completionMessage, #errorMessage {
  padding-left: 5%;
  padding-right: 5%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, #304BB1 0%, #05BDFF 100%); /* match body bg, slightly overlay */
  z-index: 2100;
  font-size: 1.25rem;
  color: #fff;
  text-align: center;
  line-height: 1.5;
}

#directAssessment {
  text-align: center;
}

#directAssessment small {
  padding-left: 0% !important;
  padding-right: 0% !important;
}

#directAssessment a {
  text-decoration: underline !important;
  font-weight: bold !important;
}

#typeformEmbed { 
  width: 90%;
  max-width: 800px;
  margin: 10px auto 20px;
}

/* Modal overlay for completionModal */
.modal-overlay {
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  padding: 32px 28px 24px 28px;
  border-radius: 14px;
  max-width: 400px;
  width: 90vw;
  box-shadow: 0 2px 18px rgba(0,0,0,0.13);
  margin: auto;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}

.modal-title {
  margin-top: 0;
}

.modal-form-group {
  margin-bottom: 18px;
}

.modal-label {
  display: block;
  margin-bottom: 6px;
}

.modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #bcbcbc;
  font-size: 1rem;
}

.modal-submit-btn {
  background: #304BB1;
  color: #fff;
  padding: 10px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

/* Hide SurveyJS required asterisk */
.sv-question__required-text {
  display: none !important;
}

.surveyCloseDiv {
  z-index: 9999;
  position: absolute;
  top: 10px;
  right: 20px;
}

.surveyClose {
  color: white;
  font-weight: bold;
  font-size: 2rem;
}


.custom-rating .sv-rating {
  font-size: 12px !important;
}

#completionMessage button {
  margin: 16px 8px 0 8px;
  padding: 10px 22px;
  border: none;
  border-radius: 6px;
  background: #78D44F;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: background 0.18s, transform 0.12s;
}

/* Ensure result buttons are stacked vertically with spacing */
#viewResultsButton {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 16px 8px 0 8px;
}

#viewAdministerResultButton button {
  color: white;
  border: white 1px solid;
  padding: 5px 20px;
  margin-top: 10px;
  border-radius: 10px;
  display: block;
}

/* Custom Confirmation Modal Styles */
#customConfirmOverlay, #unlockConfirmOverlay, #unlockViewConfirmOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}
#customConfirmModal, #unlockConfirmModal, #unlockViewConfirmModal {
  background: #fff;
  border-radius: 10px;
  padding: 32px 24px 20px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  max-width: 350px;
  width: 90%;
  text-align: center;
  z-index: 10001;
}
#customConfirmModal p {
  margin-bottom: 24px;
  font-size: 1.1rem;
}
#unlockConfirmModal p, #unlockViewConfirmModal p {
  margin-bottom: 16px;
  font-size: 1.1rem;
}
#customConfirmModal .custom-confirm-btn, #unlockConfirmModal .custom-confirm-btn, #unlockViewConfirmModal .custom-confirm-btn {
  background: #304BB1;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 1rem;
  margin: 0 10px;
  cursor: pointer;
}
/* #customConfirmModal .custom-cancel-btn {
  background: #e0e0e0;
  color: #333;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 1rem;
  margin: 0 10px;
  cursor: pointer;
} */

/* #unlockConfirmModal .custom-confirm-btn {
  padding: 10px 22px;
  border: none;
  border-radius: 6px;
  background: #78D44F;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: background 0.18s, transform 0.12s;
} */

#completionMessage button:hover, #completionMessage button:focus {
  background: #304BB1;
  transform: translateY(-2px) scale(1.04);
  outline: none;
}

.container {
  max-width: 1000px;
  margin: 40px auto;
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

#surveyContainer {
  margin-top: -250px;
}

#loadingOverlay, #submitOverlay, #exitOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#exitOverlay {
  z-index: 10001;
}

#loadingOverlay > div {
  text-align: center;
}

#loadingOverlay .spinner {
  display: block;
  margin: 0 auto;
}

#loadingOverlay div:last-child {
  margin-top: 16px;
  font-size: 18px;
  color: #555;
  text-align: center;
}

.sv-question__title {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 16px;
}

.sv-item, .sv-radio__label, .sv-radio__decorator {
  border-radius: 8px !important; /* Slightly rounded corners */
  background: #f9f9f9 !important;
  border: none !important;
  padding: 6px 18px !important;
  font-size: 0.97rem;
  font-weight: 300 !important; /* Lighter font */
  margin-bottom: 0 !important;
  transition: background 0.2s, border 0.2s;
  box-shadow: none !important;
}

.sv-rating__item-text {
  border-radius: 15px;
  padding-right: 18px;
  padding-left: 18px;
  color: #304BB1;
  border-color: #304BB1;
  background: transparent;
  transition: background 0.18s;
}
.sv-rating__item:hover .sv-rating__item-text {
  color: #304BB1 !important;
  background-color: white !important;
}
.sv-rating__item.sv-rating__item--selected .sv-rating__item-text {
  background: #304BB1 !important;
  color: white !important;
}

.sv-rating > fieldset {
  display: flex !important;
  gap: 5px !important;
  width: 100% !important;
  align-items: stretch !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sv-rating__item {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  /* Make sure the button grows as needed */
  height: auto !important;
  padding: 0 !important;
  text-align: center !important;
}

.sv-rating__item-text {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

.sv_q_rating .sv-string-viewer {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.sv-rating__item-text>span {
  margin-bottom: .44em !important;
}

@media (max-width: 679px) {
  #surveyContainer {
    margin-top: 24px;
  }
  
  .sv-rating > fieldset {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .sv-rating__item {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
  }
}

/* SurveyJS navigation buttons */
.sv-btn, .sv-footer__complete-btn {
  background: #304BB1 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 22px !important;
  padding: 10px 32px !important;
  font-size: 1.05rem !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: background 0.18s, box-shadow 0.18s;
  outline: none !important;
}
.sv-btn:hover, .sv-footer__complete-btn:hover {
  background: #304BB1 !important;
  box-shadow: 0 4px 18px rgba(110,135,198,0.12);
}
.sv-footer__next-btn, .sv-footer__prev-btn {
  background: transparent !important;
  color: #304BB1 !important;
  border: none !important;
  border-radius: 22px !important;
  padding: 10px 32px !important;
  font-size: 1.05rem !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  transition: none !important;
  outline: none !important;
}
.sv-footer__next-btn:hover, .sv-footer__prev-btn:hover {
  box-shadow: none !important;
  transition: none !important;
  font-weight: bold !important;
  background: transparent !important;
}

@media (max-width: 400px) {
  .sv-footer__next-btn, .sv-footer__prev-btn {
    margin-left: 8px !important;
    margin-right: 8px !important;
  }
}

@media (max-width: 350px) {
  .sv-footer__next-btn, .sv-footer__prev-btn {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}


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

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #304BB1;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: auto;
}

#typeformEmbed [data-tf-live] {
  width: 100%;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  #typeformEmbed [data-tf-live] {
    height: 500px;
  }
  #completionMessage {
    overflow-y: scroll;
    padding-top:15px;
    justify-content: start;
  }
}
