/* Стили для блока согласия */
.consent-block {
  margin: 20px 0;
  padding: 0 15px;
}

/* Кастомный чекбокс */
.consent-checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
  padding-left: 225px;
  user-select: none;
}

/* Скрываем стандартный чекбокс */
.consent-checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Кастомный квадратик */
.checkmark {
  position: absolute;
  top: 0;
  left: 195px;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: all 0.2s ease;
}

/* При наведении */
.consent-checkbox-label:hover input ~ .checkmark {
  background-color: #e0e0e0;
}

/* Когда чекбокс включен */
.consent-checkbox-label input:checked ~ .checkmark {
  background-color: #2196F3;
  border-color: #2196F3;
}

/* Галочка */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.consent-checkbox-label input:checked ~ .checkmark:after {
  display: block;
}

.consent-checkbox-label .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Текст согласия */
.consent-text {
  color: #333;
}

/* Ссылка на правила */
.rules-link {
  color: #2196F3;
  text-decoration: underline;
  cursor: pointer;
}

.rules-link:hover {
  color: #0b7dda;
}

/* Ошибка */
.consent-error {
  color: #f44336;
  font-size: 12px;
  margin-top: 5px;
  padding-left: 30px;
}

/* Модальное окно с правилами */
.rules-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  overflow: auto;
}

.rules-modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 70%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 10000;
}

.rules-modal-close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 10;
  background: transparent;
  padding: 0 5px;
}

.rules-modal-close:hover {
  color: black;
}

.rules-text {
  margin-top: 20px;
  line-height: 1.5;
  font-size: 14px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 10px;
  margin-bottom: 20px;
}

.rules-text p {
  margin: 10px 0;
}

.rules-text ul {
  margin: 10px 0;
  padding-left: 20px;
}

/* Кнопка "Я ознакомлен" */
.agree-rules-btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 10px;
}

.agree-rules-btn:hover {
  background-color: #45a049;
}

/* Стили для disabled чекбокса */
.consent-checkbox-label input:disabled ~ .checkmark {
  background-color: #f0f0f0;
  border-color: #ddd;
  cursor: not-allowed;
}

.consent-checkbox-label input:disabled ~ .consent-text {
  color: #999;
}

/* Анимация активации */
@keyframes consentActivate {
  0% { background-color: #fff9c4; transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { background-color: transparent; transform: scale(1); }
}

.consent-activated {
  animation: consentActivate 0.5s ease;
}