/* Навязчивое напоминание оценить ивенты + оценка в один клик */

/* ── Плавающая «пилюля» (снизу слева, чтобы не пересекаться с виджетом) ── */
.rr-pill {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1450;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 999px;
  background: linear-gradient(180deg, #f59e0b, #d97706);
  color: #1a1207;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
  animation: rrPillIn 380ms ease-out, rrPillPulse 2.4s ease-in-out 0.6s infinite;
}

.rr-pill:hover {
  filter: brightness(1.05);
}

.rr-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(26, 18, 7, 0.85);
  color: #fcd34d;
  font-size: 0.78rem;
}

@keyframes rrPillIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes rrPillPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32); }
  50%      { box-shadow: 0 10px 30px rgba(245, 158, 11, 0.6); }
}

/* ── Оверлей и модалка ──────────────────────────────────── */
.rr-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.66);
  backdrop-filter: blur(3px);
  animation: rrFade 200ms ease-out;
}

/* display:flex перебивает UA-правило [hidden]{display:none}, поэтому скрываем
   оверлей явно — иначе кнопки «×» и «Напомнить позже» не закрывают окно. */
.rr-overlay[hidden] {
  display: none;
}

@keyframes rrFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.rr-modal-open {
  overflow: hidden;
}

.rr-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  background: #0f172a;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  animation: rrModalIn 260ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
  overflow: hidden;
}

@keyframes rrModalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.rr-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0));
}

.rr-modal-head-text {
  flex: 1;
  min-width: 0;
}

.rr-modal-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  color: #fcd34d;
}

.rr-modal-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #f59e0b;
  color: #1a1207;
  font-size: 0.8rem;
  font-weight: 700;
}

.rr-modal-subtitle {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.4;
}

.rr-modal-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.rr-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.rr-modal-body {
  padding: 12px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rr-modal-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}

.rr-later-btn {
  border: 0;
  background: none;
  color: #9ca3af;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rr-later-btn:hover {
  color: #cbd5e1;
}

/* ── Карточка ивента ────────────────────────────────────── */
.rr-item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s ease, opacity 0.3s ease, transform 0.3s ease;
}

.rr-item--done {
  border-color: rgba(74, 222, 128, 0.4);
  opacity: 0.7;
}

.rr-item--loading {
  opacity: 0.8;
}

.rr-item-info {
  flex: 1;
  min-width: 150px;
}

.rr-item-name {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.94rem;
}

.rr-item-meta {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 0.8rem;
}

.rr-item-rate {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.rr-stars {
  display: inline-flex;
  gap: 2px;
}

.rr-star {
  border: 0;
  background: none;
  padding: 2px;
  font-size: 1.5rem;
  line-height: 1;
  color: #475569;
  cursor: pointer;
  transition: color 0.1s ease, transform 0.1s ease;
}

.rr-star:hover {
  transform: scale(1.15);
}

.rr-star.is-hot {
  color: #fbbf24;
}

.rr-comment-link {
  color: #9ca3af;
  font-size: 0.78rem;
  text-decoration: none;
}

.rr-comment-link:hover {
  color: #fcd34d;
}

.rr-item-status {
  flex-basis: 100%;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.rr-item-status--ok {
  color: #4ade80;
}

.rr-item-status--err {
  color: #f87171;
}

.rr-modal-title .fa-star-half-stroke {
  color: #fbbf24;
}

@media (max-width: 600px) {
  .rr-pill {
    left: 12px;
    bottom: 76px;
  }
  .rr-item {
    align-items: stretch;
  }
  .rr-item-rate {
    align-items: flex-start;
  }
  .rr-star {
    font-size: 1.7rem;
  }
}
