/* ========================================
   Cookie Consent Banner Styles
   ======================================== */

/* Контейнер баннера */
#cookie-consent-banner {
  position: fixed;
  bottom: 20px;
  right: 80px;
  max-width: 300px;
  width: auto;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 20px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333333;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-sizing: border-box;
  animation: cc-slide-up 0.3s ease-out;
}

/* Анимация появления */
@keyframes cc-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Текст уведомления */
#cookie-consent-banner .cc-text {
  margin: 0;
  padding-right: 20px;
  color: #333333;
}

/* Ссылка в тексте (без рамки) */
#cookie-consent-banner .cc-link {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
  border: none;
  outline: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

#cookie-consent-banner .cc-link:hover {
  color: #0052a3;
  text-decoration: none;
}

#cookie-consent-banner .cc-link:visited {
  color: #0066cc;
}

#cookie-consent-banner .cc-link:focus {
  outline: none;
  box-shadow: none;
}

/* Кнопка закрытия (крестик) */
#cookie-consent-banner .cc-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999999;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

#cookie-consent-banner .cc-close:hover {
  color: #333333;
  background-color: #f0f0f0;
}

#cookie-consent-banner .cc-close:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* Кнопка "Согласен" (ЖЕЛТАЯ С ЧЕРНЫМ ТЕКСТОМ) */
#cookie-consent-banner .cc-agree {
  background-color: #FFD700;
  color: #000000;
  border: none;
  border-radius: 25px;
  padding: 10px 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

#cookie-consent-banner .cc-agree:hover {
  background-color: #FFC107;
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
  transform: translateY(-1px);
}

#cookie-consent-banner .cc-agree:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

#cookie-consent-banner .cc-agree:focus {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/* ========================================
   Адаптивность (мобильные устройства)
   ======================================== */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 1024px) {
  #cookie-consent-banner {
    right: 40px;
    max-width: 280px;
  }
}

/* Мобильные устройства */
@media (max-width: 768px) {
  #cookie-consent-banner {
    right: 20px;
    left: 20px;
    max-width: none;
    bottom: 15px;
    padding: 16px;
  }

  #cookie-consent-banner .cc-text {
    padding-right: 24px;
    font-size: 13px;
  }

  #cookie-consent-banner .cc-agree {
    padding: 9px 20px;
    font-size: 13px;
  }

  #cookie-consent-banner .cc-close {
    top: 8px;
    right: 12px;
    width: 28px;
    height: 28px;
    font-size: 22px;
  }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
  #cookie-consent-banner {
    right: 10px;
    left: 10px;
    bottom: 10px;
    padding: 14px;
    border-radius: 10px;
  }

  #cookie-consent-banner .cc-text {
    padding-right: 22px;
    font-size: 12px;
    line-height: 1.4;
  }

  #cookie-consent-banner .cc-agree {
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 22px;
  }
}

/* ========================================
   Доступность (prefers-reduced-motion)
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  #cookie-consent-banner {
    animation: none;
  }

  #cookie-consent-banner .cc-agree,
  #cookie-consent-banner .cc-close,
  #cookie-consent-banner .cc-link {
    transition: none;
  }
}

/* ========================================
   Темная тема (опционально)
   ======================================== */

@media (prefers-color-scheme: dark) {
  #cookie-consent-banner {
    background-color: #1e1e1e;
    color: #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  #cookie-consent-banner .cc-text {
    color: #e0e0e0;
  }

  #cookie-consent-banner .cc-link {
    color: #66b3ff;
  }

  #cookie-consent-banner .cc-link:hover {
    color: #99ccff;
  }

  #cookie-consent-banner .cc-link:visited {
    color: #66b3ff;
  }

  #cookie-consent-banner .cc-close {
    color: #aaaaaa;
  }

  #cookie-consent-banner .cc-close:hover {
    color: #ffffff;
    background-color: #333333;
  }

  /* Кнопка "Согласен" в темной теме - тоже желтая */
  #cookie-consent-banner .cc-agree {
    background-color: #FFD700;
    color: #000000;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
  }

  #cookie-consent-banner .cc-agree:hover {
    background-color: #FFC107;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
  }

  #cookie-consent-banner .cc-agree:focus {
    outline-color: #ffffff;
  }
}