/* ============================================================
   energy-plans.css — «Энергия на срок» прямо в шторке энергии (components/energyPlans.js): шапка блока и три
   плитки планов, и плашка админу «покупки не видны — продажи выключены» (components/salesAdminNote.js).
   Остальная шторка энергии, магазин 💎 и планы — в paywall.css (вынесено из него: лимит 400 строк на файл).
   ============================================================ */

/* «Энергия на срок» прямо в шторке (из бейджа): шапка блока, три плитки планов — плитка целиком кнопка счёта */
.energy-plans {
  width: 100%;
  padding: 12px 12px 4px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(255, 45, 120, 0.16), rgba(139, 92, 246, 0.12) 55%, var(--card) 100%);
  border: 1px solid rgba(255, 45, 120, 0.32);
  box-shadow: var(--inner-hi);
}
.energy-plans__head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.energy-plans__icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.energy-plans__icon .icon { width: 18px; height: 18px; }
.energy-plans__text { flex: 1; min-width: 0; }
.energy-plans__title { margin: 0; font-size: 16px; font-weight: var(--fw-black); line-height: 1.25; }
.energy-plans__sub { margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--muted); text-wrap: balance; }
.energy-plans__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.energy-plans__more { display: flex; margin: 4px auto 0; min-height: 40px; color: var(--text-2); }
.energy-plans__more .icon { width: 14px; height: 14px; margin-left: 2px; }
.plan-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 112px;
  padding: 18px 4px 0;
  overflow: hidden;
  border-radius: var(--r);
  text-align: center;
  color: var(--text);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-2);
  box-shadow: var(--inner-hi);
  transition: transform var(--t-fast) var(--ease), border-color var(--t);
  animation: rise-in 280ms var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.plan-tile:active { transform: scale(0.97); }
.plan-tile.is-loading { pointer-events: none; }
.plan-tile.is-loading .plan-tile__price b { opacity: 0.35; }
.plan-tile.has-badge { border-color: transparent; background: linear-gradient(180deg, var(--card-2), var(--card)) padding-box, var(--grad) border-box; }
.plan-tile__badge { position: absolute; top: 0; left: 0; right: 0; padding: 2px 4px; font-size: 10px; font-weight: var(--fw-heavy); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; background: var(--grad); }
.plan-tile__days { font-size: 17px; font-weight: var(--fw-black); letter-spacing: -0.01em; line-height: 1.15; }
.plan-tile__bonus { font-size: 12px; font-weight: var(--fw-heavy); color: var(--gem); }
.plan-tile__per-day { font-size: 10.5px; line-height: 1.25; color: var(--muted); font-variant-numeric: tabular-nums; }
.plan-tile__price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: calc(100% + 8px);
  min-height: 34px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.04);
}
.plan-tile__price b { font-weight: var(--fw-heavy); }
.plan-tile.has-badge .plan-tile__price { color: #fff; background: var(--grad); border-top-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .plan-tile { cursor: pointer; }
  .plan-tile:hover { border-color: var(--line-2); box-shadow: var(--elev-1), var(--inner-hi); }
}
/* Подписка «Plus · месяц» — отдельной строкой под тремя разовыми планами (в сетке 3 колонки она осталась бы одна во
   втором ряду): слева срок, бонус и «каждые 30 дней», справа цена во всю высоту плитки */
.plan-tile--sub {
  grid-column: 1 / -1;
  align-items: flex-start;
  min-height: 0;
  padding: 10px 108px 10px 14px;
  text-align: left;
}
.plan-tile--sub.has-badge { padding-top: 24px; }
.plan-tile--sub .plan-tile__price {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 96px;
  margin: 0;
  border-top: 0;
  border-left: 1px solid var(--line);
}
.plan-tile--sub.has-badge .plan-tile__price { top: 18px; border-left-color: transparent; }
@media (max-width: 339.98px) {
  .plan-tile__per-day { display: none; }
  /* «каждые 30 дней» у подписки — условие покупки, не прячем */
  .plan-tile--sub .plan-tile__per-day { display: block; }
}

/* Админу: покупки не видны, потому что продажи выключены (или товары выключены) — где включить (salesAdminNote.js) */
.sales-admin {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 10px 10px 12px;
  border-radius: var(--r);
  background: rgba(255, 181, 71, 0.1);
  border: 1px dashed rgba(255, 181, 71, 0.55);
}
.energy-offer .sales-admin { margin-bottom: 0; }
.sales-admin__icon { flex: 0 0 auto; display: inline-flex; color: var(--amber); }
.sales-admin__icon .icon { width: 20px; height: 20px; }
.sales-admin__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sales-admin__title { font-size: 14px; font-weight: var(--fw-heavy); line-height: 1.3; color: var(--amber); }
.sales-admin__path { font-size: 12.5px; font-weight: var(--fw-semibold); line-height: 1.35; color: var(--text); }
.sales-admin__hint { font-size: 11px; line-height: 1.3; color: var(--muted); }
.sales-admin__open { flex: 0 0 auto; }

/* ---------- Низкие экраны (Android маленький): теснее ---------- */
.h-short .plan-tile { min-height: 100px; padding-top: 16px; }
.h-short .energy-plans__sub { display: none; }
