@font-face {
  font-family: 'Departure Mono';
  src: url('fonts/DepartureMono-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

body {
  background: black;
  font-family: 'Departure Mono', monospace;
  color: #000;
  margin: 0;
  padding: 0 0 24px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* Added for vertical alignment control */
  height: 100vh; /* Changed from min-height to height */
  overflow-y: auto;
}

.receipt {
  max-width: 390px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;  
  opacity: 0;
  animation: fadeInSlideTilt .5s ease-in-out forwards;
  margin: 48px 24px 0;
}


.headerfooter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.headerfooter p{
text-align: center;
}

.card {
  background: #fdfdfd;
  align-self: stretch;
  display: flex;
  padding: 48px 16px 37px 16px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  z-index: -10;
}

p {
  font-size: 16px;
  line-height: 16px;
  color: #333333;
  margin: 0px;
  text-align: left;
  width: 100%;
}

.bolded {
  color: #333333;
  text-shadow: 
    -0.25px -0.25px 0 #333333,
    0.25px -0.25px 0 #333333,
    -0.25px 0.25px 0 #333333,
    0.25px 0.25px 0 #333333;
}

.divided {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.divider {
  width: 100%;
  height: 1.5px;
  background: repeating-linear-gradient(
    to right,
    #333333 0,
    #333333 6px,
    transparent 6px,
    transparent 10px
  );
  background-size: 10px 100%;
  display: block;
  padding: 0;
}

.dash {
  width: 6px;
  height: 1.5px;
  background-color: #333333;
  flex-shrink: 0;
}

.history-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  align-self: stretch;
}

.history-content .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  align-self: stretch;
  color: red;
}

.history-content .row p {
  align-self: auto;
}

.row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  align-self: stretch;
}

.row p {
  width: fit-content;
}


a {
  color: #0000ee;
  text-decoration: underline;
}

.links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.links a {
  color: #0000ee;
  text-decoration: underline;
}

.icons {
  font-size: 1rem;
  margin-top: 0.5rem;
}

.tear-bottom {
  background-color: #fdfdfd;
  margin: -1px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
}

.tear-top {
  background-color: #000;
  margin: 0 0 -1px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
}

.tear-top svg {
  display: block;
}

.tear-bottom svg {
  display: block; 
  margin: 0;
  padding: 0;
}

.canvasWrapper {
  width: 100%;
  height: 139px;
  max-width: 600px;
  aspect-ratio: 2s / 1;
}

canvas {
  background-color: transparent;
  margin: 0 -16px;
  padding: 0;
  width: 390px;
  height: 200px; /* Set a fixed height to visually shorten the canvas */
  display: block;
  touch-action: none;
  cursor: crosshair;
}


.signature {
  margin-top: -20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
}

.signhere {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  align-self: stretch;
  width: 100%;
  position: absolute;
  top: 120px;
  z-index: -1;
}

.line {
  width: 100%;
  height: 1.5px;
  background-color: #000000;
  align-self: flex-end;
  z-index: 20;
  position: relative;
}



@keyframes fadeInSlideTilt {
  0% {
    transform: translateY(80px);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translateY(0) rotate(-1.25deg); /* Added tilt */
    opacity: 1;
  }
}

/* Media query for screens less than 500px */
@media (max-width: 500px) {
  body {
    justify-content: flex-start;
    height: 100vh; /* Ensures body takes full viewport height */
    padding-bottom: 24px; /* Added padding to the bottom of the body */
  }

  .receipt {
    margin: 24px 16px; /* Keep the margin as is */
    width: calc(100% - 32px); /* Ensures width respects margins */
  }

  @keyframes fadeInSlideTilt {
    0% {
      transform: translateY(50px);
      opacity: 0;
    }
    60% {
      opacity: 1;
    }
    100% {
      transform: translateY(0);
      opacity: 1;
    }
  }
}