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

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

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

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

#completionMessage {
  padding-left: 5%;
  padding-right: 5%;
  position: fixed;
  top: 0;
  left: 0;
  width: 90vw;
  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;
}

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

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

#completionMessage button {
  margin: 32px 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;
}

#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 {
  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;
}

#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, .sv-footer__next-btn, .sv-footer__prev-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, .sv-footer__next-btn:hover, .sv-footer__prev-btn:hover {
  background: #304BB1 !important;
  box-shadow: 0 4px 18px rgba(110,135,198,0.12);
}


@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;
}

