/* Напоминание оценить снаряжение из каталога: плавающая «пилюля» +
   модалка с компактной оценкой по категориям. */

/* ── Плавающая «пилюля» (над пилюлей напоминания об ивентах) ── */
.crr-pill {
  position: fixed;
  left: 20px;
  bottom: 74px;
  z-index: 1450;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(220, 38, 38, 0.5);
  border-radius: 999px;
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.32);
  animation: crrPillIn 380ms ease-out, crrPillPulse 2.6s ease-in-out 0.6s infinite;
}

.crr-pill:hover {
  filter: brightness(1.07);
}

.crr-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  color: #fecaca;
  font-size: 0.78rem;
}

@keyframes crrPillIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes crrPillPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(220, 38, 38, 0.32); }
  50%      { box-shadow: 0 10px 30px rgba(220, 38, 38, 0.6); }
}

/* ── Оверлей и модалка ──────────────────────────────────── */
.crr-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: crrFade 200ms ease-out;
}

.crr-overlay[hidden] {
  display: none !important;
}

@keyframes crrFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.crr-modal-open {
  overflow: hidden;
}

.crr-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 16px;
  background: #0f172a;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  animation: crrModalIn 260ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
  overflow: hidden;
}

@keyframes crrModalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.crr-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(220, 38, 38, 0.12), rgba(220, 38, 38, 0));
}

.crr-modal-head-text {
  flex: 1;
  min-width: 0;
}

.crr-modal-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  color: #fca5a5;
}

.crr-modal-title .fa-star-half-stroke {
  color: #fbbf24;
}

.crr-modal-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #ef4444;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.crr-modal-subtitle {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.4;
}

.crr-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;
}

.crr-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.crr-modal-body {
  padding: 12px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crr-modal-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}

.crr-later-btn {
  border: 0;
  background: none;
  color: #9ca3af;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.crr-later-btn:hover {
  color: #cbd5e1;
}

/* ── Карточка предмета ───────────────────────────────────── */
.crr-item {
  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;
}

.crr-item--done {
  border-color: rgba(74, 222, 128, 0.4);
  opacity: 0.7;
}

.crr-item--loading {
  opacity: 0.85;
}

.crr-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crr-item-thumb {
  width: 64px;
  height: 44px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.crr-item-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.1rem;
}

.crr-item-info {
  flex: 1;
  min-width: 0;
}

.crr-item-name {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.96rem;
}

.crr-item-meta {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 0.8rem;
}

.crr-item-cats {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crr-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crr-cat-label {
  color: #cbd5e1;
  font-size: 0.84rem;
}

.crr-stars {
  display: inline-flex;
  gap: 1px;
  flex-shrink: 0;
}

.crr-star {
  border: 0;
  background: none;
  padding: 1px;
  font-size: 1.15rem;
  line-height: 1;
  color: #475569;
  cursor: pointer;
  transition: color 0.1s ease, transform 0.1s ease;
}

.crr-star:hover {
  transform: scale(1.15);
}

.crr-star.is-on {
  color: #fbbf24;
}

.crr-star.is-hot {
  color: #fcd34d;
}

.crr-item-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crr-detail-link {
  color: #9ca3af;
  font-size: 0.8rem;
  text-decoration: none;
}

.crr-detail-link:hover {
  color: #fca5a5;
}

.crr-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.crr-submit-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.crr-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.crr-item-status {
  margin-top: 10px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.crr-item-status--ok {
  color: #4ade80;
}

.crr-item-status--err {
  color: #f87171;
}

@media (max-width: 600px) {
  .crr-pill {
    left: 12px;
    bottom: 132px;
  }
  .crr-cat-row {
    flex-wrap: wrap;
  }
  .crr-star {
    font-size: 1.3rem;
  }
}
