/* CSS Animations for sliding */
@font-face {
  font-family: "Poppins-Regular";
  src: url(/assets/fonts/Poppins-Regular.ttf);
}

@font-face {
  font-family: "Poppins-SemiBold";
  src: url(/assets/fonts/Poppins-SemiBold.ttf);
}

.exacerbation-questionnaire h1,
.exacerbation-questionnaire h2,
.exacerbation-questionnaire h3,
.exacerbation-questionnaire h4,
.exacerbation-questionnaire h5,
.exacerbation-questionnaire h6,
.exacerbation-questionnaire p,
.exacerbation-questionnaire ul,
.exacerbation-questionnaire ol,
.exacerbation-questionnaire li,
.exacerbation-questionnaire a,
.exacerbation-questionnaire input,
input {
  font-family: "Poppins-Regular", "Montserrat", Arial, Helvetica, sans-serif !important;
}

input::placeholder {
  color: #282829 !important;
  opacity: 1 !important;
}

.exacerbation-questionnaire h1,
.exacerbation-questionnaire h2,
.exacerbation-questionnaire h3,
.exacerbation-questionnaire h4,
.exacerbation-questionnaire h5,
.exacerbation-questionnaire h6,
.exacerbation-questionnaire p,
.exacerbation-questionnaire ul,
.exacerbation-questionnaire ol,
.exacerbation-questionnaire li,
.exacerbation-questionnaire a,
.exacerbation-questionnaire div,
.exacerbation-questionnaire td {
  font-family: "Poppins-Regular", "Montserrat", Arial, Helvetica, sans-serif !important;
}

.exacerbation-questionnaire h1,
.exacerbation-questionnaire h2,
.exacerbation-questionnaire h3,
.exacerbation-questionnaire h4,
.exacerbation-questionnaire h5,
.exacerbation-questionnaire h6 {
  font-weight: 600 !important;
}

.exacerbation-questionnaire h2 {
  margin-bottom: 25px;
}

.exacerbation-questionnaire input,
.exacerbation-questionnaire select {
  text-align: center;
}

.exacerbation-questionnaire {
  background-color: #f5f9fd;
  padding: 40px 100px 50px;
}

h2 {
  margin-bottom: 25px;
}

p {
  line-height: 1.1;
}

.small-text {
  font-size: 12px;
}

input,
select {
  text-align: center;
  line-height: 1.1;
}

.object-fit {
  object-fit: contain;
}

