/**
 * Quest Block Frontend Styles
 */

.quest-container {
  background-color: #f6f9ff;
  border-radius: 1rem;
  padding: 2rem 1rem;
  text-align: center;
}
.quest-question h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.6875rem;
  margin-bottom: 1.375rem;
  margin-top: 1rem;
  padding-bottom: 0;
}
.quest-form {
  /* align-items: center; */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
}
.quest-options {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
  margin: 20px 0;
  width: 100%;
}
.quest-option {
  align-items: center;
  background-color: #fff;
  border: 0.0625rem solid #e9ebec;
  border-radius: 0.5rem;
  color: #07142b;
  cursor: pointer;
  display: flex;
  font-size: 1.125rem;
  font-weight: 600;
  gap: 0.0625rem;
  justify-content: center;
  line-height: 1.6875rem;
  padding: 0.75rem 2.625rem;
  position: relative;
  width: 100%;
}
.quest-option input[type="checkbox"],
.quest-option input[type="radio"] {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 0.0625rem;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 0.0625rem;
}

/* Default unchecked state */
.quest-option {
  transition: all 0.3s ease;
}

/* Checked state - using :has() selector for modern browsers */
.quest-option:has(input[type="checkbox"]:checked),
.quest-option:has(input[type="radio"]:checked) {
  background-color: #054bbb;
  border-color: #054bbb;
}

.quest-option:has(input[type="checkbox"]:checked) label,
.quest-option:has(input[type="radio"]:checked) label,
.quest-option:has(input[type="checkbox"]:checked) .quest-option-text,
.quest-option:has(input[type="radio"]:checked) .quest-option-text {
  color: #fff;
}

/* Fallback for browsers that don't support :has() - using class-based approach */
.quest-option.is-checked {
  background-color: #054bbb;
  border-color: #054bbb;
  position: relative;
}

/* .quest-option.is-checked::before {
    content: "";
    position: absolute;
    inset: 0 0 0 16px;
    background-image: url('data:image/svg+xml;utf8,<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.7483 3.17946C16.0839 3.5151 16.0839 4.05784 15.7483 4.38991L6.3218 13.8199C5.98616 14.1556 5.44343 14.1556 5.11136 13.8199L0.25173 8.96389C-0.0839098 8.62825 -0.0839098 8.08551 0.25173 7.75344C0.587369 7.42137 1.1301 7.4178 1.46217 7.75344L5.71123 12.0025L14.5343 3.17946C14.8699 2.84382 15.4126 2.84382 15.7447 3.17946H15.7483Z" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-position: left;
    background-size: 1rem;
    pointer-events: none;
} */

.quest-option.is-checked label,
.quest-option.is-checked .quest-option-text {
  color: #fff;
}

.quest-option label {
  font-size: 1.125rem;
  font-weight: 600;
  color: #07142b;
  line-height: 1.6875rem;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}
.quest-description {
  margin: 0 0 20px 0;
  font-size: 16px;
  color: #666;
  line-height: 1.6;
}
.quest-option label svg {
  height: 1rem;
  width: 1rem;
  display: inline-block;
}
@media only screen and (min-width: 768px) {
  .quest-container {
    padding: 2rem 3.5rem;
    text-align: left;
    margin: 30px auto;
    max-width: 46.875rem;
  }
  .quest-question h3 {
    color: #07142b;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 2.025rem;
  }
  .quest-form {
    align-items: flex-start;
  }
  .quest-option,
  .quest-option label {
    justify-content: flex-start;
  }
  .quest-option label svg {
    left: 0.9375rem;
    position: absolute;
    top: 1.03125rem;
  }
}

/* .quest-option input[type="radio"],
.quest-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0 12px 0 0;
  cursor: pointer;
  flex-shrink: 0;
} */

/* .quest-option input[type="radio"]:checked,
.quest-option input[type="checkbox"]:checked {
  accent-color: #0073aa;
} */

/* .quest-option input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
} */

.quest-option-text {
  line-height: 1.5;
}

.quest-submit-btn {
  background-color: #a31818;
  border: none;
  color: #fff;
  border-radius: 5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1rem;
  margin-left: 0;
  overflow: hidden;
  padding: 1rem 1.875rem;
  position: relative;
  width: 100%;
}
.zety-br .quest-submit-btn {
  background-color: #ffc85e;
  color: #07142b;
}

.quest-submit-btn:hover {
  background-color: #df2626;
}
.zety-br .quest-submit-btn:hover {
  background-color: #fbaf3b;
  color: #07142b;
}

.quest-submit-btn:disabled {
  background-color: #dadddf;
  color: #bdc1c7;
  cursor: not-allowed;
}

.quest-message {
  margin-top: 15px;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.quest-message.quest-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

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

/* .quest-result {
  margin-top: 25px;
  padding: 20px;
  background: #e7f5ff;
  border: 1px solid #b3d9ff;
  border-radius: 6px;
  text-align: center;
} */

.quest-result-text {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 600;
  color: #054bbb;
}

/* Quest Results Display with Progress Bars */
.quest-results-container {
  background-color: #f6f9ff;
  border-radius: 0.5rem;
  padding: 0;
  margin: 0;
}

.quest-thank-you {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.4375rem;
  padding-bottom: 1.875rem;
}

.quest-checkmark {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.quest-thank-you .quest-result-text {
  color: #054bbb;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.6875rem;
  margin: 0;
}

.quest-results-options {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

/* .quest-result-option {
  background-color: #fff;
  border: 0.0625rem solid #e9ebec;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  width: 100%;
} */

/* .quest-result-option.quest-user-selected {
  background-color: #e6f0ff;
  border-color: #054bbb;
} */

.quest-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.quest-result-option-title {
  color: #07142b;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.6875rem;
  text-align: left;
  flex: 1;
}

.quest-result-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.quest-result-count {
  color: #666d77;
  font-size: 1.125rem;
  font-weight: 600;
  /* white-space: nowrap; */
}

.quest-result-percentage {
  color: #07142b;
  font-size: 1.125rem;
  font-weight: 600;
  min-width: 3rem;
  text-align: right;
}

.quest-progress-bar {
  width: 100%;
  height: 2rem;
  background-color: #3983fa1f;
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
}

.quest-progress-fill {
  height: 100%;
  background-color: #054bbb;
  border-radius: 0.5rem;
  transition: width 0.6s ease;
}

.quest-result-option.quest-user-selected .quest-progress-fill {
  background-color: #054bbb;
}

@media only screen and (min-width: 768px) {
  /* .quest-thank-you .quest-result-text {
    font-size: 1.5rem;
    line-height: 2.025rem;
  } */

  .quest-results-options {
    gap: 1.25rem;
  }

  /* .quest-result-option {
    padding: 1rem 1.5rem;
  } */
}

.quest-postfix {
  margin: 0;
  font-size: 14px;
  color: #666;
}

/* .quest-completed {
  opacity: 0.95;
} */

.quest-completed .quest-option {
  background: #f5f5f5;
}

.quest-completed .quest-option input:checked + .quest-option-text {
  font-weight: 600;
  color: #0073aa;
}

.quest-error {
  padding: 15px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .quest-container {
    padding: 20px;
    margin: 30px auto;
  }

  .quest-question h3 {
    font-size: 20px;
  }

  /* .quest-description,
  .quest-option label {
    font-size: 14px;
  } */

}
