/* Participation summary card. Kept separate from app.css to make the component auditable. */

.fs-cab-card-main {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow: visible;
  border: 1px solid rgba(71, 85, 105, 0.8);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0 0, rgba(14, 165, 233, 0.1), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.1), transparent 42%),
    #0b1628;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.22);
}

.fs-cab-card-main::before,
.fs-cab-card-main::after {
  content: none;
}

.fs-cab-card-header,
.fs-cab-card-heading,
.fs-cab-status-pill,
.fs-cab-progress-heading,
.fs-cab-chance-heading,
.fs-cab-plans-heading,
.fs-cab-main-first500 {
  display: flex;
  align-items: center;
}

.fs-cab-card-header {
  justify-content: space-between;
  gap: 12px;
}

.fs-cab-card-heading {
  min-width: 0;
  gap: 9px;
}

.fs-cab-main-icon {
  flex: 0 0 auto;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(250, 204, 21, 0.42);
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
  font-size: 17px;
}

.fs-cab-eyebrow,
.fs-cab-section-label {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.25;
  text-transform: uppercase;
}

.fs-cab-main-title {
  margin: 2px 0 0;
  color: #f8fafc;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.15;
}

.fs-cab-status-pill {
  flex: 0 0 auto;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(34, 197, 94, 0.55);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.fs-cab-status-pill span[data-lang] {
  font-size: inherit;
}

.fs-cab-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.1);
}

.fs-cab-status-pill--inactive {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(185, 28, 28, 0.12);
  color: #fecaca;
}

.fs-cab-status-pill--inactive .fs-cab-status-dot {
  background: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

.fs-cab-balance-panel,
.fs-cab-chance-panel,
.fs-cab-plans {
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.68);
}

.fs-cab-balance-panel {
  display: grid;
  grid-template-columns: minmax(108px, 0.78fr) minmax(0, 1.7fr);
  gap: 12px;
  padding: 12px;
}

.fs-cab-balance-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.fs-cab-balance-value {
  margin-top: 4px;
  color: #f8fafc;
  font-size: 20px;
  line-height: 1.1;
  white-space: nowrap;
}

.fs-cab-balance-summary small,
.fs-cab-chance-heading small {
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.3;
}

.fs-cab-balance-summary small {
  margin-top: 5px;
}

.fs-cab-queue-status {
  min-height: 23px;
}

.fs-cab-contributed {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.fs-cab-contributed strong {
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 800;
}

.fs-cab-funding-progress {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.fs-cab-progress-row {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.fs-cab-progress-heading {
  justify-content: space-between;
  gap: 8px;
  color: #cbd5e1;
  font-size: 9px;
  line-height: 1.2;
}

.fs-cab-progress-heading strong {
  color: #e2e8f0;
  font-size: 9px;
  white-space: nowrap;
}

.fs-cab-progress-track {
  display: block;
  height: 5px;
  margin: 4px 0 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #1e293b;
}

.fs-cab-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  transition: width 180ms ease;
}

.fs-cab-progress-remaining {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 5px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  background: rgba(14, 116, 144, 0.08);
  color: #7dd3fc;
  font-size: 9px;
  font-weight: 700;
}

.fs-cab-progress-row:hover .fs-cab-progress-heading strong,
.fs-cab-progress-row:focus-visible .fs-cab-progress-heading strong {
  color: #7dd3fc;
}

.fs-cab-progress-row:hover:not(:disabled) .fs-cab-progress-remaining,
.fs-cab-progress-row:focus-visible .fs-cab-progress-remaining {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 116, 144, 0.16);
}

.fs-cab-progress-row[data-complete="true"] .fs-cab-progress-remaining {
  border-color: rgba(74, 222, 128, 0.25);
  background: rgba(22, 163, 74, 0.08);
  color: #86efac;
}

.fs-cab-progress-row:focus-visible,
.fs-cab-amount-btn:focus-visible,
.fs-cab-plan-option:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.8);
  outline-offset: 3px;
}