.t-12 {
  font-size: 12px;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.w-100 {
  width: 100%;
}

.w-50 {
  width: 50%;
}

.w-sm-100 {
  width: 100%;
}

.w-sm-70 {
  width: 70%;
}

.w-sm-50 {
  width: 50%;
}

.w-sm-30 {
  width: 30%;
}

.mt-sm-15 {
  margin-top: 15px;
}

.flex-sm-col {
  flex-direction: column;
}

.justify-content-center {
  justify-content: center;
}

.align-items-center {
  align-items: center;
}

#voucherEmail {
  width: 100%;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.slide-in-right {
  animation: slideInRight 0.5s forwards;
}

.slide-out-left {
  animation: slideOutLeft 0.5s forwards;
}

.slide-in-left {
  animation: slideInLeft 0.5s forwards;
}

.slide-out-right {
  animation: slideOutRight 0.5s forwards;
}

.exacerbation-slider {
  position: relative;
  overflow: hidden;
}

/* Height follows visible slide; JS animates height when changing slides (match Asthma/COPD) */
.exacerbation-questionnaire .exacerbation-slider {
  height: fit-content;
  transition: height 0.4s ease;
}

.hf-risk-checker .exacerbation-slider {
  height: 760px !important;
}

.diabetes-risk-checker .exacerbation-slider {
  height: 760px !important;
}

.exacerbation-slider>.starting,
.exacerbation-slider>.section-container,
.exacerbation-slider>.direct-quiz-end {
  width: 100%;
  box-sizing: border-box;
}

.exacerbation-slider>.starting {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.RC-tool-nav {
  display: flex;
  justify-content: space-between;
}

.m-0 {
  margin: 0;
}

.my-25 {
  margin-top: 25px;
  margin-bottom: 25px;
}

.mt-25 {
  margin-top: 25px;
}

.mt-30 {
  margin-top: 30px;
}

.mt-35 {
  margin-top: 35px;
}

.mt-50 {
  margin-top: 50px;
}

.mt-70 {
  margin-top: 70px;
}

.mt-75 {
  margin-top: 75px;
}

.mr-20 {
  margin-right: 20px;
}

.mb-0 {
  margin-bottom: 0px;
}

.mb-25 {
  margin-bottom: 25px;
}

.mb-45 {
  margin-bottom: 45px;
}

.ml-15 {
  margin-left: 15px;
}

.p-10 {
  padding: 10px;
}

.text-center {
  text-align: center;
}

.button {
  padding: 5px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  border: 2px solid;
  transition: 0.3s ease-in;
  max-width: 100%;
  width: auto;
  box-sizing: border-box;
  overflow-wrap: break-word;
  white-space: normal;
}

.button-right {
  float: right;
}

.start-button,
.next-button,
/* .prev-button, */
.finish-button,
.reset-button {
  padding: 15px 50px;
}

.blue-button {
  background-color: #29809B;
  color: #ffffff !important;
  border-color: #29809B !important;
}

.blue-button:hover {
  background-color: #ffffff !important;
  color: #29809B !important;
}

.blue-button-outline {
  background-color: #ffffff;
  color: #29809B !important;
  border: 2px solid #29809B;
  transition: 0.3s ease-in-out;
}

.blue-button-outline:hover {
  background-color: #29809B !important;
  color: #ffffff !important;
}

.green-button-outline {
  background-color: #ffffff;
  color: #aed136 !important;
  border: 2px solid #aed136;
  transition: 0.3s ease-in-out;
}

.white-button {
  background-color: #ffffff;
  color: #29809B !important;
  border: 1px solid #ffffff;
}

.white-button:hover {
  background-color: #e1e1e1 !important;
  color: #29809B !important;
}

.white-button:focus {
  background-color: #e1e1e1 !important;
  color: #29809B !important;
}

.red-button {
  background-color: #f53f2a;
  color: #ffffff !important;
  border-color: #f53f2a;
}

.grey-button {
  background-color: #7a7a7a;
  color: #ffffff !important;
  border-color: #7a7a7a;
}

.grey-button:hover {
  background-color: #ffffff !important;
  color: #7a7a7a !important;
}

.gold-button {
  background-color: #fcb01a;
  color: #ffffff !important;
  border-color: #fcb01a;
}

.gold-button:hover {
  background-color: #ffffff !important;
  color: #fcb01a !important;
}

.button-square {
  border-radius: 5px !important;
  padding: 7px 35px !important;
  font-weight: 600;
  transition: 0.3s ease-in;
  line-height: 1.1;
}

a.blue-link {
  color: #29809B;
}

.text-red,
a.red-link,
.w-note {
  /* color: #f53f2a; */
  color: #29809B;
}

a.gold-link {
  color: #fcb01a;
}

a.black-link {
  color: #000000;
}

/* a.button.selected {
  background-color: #fcb01a;
} */

/* .exacerbation-questionnaire a.button.selected {
  background-color: #29809B;
} */

.text-teal {
  color: #29809B !important;
}

.text-seagreen {
  color: #0daca2 !important;
}

.text-grey {
  color: #848484;
}

.text-gold {
  color: #fcb01a;
}

.text-orange {
  color: #f37100;
}

.text-white {
  color: #ffffff;
}

.text-blue {
  color: #004d80;
}

.text-black {
  color: #000000;
}

.exacerbation-question-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.exacerbation-question {
  width: 100%;
  margin-bottom: 15px;
}

.exacerbation-answers-container {
  width: 100%;
  display: flex;
  justify-content: end;
  align-items: center;
}

.exacerbation-a-left,
.exacerbation-a-right {
  width: 100%;
  text-align: center;
}

a.exacerbation-a-left.selected,
a.exacerbation-a-right.invert-color.selected {
  background-color: #AED136;
}

a.exacerbation-a-right.selected,
a.exacerbation-a-left.invert-color.selected {
  background-color: #29809B;
}

.exacerbation-a-right {
  margin-left: 10px;
}

select {
  background-color: #ffffff;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border: 1px solid #282829;
  border-radius: 50px;
  padding: 0 9px;
  font-size: 16px;
}

/* Tooltip text */
.tooltip .tooltiptext {
  visibility: hidden;
  width: 300px;
  background-color: #c6c6c6;
  color: #000;
  border-radius: 4px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  font-size: 9px;

  /* Position the tooltip text above the tooltip element */
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

/* Arrow for the tooltip */
.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  /* At the bottom of the tooltip */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

/* Show the tooltip when hovering over the tooltip container */
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.d-none {
  display: none !important;
}

.results-block {
  width: 100%;
  border: 3px solid #f37100;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0px 0px 3px 2px #bdbdbd;
  flex-direction: column;
}

.results-block-end {
  border: 2px solid #0daca2;
  border-radius: 20px;
  display: flex;
  align-items: stretch;
}

.results-block-end-img-container {
  width: 12%;
  background-color: #00a79e;
  display: flex;
  border-radius: 15px;
  align-items: center;
  justify-content: center;
}

.results-block-end-img {
  flex: 0 0 160px;
  width: 160px;
  max-width: 160px;
  height: auto;
  align-self: stretch;
  object-fit: contain;
  display: block;
}

#exacerbation-results {
  width: 85%;
  padding: 25px;
}

.redeem-block {
  width: 100%;
  background-color: #29809B;
  border-radius: 5px;
  padding: 25px;
  box-shadow: 0px 0px 3px 2px #bdbdbd;
}

/* Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1050;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Modal container */
.modal {
  background: #fff;
  border-radius: 0.3rem;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);

  /* start hidden / up */
  opacity: 0;
  transform: translateY(-25%);
  /* animate both opacity & position on show+hide */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-overlay.show .modal {
  opacity: 1;
  transform: translateY(0);
}

/* Header / Body / Footer */
.modal-header,
.modal-footer {
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1rem;
}

.modal-footer {
  border-top: none;
  display: flex;
  justify-content: flex-end;
}

#pdf-download-link {
  display: inline-block;
  width: 100%;
  text-align: center;
}

/* loading border “spinner” around the button */
@keyframes borderSpin {
  0% {
    border-color: #29809B transparent transparent transparent;
    background-color: #e1e1e1;
  }

  25% {
    border-color: transparent #29809B transparent transparent;
  }

  50% {
    border-color: transparent transparent #29809B transparent;
    background-color: #ffffff;
  }

  75% {
    border-color: transparent transparent transparent #29809B;
  }

  100% {
    border-color: #29809B transparent transparent transparent;
    background-color: #e1e1e1;
  }
}

button.loading {
  position: relative;
  /* make room for the animated border */
  /* padding: calc(0.5rem - 2px) calc(1rem - 2px) !important; */
  border: 2px solid transparent;
  animation: borderSpin 3s linear infinite;
}

/* alert container positioning */
.alert-container {
  /* position: fixed; */
  /* top: 1rem;
  right: 1rem; */
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1100;
}

/* base alert style */
.alert {
  padding: 0.75rem 1.25rem;
  border-radius: 0.25rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

/* success vs error */
.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.testpassbtn {
  margin-top: 15px;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@media screen and (min-width: 600px) {
  .md-text-center {
    text-align: center;
  }

  #pdf-download-link {
    width: inherit;
    text-align: inherit;
  }

  .testpassbtn {
    margin-top: 0px;
  }

  #voucherEmail {
    width: 40%;
  }

  h2 {
    margin-bottom: 45px;
  }

  .pr-md-15 {
    padding-right: 15px;
  }

  .mt-md-0 {
    margin-top: 0;
  }

  .mt-md-75 {
    margin-top: 75px !important;
  }

  .ml-md-15 {
    margin-left: 15px;
  }

  .flex-md-row {
    flex-direction: row;
  }

  .hf-risk-checker .exacerbation-slider {
    height: 540px !important;
  }

  .diabetes-risk-checker .exacerbation-slider {
    height: 560px !important;
  }

  .exacerbation-question {
    width: 75%;
    margin-bottom: inherit;
  }

  .exacerbation-answers-container {
    width: 25%;
    display: flex;
    justify-content: end;
    align-items: center;
  }

  .exacerbation-question-container {
    flex-wrap: nowrap;
  }

  .results-block {
    flex-direction: row;
  }

  .w-md-100 {
    width: 100%;
  }

  .w-md-80 {
    width: 80%;
  }

  .w-md-70 {
    width: 70%;
  }

  .w-md-50 {
    width: 50%;
  }

  .w-md-30 {
    width: 30%;
  }

  #sendVoucherBtn {
    margin-left: 15px;
  }
}

