/* review-buttons.css - Улучшение кнопок для просмотра обзоров и оценок */

/* 2. Усиление контраста для кнопок просмотра обзоров и оценок */

/* Базовый стиль кнопок с высоким контрастом */
.btn-primary,
.view-reviews,
.rate-coffee,
.add-to-cart {
  background-color: #C0592A; /* Насыщенный кофейный оттенок */
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: all 0.2s ease-in-out;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover,
.view-reviews:hover,
.rate-coffee:hover,
.add-to-cart:hover {
  background-color: #A04726; /* Темнее для наведения */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Кнопка просмотра обзоров в карточке товара */
.product-card .btn-primary,
.coffee-card .view-reviews {
  width: 100%;
  margin-top: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Анимация волны при нажатии для всех кнопок */
.btn-primary::after,
.view-reviews::after,
.rate-coffee::after,
.add-to-cart::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn-primary:focus:not(:active)::after,
.view-reviews:focus:not(:active)::after,
.rate-coffee:focus:not(:active)::after,
.add-to-cart:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

/* Состояние фокуса для доступности */
.btn-primary:focus,
.view-reviews:focus,
.rate-coffee:focus,
.add-to-cart:focus {
  outline: 2px solid #703419;
  outline-offset: 2px;
}

/* Кнопки с иконками */
.btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-with-icon i {
  font-size: 16px;
}

/* Специальные стили для кнопок оценки */
.rate-coffee {
  background-color: #8B4513; /* Темный кофейный */
}

.rate-coffee:hover {
  background-color: #703419;
}

/* Кнопки на странице деталей кофе */
.coffee-detail-buttons {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.coffee-detail-buttons .btn {
  flex: 1;
}

/* Стили для небольших кнопок */
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 767px) {
  .coffee-detail-buttons {
    flex-direction: column;
  }
  
  .btn-primary,
  .view-reviews,
  .rate-coffee,
  .add-to-cart {
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
  }
}

/* Усиленные кнопки для просмотра обзоров */
.view-reviews-wrapper {
  position: relative;
  margin-top: 16px;
}

.view-reviews {
  background-color: #C0592A;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.view-reviews i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.view-reviews:hover i {
  transform: translateX(3px);
}

.view-reviews:active {
  transform: scale(0.98);
}

/* Индикатор количества обзоров */
.review-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #8B4513;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Пульсирующая анимация для новых обзоров */
.has-new-reviews .review-count-badge {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 69, 19, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(139, 69, 19, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 69, 19, 0);
  }
}