.fs-cab-chance-panel {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.fs-cab-circle {
  --fs-chance-angle: 0deg;
  display: grid;
  width: 76px;
  height: 76px;
  padding: 6px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#22c55e 0 var(--fs-chance-angle), #243247 var(--fs-chance-angle) 360deg);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.18);
}

.fs-cab-circle-inner {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  background: #071121;
  color: #f8fafc;
  text-align: center;
}

.fs-cab-circle-inner strong {
  font-size: 19px;
  line-height: 1;
}

.fs-cab-circle-inner span {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 9px;
}

.fs-cab-chance-content {
  min-width: 0;
}

.fs-cab-chance-heading {
  justify-content: space-between;
  gap: 10px;
}

.fs-cab-chance-heading small {
  display: block;
  margin-top: 3px;
}

.fs-cab-category {
  flex: 0 0 auto;
  display: flex;
  margin: 0;
  min-width: 52px;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 11px;
  background: rgba(34, 197, 94, 0.08);
}

.fs-cab-category-label {
  color: #94a3b8;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fs-cab-category-letter {
  color: #dcfce7;
  font-size: 22px;
  line-height: 1;
  text-shadow: none;
}

.fs-cab-chance-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
}

.fs-cab-chance-breakdown > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 0 7px;
}

.fs-cab-chance-breakdown > div:first-child {
  padding-left: 0;
}

.fs-cab-chance-breakdown > div + div {
  border-left: 1px solid rgba(51, 65, 85, 0.72);
}

.fs-cab-chance-breakdown span {
  overflow: hidden;
  color: #94a3b8;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-cab-chance-breakdown strong {
  color: #86efac;
  font-size: 11px;
}

.fs-cab-period-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 8px;
  color: #64748b;
  font-size: 8px;
}

.fs-cab-period-summary > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.fs-cab-period-summary strong {
  color: #cbd5e1;
  font-size: 9px;
}

.fs-cab-inline-link {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.fs-cab-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 12px;
  overflow: hidden;
}

.fs-cab-ledger-empty {
  padding: 14px 10px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.fs-cab-ledger-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.fs-cab-ledger-row:nth-child(odd) {
  background: rgba(15, 23, 42, 0.98);
}

.fs-cab-ledger-row:nth-child(even) {
  background: rgba(17, 24, 39, 0.98);
}

.fs-cab-ledger-row-date {
  width: 78px;
  flex: 0 0 auto;
  color: #64748b;
  font-size: 10px;
}

.fs-cab-ledger-row-label {
  flex: 1;
  min-width: 0;
  color: #e5e7eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-cab-ledger-row-amount {
  flex: 0 0 auto;
  font-weight: 700;
  white-space: nowrap;
}

.fs-cab-ledger-row-amount--positive {
  color: #22c55e;
}

.fs-cab-ledger-row-amount--negative {
  color: #e5e7eb;
}

.fs-cab-plans {
  padding: 12px;
}

.fs-cab-plans-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.fs-cab-plans-heading > span:last-child {
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
}

.fs-cab-plan-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.fs-cab-plan-option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 70px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  padding: 9px 5px 7px;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.66);
  color: #e2e8f0;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.fs-cab-plan-option:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(30, 41, 59, 0.8);
  transform: translateY(-1px);
}

.fs-cab-plan-option strong {
  color: #f8fafc;
  font-size: 10px;
  font-weight: 750;
}

