/* ===== ERGO 360 Quiz Styles ===== */

/* ========================================
   入场动画初始状态 - GSAP 控制动画
   ======================================== */
.ergo-360-quiz__title,
.ergo-360-quiz__subtitle {
  opacity: 0;
}

.ergo-360-quiz__title-normal {
  font-weight: normal;
}

.ergo-360-quiz__title-bold {
  font-weight: bold;
}

/* ========================================
   卡片动画
   ======================================== */
.ergo-360-quiz__card {
  opacity: 0;
}

.ergo-360-quiz__card.is-visible {
  opacity: 1;
}

/* 卡片滑动容器 */
.ergo-360-quiz__slider {
  position: relative;
}

.ergo-360-quiz__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========================================
   选项样式
   ======================================== */
.ergo-360-quiz__option {
  transition: transform 0.2s ease-out;
}

.ergo-360-quiz__option:active {
  transform: scale(0.98);
}

/* 选项 hover 背景色 */
.ergo-360-quiz__option-wrapper {
  transition: background-color 300ms ease-out;
  background-color: transparent;
}

.ergo-360-quiz__option:hover .ergo-360-quiz__option-wrapper {
  background-color: #F7F7F7;
}

/* Checkbox 始终显示 - 未选中状态 */
.ergo-360-quiz__checkmark {
  display: flex !important;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  background-color: transparent;
}

/* Checkbox 选中状态 */
.ergo-360-quiz__option[data-selected] .ergo-360-quiz__checkmark {
  background-color: #134BD6;
  border-color: #134BD6;
}

/* 选中时 checkbox 内的勾选图标显示 */
.ergo-360-quiz__option[data-selected] .ergo-360-quiz__checkmark svg {
  display: block !important;
}

/* 移动端选项样式 */
.ergo-360-quiz__option--mobile {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 5px;
  gap: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.3) !important;
  border-radius: 12px;
  transition: border-color 0.2s ease-out;
}

.ergo-360-quiz__option--mobile[data-selected] {
  border: 1.5px solid #134BD6 !important;
}

.ergo-360-quiz__option--mobile[data-selected]::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 24px;
  height: 24px;
  background-color: #134BD6;
  border-radius: 0 12px 0 8px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='10' viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5L4.5 8.5L11 1.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 10px;
}

/* 移动端选项内部元素样式 */
.ergo-360-quiz__option--mobile .ergo-360-quiz__option-image {
  width: 66px !important;
  height: 66px !important;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
}

.ergo-360-quiz__option--mobile .ergo-360-quiz__option-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.35;
  color: #000;
  text-align: center;
  width: 136px;
}

/* ========================================
   进度条动画
   ======================================== */
.ergo-360-quiz__progress > div {
  transition: background-color 0.3s ease-out;
}

/* ========================================
   输入框样式
   ======================================== */
.ergo-360-quiz__input::-webkit-outer-spin-button,
.ergo-360-quiz__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ergo-360-quiz__input[type=number] {
  -moz-appearance: textfield;
}

.ergo-360-quiz__input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

/* 邮箱输入框 */
.ergo-360-quiz__email {
  border: 1px solid rgba(0, 0, 0, 0.30) !important;
}

.ergo-360-quiz__email:focus {
  border-color: #134BD6 !important;
}

.ergo-360-quiz__email::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

/* ========================================
   按钮效果
   ======================================== */
.ergo-360-quiz__back {
  z-index: 10;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.ergo-360-quiz__back:hover,
.ergo-360-quiz__skip:hover {
  opacity: 0.7;
}

.ergo-360-quiz__next:hover,
.ergo-360-quiz__submit:hover {
  background-color: #0f3da8;
}

/* ========================================
   结果卡片动画
   ======================================== */
.ergo-360-quiz__result-content,
.ergo-360-quiz__success-content {
  animation: result-fade-in 0.5s ease-out forwards;
}

@keyframes result-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Card 5 内部状态切换动画
   ======================================== */
.ergo-360-quiz__step5-input,
.ergo-360-quiz__step5-result,
.ergo-360-quiz__step5-success {
  transition: opacity 0.3s ease-out;
}

.ergo-360-quiz__step5-input.is-fading-out,
.ergo-360-quiz__step5-result.is-fading-out,
.ergo-360-quiz__step5-success.is-fading-out {
  opacity: 0;
}

.ergo-360-quiz__step5-input.is-fading-in,
.ergo-360-quiz__step5-result.is-fading-in,
.ergo-360-quiz__step5-success.is-fading-in {
  animation: step5-state-fade-in 0.5s ease-out forwards;
}

@keyframes step5-state-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========================================
   单位切换器样式
   ======================================== */

/* PC端切换器导航 */
.ergo-360-quiz__unit-nav {
  width: 326px;
}

/* 移动端切换器导航 */
.ergo-360-quiz__unit-nav--mobile {
  width: 204px;
}

/* 单位切换按钮 - PC端 */
.ergo-360-quiz__unit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 158px;
  height: 38px;
  border-radius: 16px;
  font-family: 'Borna', sans-serif;
  font-weight: 500;
  font-size: 19px;
  text-transform: uppercase;
  color: #33363e;
  background: transparent;
  transition: all 0.2s ease-out;
  cursor: pointer;
  border: none;
  padding: 0;
}

.ergo-360-quiz__unit-btn[data-selected] {
  background: white;
  color: #134BD6;
  font-weight: 600;
}

.ergo-360-quiz__unit-btn:hover:not([data-selected]) {
  background: rgba(255, 255, 255, 0.5);
}

/* 单位切换按钮 - 移动端 */
.ergo-360-quiz__unit-btn--mobile {
  width: 100px;
  height: 28px;
  font-size: 16px;
}

/* ========================================
   响应式调整
   ======================================== */
@media screen and (max-width: 767px) {
  .ergo-360-quiz__card-inner {
    min-height: auto;
    padding-bottom: 24px;
  }
}
