/*
 * Калькулятор чека для лендингов праздников и боулинга.
 * Стили перенесены из landings/birthday.html lines 138–174.
 * HTML генерируется site/js/calculator.js на основе data/calculators.json + branches.json.
 */

.receipt {
  max-width: 540px;
  background: var(--color-bg-card, #322C2A);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  padding: var(--space-lg, 2rem);
  font-family: var(--font-sans, system-ui, sans-serif);
  color: var(--color-text, #FFFFFF);
}

.receipt__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-md, 1.5rem);
  flex-wrap: wrap;
  gap: var(--space-sm, 1rem);
}

.receipt__title {
  font-size: var(--fs-body, 1rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.receipt__per {
  font-size: var(--fs-small, 0.875rem);
  color: var(--color-text-muted, #ECEAE2);
  margin: 0;
}

.receipt__per span {
  font-size: var(--fs-h4, 1.375rem);
  font-weight: 800;
  color: var(--color-accent, #ED1C24);
}

.receipt__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 var(--space-sm, 1rem);
  border: 0;
}

.receipt__slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
}

.receipt__slot input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.receipt__slot span {
  width: 100%;
  padding: 8px 12px;
  text-align: center;
  font-size: var(--fs-small, 0.875rem);
  font-weight: 600;
  color: var(--color-text-subtle, #A8A49C);
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--color-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-full, 999px);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.receipt__slot:hover span {
  border-color: var(--color-border-strong, rgba(255, 255, 255, 0.2));
  color: var(--color-text, #FFFFFF);
}

.receipt__slot input:checked + span {
  background: var(--color-accent, #ED1C24);
  border-color: var(--color-accent, #ED1C24);
  color: #fff;
}

.receipt__slider {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-sm, 1rem) 0;
  margin-bottom: var(--space-sm, 1rem);
  border-bottom: 1px dashed var(--color-border, rgba(255, 255, 255, 0.08));
}

.receipt__slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--fs-small, 0.875rem);
  color: var(--color-text-muted, #ECEAE2);
}

.receipt__slider-label output {
  font-size: var(--fs-h4, 1.375rem);
  font-weight: 800;
  color: var(--color-accent, #ED1C24);
  font-variant-numeric: tabular-nums;
}

.receipt__slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.receipt__slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent, #ED1C24);
  border: 3px solid var(--color-bg-card, #322C2A);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.receipt__slider input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent, #ED1C24);
  border: 3px solid var(--color-bg-card, #322C2A);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.receipt__extras {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-sm, 1rem);
  padding-bottom: var(--space-sm, 1rem);
  border-bottom: 1px dashed var(--color-border, rgba(255, 255, 255, 0.08));
}

.receipt__extras-title {
  font-size: var(--fs-micro, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-subtle, #A8A49C);
  margin: 0 0 4px;
}

.receipt__extra {
  display: flex;
  align-items: center;
  gap: var(--space-xs, 0.75rem);
  padding: 8px 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s;
  font-size: var(--fs-small, 0.875rem);
}

.receipt__extra:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--color-border, rgba(255, 255, 255, 0.08));
}

.receipt__extra input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--color-accent, #ED1C24);
  cursor: pointer;
}

.receipt__extra-name {
  flex: 1;
  color: var(--color-text-muted, #ECEAE2);
  line-height: var(--lh-snug, 1.25);
}

.receipt__extra-price {
  color: var(--color-text-subtle, #A8A49C);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.receipt__extra:has(input:checked) {
  background: rgba(237, 28, 36, 0.06);
  border-color: rgba(237, 28, 36, 0.2);
}

.receipt__extra:has(input:checked) .receipt__extra-price {
  color: var(--color-accent, #ED1C24);
}

.receipt__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0 0 var(--space-sm, 1rem);
  padding-bottom: var(--space-sm, 1rem);
  border-bottom: 1px dashed var(--color-border, rgba(255, 255, 255, 0.08));
  list-style: none;
}

.receipt__list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm, 1rem);
  font-size: var(--fs-small, 0.875rem);
  line-height: var(--lh-snug, 1.25);
}

.receipt__list li span:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.receipt__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 var(--space-xs, 0.75rem);
}

.receipt__total span:first-child {
  font-size: var(--fs-small, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-subtle, #A8A49C);
}

.receipt__total span:last-child {
  font-size: var(--fs-h4, 1.375rem);
  font-weight: 800;
  color: var(--color-accent, #ED1C24);
  font-variant-numeric: tabular-nums;
}

.receipt__cashback {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(242, 201, 76, 0.14), rgba(242, 201, 76, 0.06));
  border: 1px dashed rgba(242, 201, 76, 0.45);
  margin: 0 0 var(--space-xs, 0.75rem);
}

.receipt__cashback span:first-child {
  font-size: var(--fs-micro, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #F2C94C;
}

.receipt__cashback span:last-child {
  font-size: var(--fs-small, 0.875rem);
  font-weight: 800;
  color: #F2C94C;
  font-variant-numeric: tabular-nums;
}

.receipt__note {
  font-size: var(--fs-micro, 0.75rem);
  color: var(--color-text-subtle, #A8A49C);
  line-height: var(--lh-snug, 1.25);
  margin: 0;
}

.receipt__loading {
  font-size: var(--fs-small, 0.875rem);
  color: var(--color-text-subtle, #A8A49C);
}

@media (max-width: 767px) {
  .receipt {
    max-width: 100%;
  }
}
