/* css/rate-apps.css — страница массовой оценки программ (rate-apps.php) */

.ra-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Hero ── */
.ra-hero {
  text-align: center;
  padding: 28px 20px 24px;
  margin: 8px 0 20px;
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}

.ra-hero-icon { width: 30px; height: 30px; color: #ffd700; margin-bottom: 8px; }

.ra-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
}

.ra-hero p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

.ra-auth-gate { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--glass-border); }
.ra-auth-gate p { margin-bottom: 14px; }

.ra-auth-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.ra-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 700; text-decoration: none;
  background: rgba(255,255,255,.06); border: 1px solid var(--glass-border); color: var(--text);
  transition: background .15s, transform .15s;
}
.ra-btn .icon { width: 16px; height: 16px; }
.ra-btn:hover { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.ra-btn-accent { background: var(--accent); border-color: var(--accent); color: #0a0d16; }
.ra-btn-accent:hover { background: var(--accent); opacity: .9; }

/* ── Тулбар: поиск + счётчик ── */
.ra-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}

.ra-search {
  flex: 1; min-width: 200px;
  display: flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 10px 14px;
}
.ra-search .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.ra-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 14px;
}
.ra-search input::placeholder { color: var(--muted); }

.ra-stats { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ra-stats span { color: var(--text); font-weight: 700; }

/* ── Секции ── */
.ra-section { margin-bottom: 8px; }
.ra-section h2 { font-size: 17px; padding: 10px 0 12px; }

.ra-grid { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }

/* ── Карточка (details) ── */
.ra-card {
  display: block;
  cursor: default;
  padding: 0;
  text-align: left;
}

.ra-card > summary {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}
/* Карточки здесь переиспользуют разметку programs.php (класс
   .program-card), а там css/style.css гасит клики на прямых детях
   правилом ".program-card > *:not(.card-link)" — расчёт на скрытую
   растянутую ссылку .card-link, которой тут нет. pointer-events:none
   наследуется всем потомкам — и <summary> (стрелка не разворачивала
   details), и .ra-card-body (звёзды/поле отзыва/кнопка "Отправить"
   внутри виджета оценки были нажаты, но физически некликабельны — см.
   запрос пользователя от 2026-09-01: "оценку не могу оставить").
   Специфичность .program-card.ra-card > summary/.ra-card-body (0,2,1)
   выше блокирующего правила (0,2,0), поэтому явно возвращаем
   pointer-events на оба прямых ребёнка. */
.program-card.ra-card > summary,
.program-card.ra-card > .ra-card-body { pointer-events: auto; }
.ra-card > summary::-webkit-details-marker { display: none; }
.ra-card > summary::marker { content: ''; }

.ra-card .program-icon-wrap { flex-shrink: 0; }
.ra-card .program-icon-frame { width: 46px; height: 46px; }

.ra-card-title { flex: 1; min-width: 0; }
.ra-card-title h3 {
  font-size: 14.5px; font-weight: 700; color: var(--text);
  margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ra-card-link {
  font-size: 12px; color: var(--accent); text-decoration: none;
}
.ra-card-link:hover { text-decoration: underline; }

.ra-chevron {
  width: 18px; height: 18px; color: var(--muted); flex-shrink: 0;
  transition: transform .2s;
}
.ra-card[open] .ra-chevron { transform: rotate(180deg); }
.ra-card[open] > summary { border-bottom: 1px solid var(--glass-border); }

.ra-card-body { padding: 0 14px 14px; }
.ra-card-body .rt-widget { margin-top: 0; background: none; border: none; padding: 14px 0 0; }

.ra-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0; }

@media (max-width: 480px) {
  .ra-hero { padding: 22px 14px 18px; }
  .ra-auth-actions { flex-direction: column; }
  .ra-btn { justify-content: center; }
  .ra-card .program-icon-frame { width: 40px; height: 40px; }
}
