/* ============================================
   SYSTEM REAKCJI v3.0 — SVG Icons Edition
   Dark Theme (sukcesai)
   ============================================ */

.reaction-bar {
  margin: 0 auto;
  padding: 28px 24px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 700px;
}

.reaction-bar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reaction-bar__title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
}

.reaction-bar__total {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

.reaction-bar__buttons {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

/* ----- REACTION BUTTON ----- */
.reaction-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px 12px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
  flex: 1;
  max-width: 140px;
  user-select: none;
  color: rgba(255, 255, 255, 0.45);
}

.reaction-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.reaction-btn--active {
  border-color: #ffd84d;
  background: rgba(255, 216, 77, 0.06);
  color: #ffd84d;
}

.reaction-btn--active .reaction-btn__icon svg {
  stroke-width: 2;
}

.reaction-btn--active .reaction-btn__count {
  color: #ffd84d;
  font-weight: 700;
}

.reaction-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.reaction-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.reaction-btn__icon svg {
  width: 100%;
  height: 100%;
  transition: stroke-width 0.2s ease;
}

.reaction-btn__label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0.85;
}

.reaction-btn__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}

/* ----- ANIMATION ----- */
@keyframes btn-press {
  0% { transform: scale(1); }
  50% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.reaction-btn--clicked {
  animation: btn-press 0.3s ease;
}

/* ----- POPULAR WIDGET ----- */
.popular-widget {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.popular-widget__title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.popular-widget__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-widget__item {
  margin-bottom: 8px;
}

.popular-widget__item:last-child {
  margin-bottom: 0;
}

.popular-widget__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.15s ease;
}

.popular-widget__link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.popular-widget__rank {
  font-weight: 700;
  color: #ffd84d;
  font-size: 0.8rem;
  flex-shrink: 0;
  width: 20px;
  text-align: right;
}

.popular-widget__title-text {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.4;
}

.popular-widget__reactions {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 640px) {
  .reaction-bar {
    padding: 20px 16px 16px;
  }

  .reaction-bar__buttons {
    gap: 6px;
  }

  .reaction-btn {
    min-width: 62px;
    padding: 10px 8px 8px;
  }

  .reaction-btn__icon {
    width: 20px;
    height: 20px;
  }

  .reaction-btn__label {
    font-size: 0.6rem;
  }

  .popular-widget {
    padding: 16px;
  }
}

/* ----- ACCESSIBILITY ----- */
.reaction-btn:focus-visible {
  outline: 2px solid #ffd84d;
  outline-offset: 2px;
}

.popular-widget__link:focus-visible {
  outline: 2px solid #ffd84d;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .reaction-btn,
  .reaction-btn__icon svg {
    animation: none !important;
    transition: none !important;
  }
}
