@font-face {
  font-family: "Tinkoff Sans";
  src: url("./fonts/TinkoffSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Tinkoff Sans";
  src: url("./fonts/tinkoffsans-medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Tinkoff Sans", Arial, Helvetica, sans-serif;
  color: #2b2b2b;
  background: #ffffff;
  font-synthesis: weight;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #ffffff;
}

.page-loader {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background: #ffffff;
  animation: loader-exit 150ms ease-in 850ms forwards;
}

.page-loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  transform: translateY(-12px);
}

.page-loader__logo {
  display: block;
  width: 50px;
  height: 50px;
}

.page-loader__track {
  display: block;
  width: 112px;
  height: 3px;
  overflow: hidden;
  background: #fff4c3;
}

.page-loader__progress {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(
    to bottom,
    #ffdd2d 0,
    #ffdd2d 66.666%,
    #ffe77a 66.666%,
    #ffe77a 100%
  );
  animation: loader-progress 800ms cubic-bezier(0.4, 0, 0.2, 1) 50ms forwards;
}

@keyframes loader-progress {
  to {
    transform: scaleX(1);
  }
}

@keyframes loader-exit {
  to {
    visibility: hidden;
    opacity: 0;
  }
}

@keyframes receipt-reveal {
  to {
    visibility: visible;
    opacity: 1;
  }
}

.receipt {
  width: 100%;
  max-width: 484px;
  min-height: 797px;
  margin: 0 auto;
  padding: 48px 30px 29px 29px;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  animation: receipt-reveal 250ms ease-out 1s forwards;
}

.brand {
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 auto 38px;
}

.receipt__date {
  margin: 0 0 7px;
  color: #999999;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.receipt__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 16px;
}

.receipt__header h1,
.receipt__header p {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
}

.rule {
  width: 100%;
  height: 2px;
  background: linear-gradient(
    to bottom,
    #ffdd2d 0,
    #ffdd2d 50%,
    #ffe77a 50%,
    #ffe77a 100%
  );
}

.details {
  margin: 16px 0 0;
}

.details__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 1.3fr);
  align-items: center;
  min-height: 34px;
  column-gap: 18px;
  font-size: 14px;
  line-height: 1.35;
}

.details__row dt,
.details__row dd {
  margin: 0;
}

.details__row dd {
  justify-self: end;
  max-width: 230px;
  text-align: right;
}

.details__row--description {
  align-items: start;
  padding-top: 3px;
}

.details__row--description dd {
  line-height: 1.45;
  font-size: 13px;
}

.placeholder {
  color: #8f8f8f;
}

.additional-image {
  width: 100%;
  height: 117px;
  margin: 28px 0 0;
  overflow: hidden;
  
}

.additional-image img {
  display: block;
  width: 80%;
  height: 80%;
  margin-left: auto;
  margin-right: 0px; 
  object-fit: contain;
}

.receipt__footer {
  color: #999999;
  font-size: 14px;
  line-height: 1.45;
}

.receipt__footer .rule {
  margin-bottom: 20px;
}

.receipt__footer p {
  margin: 0 0 9px;
}

.receipt__footer .receipt__number {
  color: #444444;
  margin-bottom: 9px;
}

@media (min-width: 446px) {
  .receipt {
    min-height: 852px;
    padding-right: 35px;
    padding-left: 35px;
  }

  .brand {
    width: 50px;
    height: 50px;
    margin-bottom: 44px;
  }

  .receipt__date {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .receipt__header {
    margin-bottom: 15px;
  }

  .receipt__header h1,
  .receipt__header p {
    font-size: 28px;
  }

  .details__row {
    min-height: 36px;
    font-size: 16px;
  }

  .details__row--description dd {
    font-size: 16px;
  }

  .additional-image {
    height: 151px;
    margin-top: 25px;
  }

  .additional-image img {
    width: 73%;
    max-width: 302px;
    height: auto;
    margin-right: 22px;
  }

  .receipt__footer {
    font-size: 16px;
  }
}

@media (max-width: 390px) {
  .receipt {
    min-height: 100vh;
    padding-right: 22px;
    padding-left: 22px;
  }

  .details__row {
    grid-template-columns: minmax(0, 1fr) minmax(145px, 1.25fr);
    column-gap: 12px;
    font-size: 13px;
  }

  .receipt__footer {
    font-size: 13px;
  }
}


.test-notice {
  margin-top: 28px;
  padding: 18px;
  border: 2px solid #6c5510;
  border-radius: 8px;
  background: #fff9df;
  color: #252525;
  font-size: 14px;
  line-height: 1.5;
}
.test-notice__label { margin: 0 0 4px; font-weight: 500; }
.test-notice h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.3; }
.test-notice p { margin: 0 0 12px; }
.test-notice button {
  width: 100%; padding: 12px; border: 1px solid #3c3c3c;
  border-radius: 6px; background: #fff; color: #252525;
  font: inherit; cursor: pointer;
}
.test-notice button:focus-visible { outline: 3px solid #1556b3; outline-offset: 3px; }
.test-notice button:disabled { cursor: default; opacity: .7; }
#collection-status { margin: 12px 0 0; }