@media screen and (min-width: 1550px) {
  .flex-lg-row {
    flex-direction: row;
  }

  .w-lg-50 {
    width: 50%;
  }

  .mr-lg-20 {
    margin-right: 20px;
  }
}

/* Quiz Results Table Styles */
#quiz-results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 25px;
}

#quiz-results-table th {
  background-color: #29809B;
  color: #ffffff;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border: 1px solid #29809B;
}

#quiz-results-table td {
  padding: 12px;
  border: 1px solid #e1e1e1;
  vertical-align: top;
}

#quiz-results-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

#quiz-results-table tr:hover {
  background-color: #f0f0f0;
}

#quiz-results-table .answer-cell {
  text-align: center;
  width: 80px;
}

.answer-tick {
  color: #AED136 !important;
  font-size: 24px !important;
  font-weight: bold !important;
}

.answer-cross {
  color: #29809B !important;
  font-size: 24px !important;
  font-weight: bold !important;
}

/* Mobile-friendly card layout for exacerbation test */
.exacerbation-mobile-questions {
  display: none;
}

.exac-card {
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  padding: 16px 14px;
  margin-top: 16px;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.exac-question-text {
  margin: 0 0 10px 0;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
}

.exac-scale {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.exac-scale-option {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  font-size: 13px;
}

.exac-scale-option input[type="radio"] {
  margin-bottom: 4px;
}

.exac-scale-option span {
  font-weight: 600;
}

.exac-scale-option input[type="radio"]:checked+span {
  color: #ffffff;
}

.exac-scale-option input[type="radio"]:checked+span,
.exac-scale-option input[type="radio"]:checked~span {
  /* fallback selector if browsers treat + / ~ differently */
}

/* Use :has where supported to style selected pill; non-support still shows radios normally */
.exac-scale-option:has(input[type="radio"]:checked) {
  background-color: #29809B;
  border-color: #29809B;
  color: #ffffff;
}

@media (max-width: 600px) {
  .exacerbation-questionnaire {
    background-color: #f5f9fd;
    padding: 40px 25px 50px;
  }

  .exacerbation-table-wrapper {
    display: none;
  }

  .exacerbation-mobile-questions {
    display: block;
    margin-top: 20px;
  }

  .exacerbation-mobile-questions .exac-question-text {
    font-size: 26px;
    margin: 0;
    padding: 15px 0;
  }

  .exacerbation-mobile-questions .exac-scale {
    display: flex;
    flex-direction: column;
  }

  .exacerbation-mobile-questions .exac-scale-option {
    font-size: 26px;
    border: 2px solid #eee;
  }

  .exacerbation-section-container .prev-button,
  .exacerbation-section-container #exacerbationCalculateButton {
    text-align: center;
  }

  .results-block-end {
    flex-direction: column;
  }

  .results-block-end-img-container {
    width: 100%;
  }

  #exacerbation-results {
    width: 100%;
  }

  .exac-scale-option input {
    display: contents;
  }
}