/* 
 * Красивые чекбоксы для фильтров в каталоге
 * Замена стандартных .custom-control-input на современные стили
 */

/* Скрываем старые checkbox/radio */
.catalog-public .custom-control-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Базовая стилизация label */
.catalog-public .custom-control-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 0;
  position: relative;
  user-select: none;
  transition: color 0.2s ease;
}

/* Псевдо-checkbox перед текстом */
.catalog-public .custom-control-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.30);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

/* Галочка (checked) */
.catalog-public .custom-control-input:checked + .custom-control-label::before {
  background: var(--color-primary, #ffc107);
  border-color: var(--color-primary, #ffc107);
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
}

/* Иконка "✓" внутри checkbox */
.catalog-public .custom-control-input:checked + .custom-control-label::after {
  content: '✓';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 900;
  color: #000;
  pointer-events: none;
}

/* Hover */
.catalog-public .custom-control-label:hover::before {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.45);
}

.catalog-public .custom-control-input:checked + .custom-control-label:hover::before {
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.6);
}

/* Label hover (текст) */
.catalog-public .custom-control-label:hover {
  color: rgba(255, 255, 255, 1);
}

.catalog-public .custom-control-input:checked + .custom-control-label {
  color: var(--color-primary, #ffc107);
  font-weight: 700;
}

/* Radio buttons (для даты добавления) */
.catalog-public input[type="radio"].custom-control-input + .custom-control-label::before {
  border-radius: 50%;
}

.catalog-public input[type="radio"].custom-control-input:checked + .custom-control-label::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
}

/* Тема: Light / Light Japan */
html[data-theme="light"] .catalog-public .custom-control-label::before,
html[data-theme="light_japan"] .catalog-public .custom-control-label::before {
  border-color: rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .catalog-public .custom-control-input:checked + .custom-control-label::before,
html[data-theme="light_japan"] .catalog-public .custom-control-input:checked + .custom-control-label::before {
  background: var(--color-primary, #22c55e);
  border-color: var(--color-primary, #22c55e);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

html[data-theme="light"] .catalog-public .custom-control-input:checked + .custom-control-label::after,
html[data-theme="light_japan"] .catalog-public .custom-control-input:checked + .custom-control-label::after {
  color: #fff;
}

html[data-theme="light"] .catalog-public .custom-control-label,
html[data-theme="light_japan"] .catalog-public .custom-control-label {
  color: rgba(0, 0, 0, 0.85);
}

html[data-theme="light"] .catalog-public .custom-control-input:checked + .custom-control-label,
html[data-theme="light_japan"] .catalog-public .custom-control-input:checked + .custom-control-label {
  color: var(--color-primary, #22c55e);
}

/* Тема: Neon */
html[data-theme="neon"] .catalog-public .custom-control-input:checked + .custom-control-label::before {
  background: linear-gradient(135deg, var(--color-neon-purple, #a855f7), var(--color-neon-cyan, #06b6d4));
  border-color: var(--color-neon-purple, #a855f7);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

html[data-theme="neon"] .catalog-public .custom-control-input:checked + .custom-control-label {
  color: var(--color-neon-cyan, #06b6d4);
}

/* Компактность на мобилке */
@media (max-width: 576px) {
  .catalog-public .custom-control-label {
    font-size: 13px;
  }
  .catalog-public .custom-control-label::before {
    width: 16px;
    height: 16px;
    margin-right: 8px;
  }
}