/* Стили для формы промокода */
.promocode-form-container {
  margin: 20px 0;
  font-family: inherit;
}

.promocode-form {
  background: transparent;
}

.promocode-input-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.promocode-input-group label {
  font-size: 56px;
  color: #fff;
  font-family: inherit;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0;

  @media screen and (max-width: 1024px) {
    font-size: 16px;
  }
}

.promocode-input-group input[type="text"] {
  padding: 15px 18px;
  font-size: 56px;
  transition: border-color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  width: 100%;

  @media screen and (max-width: 1024px) {
    font-size: 16px;
  }
}

.promocode-input-group input[type="text"]:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.promocode-input-group button {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: none;
  font-size: 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;

  @media screen and (max-width: 1024px) {
    font-size: 16px;
  }
}

.promocode-input-group button:hover {
  color: #fff;
}

.promocode-input-group button:active {
  color: #fff;
}

.promocode-result {
  min-height: 50px;
  padding: 15px;
  margin-top: 15px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  border-image: linear-gradient(0deg, #eaeaea 0%, rgba(255, 255, 255, 0) 100%);
  border-image-slice: 1;
  text-align: center;
  font-size: 56px;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  font-family: inherit;
}

.promocode-result.show {
  opacity: 1;
  transform: translateY(0);
}

.promocode-result.success {
  color: #fff;
}

.promocode-result.error {
  color: #fff;
  border-image: linear-gradient(0deg, #ff0000 0%, rgba(255, 255, 255, 0) 100%);
  border-image-slice: 1;
}

/* Стили для квиза */
.quiz-container {
  width: 100%;
  margin: 20px 0;
  font-family: inherit;
  background: #000; /* TODO: remove */
}

.quiz-form {
  background: transparent;
}

.quiz-question {
  margin-bottom: 40px;
  padding: 25px;
  background: transparent;
}

.quiz-question h4 {
  color: #fff;
  font-size: 48px;
  margin: 0;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 300;

  @media screen and (max-width: 1024px) {
    font-size: 18px;
  }
}

.quiz-answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 15px;
}

.quiz-answers:has(img) {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.quiz-answer {
  display: block;
  padding: 15px;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  font-size: 32px;
}

.quiz-answer:hover {
}

.quiz-answer.selected {
}

.quiz-answer input[type="radio"],
.quiz-answer input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

.quiz-answer input[type="radio"]:checked + span,
.quiz-answer input[type="checkbox"]:checked + span,
.quiz-answer.selected span {
  color: #fff;
  font-size: 32px;
  font-weight: 500;
}

.quiz-answer input[type="radio"]:checked ~ img,
.quiz-answer input[type="checkbox"]:checked ~ img,
.quiz-answer.selected img {
  border-radius: 0;
  border-width: 3px;
  border-color: #fff;
}

.quiz-answer:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 70px;
  height: 70px;
  border: 1px solid #fff;
  background: transparent;
  transition: all 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.quiz-answer.selected:before {
  background: transparent;
}
.quiz-answer.selected:after {
  content: "";
  position: absolute;
  top: 17.5px;
  left: 17.5px;
  width: 35px;
  height: 35px;
  border: 1px solid #fff;
  background: #fff;
  transition: all 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.quiz-answer:has(img):before,
.quiz-answer:has(img):after {
  opacity: 0;
}

.quiz-answer img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin-bottom: 10px;
  border: 3px solid transparent;
  transition: border-color 0.3s ease;
}

.quiz-answer span {
  display: block;
  font-size: 32px;
  line-height: 1.4;
  color: #fff;
  padding-left: 100px;
}

.quiz-submit-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 18px 40px;
  font-size: 32px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  margin: 40px auto 0;
  min-width: 200px;
}

.quiz-submit-btn:hover {
  background: #163146;
  color: #fff;
}

.quiz-submit-btn:active {
}

.quiz-result {
  margin-top: 30px;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  opacity: 0;
  transform: translateY(-15px);
  transition: all 0.4s ease;
}

.quiz-result.show {
  opacity: 1;
  transform: translateY(0);
}

.quiz-result.success {
  background: transparent;
  color: #fff;
  border: 2px solid transparent;
}

.quiz-result.error {
  background: transparent;
  color: #fff;
  border: 2px solid transparent;
  border-image: linear-gradient(0deg, #ff0000 0%, rgba(255, 255, 255, 0) 100%);
  border-image-slice: 1;
}

.quiz-promocode {
  margin-top: 20px;
  padding: 20px;
  background: transparent;
  border: 2px solid transparent;
  border-image: linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
  border-image-slice: 1;
  border-radius: 0;
}

.quiz-promocode h4 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 20px;
}

.quiz-promocode-code {
  font-family: monospace;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
  background: transparent;
  padding: 10px 20px;
  border-radius: 0;
  border: 2px dashed #fff;
  display: inline-block;
}

/* Адаптивность */
@media (max-width: 768px) {
  .promocode-form-container,
  .quiz-container {
    margin: 10px;
  }

  .promocode-form,
  .quiz-form {
    padding: 20px;
  }

  .promocode-input-group {
    flex-direction: column;
  }

  .quiz-answers {
    grid-template-columns: 1fr;
  }

  .quiz-answer img {
    height: 120px;
  }
}

/* Анимации загрузки */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading button {
  position: relative;
}

.loading button:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Стили для пошагового квиза */
.quiz-progress {
  /* margin-bottom: 30px; */
  padding: 20px;
  background: transparent;
  border-radius: 0;
}

.quiz-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 15px;
}

.quiz-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 0;
  transition: width 0.3s ease;
}

.quiz-progress-text {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
}

.quiz-step {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.quiz-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-question-title {
  color: #fff;
  font-size: 48px;
  margin: 0 0 30px 0;
  line-height: 1.2;
  font-weight: 300;
  padding: 25px;
  background: transparent;
}

@media screen and (max-width: 1024px) {
  .quiz-question-title {
    font-size: 20px;
    padding: 15px;
  }
}

.quiz-navigation {
  display: flex;
  align-items: center;
  margin-top: 40px;
  padding: 0;
  gap: 20px;
}

.quiz-btn {
  background: transparent;
  color: #fff;
  border: none;
  padding: 0;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.quiz-btn:hover {
}

button.quiz-btn:disabled,
button.quiz-btn-prev:disabled,
button.quiz-btn-next:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  background: transparent;
  color: #fff;
}

.quiz-btn:active {
  transform: translateY(0);
}

.quiz-btn-prev {
  background: transparent;
}

.quiz-btn-prev:hover {
}

.quiz-btn-prev:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: transparent;
  color: #fff;
}

.quiz-btn-next {
}

.quiz-btn-next:hover {
}

.quiz-btn-submit {
  background: #163146;
  color: #fff;
  font-weight: 300;
  font-size: 32px;
  padding: 15px 30px;
}

.quiz-btn-submit:hover {
  background: #1a252b;
}

@media (max-width: 768px) {
  .quiz-progress {
    padding: 15px;
    margin-bottom: 20px;
  }

  .quiz-progress-text {
    font-size: 16px;
  }

  .quiz-navigation {
    padding: 0 15px;
    flex-direction: column;
    gap: 15px;
  }

  .quiz-btn {
    width: 100%;
    font-size: 16px;
    padding: 12px 20px;
  }

  .quiz-question-title {
    font-size: 18px;
    margin-bottom: 20px;
  }
}