.fs-cab-plan-option > span:not(.fs-cab-plan-badge) {
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.fs-cab-plan-option small {
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 8px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* .fs-price-old (app.css) задаёт зачёркивание и приглушённую опаcity; тут
   только убираем его инлайновый margin-left — в этой карточке цены стоят
   друг под другом, а не в строку. */
.fs-cab-plan-option small.fs-price-old {
  margin-left: 0;
}

/* Скидка (старая цена над новой) видна только пока баланс нулевой —
   как только человеку нужно доплатить остаток, сумма перестаёт быть
   "акционной ценой", поэтому JS вешает --topup и скидка скрывается. */
.fs-cab-plan-option--discounted small.fs-price-old {
  color: #f87171;
  opacity: 1;
  font-weight: 700;
}

.fs-cab-plan-option--discounted > span:not(.fs-cab-plan-badge) {
  color: #4ade80;
}

.fs-cab-plan-option--discounted.fs-cab-plan-option--topup small.fs-price-old {
  display: none;
}

.fs-cab-plan-option--discounted.fs-cab-plan-option--topup > span:not(.fs-cab-plan-badge) {
  color: #e2e8f0;
}

.fs-cab-plan-option--recommended {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(90deg, rgba(20, 83, 45, 0.35), rgba(15, 23, 42, 0.8));
}

.fs-cab-plan-option--active {
  border-color: rgba(56, 189, 248, 0.85);
  background: rgba(14, 116, 144, 0.16);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.fs-cab-plan-option:disabled {
  cursor: default;
  opacity: 0.48;
}

.fs-cab-payment-cta {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(74, 222, 128, 0.7);
  border-radius: 13px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #052e16;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.24);
  transition: filter 150ms ease, transform 150ms ease;
}

.fs-cab-payment-cta:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.fs-cab-payment-cta:disabled {
  border-color: rgba(71, 85, 105, 0.7);
  background: #1e293b;
  color: #64748b;
  cursor: default;
  box-shadow: none;
}

.fs-cab-payment-arrow {
  font-size: 18px;
  line-height: 1;
}

.fs-cab-plan-hint {
  margin-top: 6px;
  color: #64748b;
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.fs-cab-plan-badge {
  position: absolute;
  top: -7px;
  left: 50%;
  padding: 2px 6px;
  border: 1px solid rgba(34, 197, 94, 0.55);
  border-radius: 999px;
  background: #0b1628;
  color: #86efac;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.fs-cab-main-note {
  padding: 0 2px;
  color: #64748b;
  font-size: 9px;
  line-height: 1.4;
}

.fs-cab-main-first500 {
  gap: 9px;
  margin-top: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(250, 204, 21, 0.32);
  border-radius: 14px;
  background: rgba(250, 204, 21, 0.06);
  color: #e2e8f0;
}

.fs-first500-icon {
  flex: 0 0 auto;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: rgba(250, 204, 21, 0.13);
  color: #fde047;
  font-size: 14px;
}

.fs-cab-main-first500 > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.fs-cab-main-first500 strong {
  color: #fef3c7;
  font-size: 10px;
}

.fs-cab-main-first500 small {
  color: #a3a3a3;
  font-size: 9px;
  line-height: 1.3;
}

@media (max-width: 400px) {
  .fs-cab-card-main {
    gap: 10px;
    padding: 12px 11px;
    border-radius: 18px;
  }

  .fs-cab-main-title {
    font-size: 15px;
  }

  .fs-cab-main-icon {
    width: 29px;
    height: 29px;
  }

  .fs-cab-status-pill {
    max-width: 126px;
    padding: 5px 7px;
    font-size: 9px;
  }

  .fs-cab-balance-panel {
    grid-template-columns: minmax(98px, 0.7fr) minmax(0, 1.6fr);
    gap: 9px;
    padding: 10px;
  }

  .fs-cab-balance-value {
    font-size: 17px;
  }

  .fs-cab-chance-panel {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }

  .fs-cab-circle {
    width: 68px;
    height: 68px;
  }

  .fs-cab-circle-inner strong {
    font-size: 17px;
  }

  .fs-cab-category {
    min-width: 46px;
    padding: 5px 6px;
  }

  .fs-cab-chance-breakdown {
    gap: 0;
  }

  .fs-cab-chance-breakdown > div {
    padding: 0 5px;
  }

  .fs-cab-plan-option {
    min-height: 66px;
    padding-inline: 3px;
  }

  .fs-cab-payment-cta {
    min-height: 50px;
    font-size: 12px;
  }
}
