.test-answer-item {
  list-style: none;
  margin: 8px 0;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.test-answer-item input[type="checkbox"],
.test-answer-item input[type="radio"] {
  margin-right: 8px;
  cursor: pointer;
}

.test-answer-item label {
  cursor: pointer;
  user-select: none;
}

.test-answer-item input:disabled {
  cursor: not-allowed;
}

.test-answer-item input:disabled+label {
  cursor: not-allowed;
}

/* Правильный выбранный ответ */
.test-answer-item.test-correct {
  background-color: #d4edda;
  border-left: 4px solid #28a745;
}

/* Неправильный выбранный ответ */
.test-answer-item.test-incorrect {
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
}

/* Правильный, но не выбранный ответ */
.test-answer-item.test-missed {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
}

/* ========== СТИЛИ ДЛЯ DROPDOWN ========== */
.custom-dropdown-container {
  margin-top: 5px;
  background-color: white;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
  position: relative;
}

.custom-dropdown-container.completed {
  pointer-events: all;
}

.custom-dropdown-container.correct {
  background-color: #d4edda;
  border-color: #28a745;
  animation: pulse 0.5s ease-in-out;
}

.custom-dropdown-container.incorrect {
  background-color: #f8d7da;
  border-color: #dc3545;
  animation: shake 0.5s ease-in-out;
}

.custom-dropdown-button {
  position: relative;
  padding: 0px 36px 0px 6px;
  background-color: white;
  border: 2px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  line-height: 1.5;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.custom-dropdown-button:hover:not(.disabled) {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.custom-dropdown-button.active {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.custom-dropdown-button.disabled {
  cursor: not-allowed;
  background-color: #f5f5f5;
  opacity: 0.7;
}

.custom-dropdown-button.correct {
  border-color: #28a745;
  background-color: #d4edda;
}

.custom-dropdown-button.incorrect {
  border-color: #dc3545;
  background-color: #f8d7da;
}

.dropdown-placeholder {
  flex: 1;
  color: #666;
}

.custom-dropdown-button:not(.disabled) .dropdown-placeholder {
  color: #333;
}

.dropdown-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #666;
  transition: transform 0.2s ease;
}

.custom-dropdown-button.active .dropdown-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.custom-dropdown-list {
  position: absolute;
  width: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background-color: white;
  border: 2px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

.custom-dropdown-option {
  padding: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  line-height: 1.5;
  border-bottom: 1px solid #f0f0f0;
}

.custom-dropdown-option:last-child {
  border-bottom: none;
}

.custom-dropdown-option:hover {
  background-color: #f0f7ff;
}

.custom-dropdown-option:active {
  background-color: #e0f0ff;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px);
  }

  75% {
    transform: translateX(10px);
  }
}

.custom-dropdown-list::-webkit-scrollbar {
  width: 8px;
}

.custom-dropdown-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.custom-dropdown-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.custom-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ========== СТИЛИ ДЛЯ RADIO/CHECKBOX ========== */
.test-answer-item {
  list-style: none;
  margin: 8px 0;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.test-answer-item input[type="checkbox"],
.test-answer-item input[type="radio"] {
  margin-right: 8px;
  cursor: pointer;
}

.test-answer-item label {
  cursor: pointer;
  user-select: none;
}

.test-answer-item input:disabled {
  cursor: not-allowed;
}

.test-answer-item input:disabled+label {
  cursor: not-allowed;
}

.test-answer-item.test-correct {
  background-color: #d4edda;
  border-left: 4px solid #28a745;
}

.test-answer-item.test-incorrect {
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
}

.test-answer-item.test-missed {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
}

/* ========== RESPONSIVE ========== */
@media screen and (max-width: 768px) {
  .custom-dropdown-button {
    font-size: 14px;
    min-height: 40px;
  }

  .custom-dropdown-option {
    padding: 10px;
    font-size: 14px;
  }
}