.preview-panel {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  background: #111;
  padding: 24px;
  overflow: auto;
}
.preview-stage {
  transform-origin: top center;
}

/* paper */
.sheet {
  position: relative;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  background: #fff;
  color: #111;
  font-family: var(--font-display);

  & .sheet-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
  }

  & .sheet-content {
    display: grid;
    position: absolute;
    grid-template-rows: 870px auto;
    inset: 0;
    overflow: hidden;

    & .content {
      display: flex;
      flex-direction: column;
      margin: 170px 40px;
    }

    & .prices {
      display: grid;
      position: relative;
      grid-template-rows: 100%;
      grid-template-columns: 500px auto;
      align-items: center;
      padding: 40px;
      height: 100%;
    }
  }

  &.a4p {
    width: 794px;
    height: 1123px;
  }

  &.a5p {
    width: 559px;
    height: 794px;

    & .sheet-content {
      grid-template-rows: 648px auto;

      & .content {
        margin: 40px 40px;
      }

      & .prices {
        grid-template-columns: 350px auto;
        padding: 20px 40px;
      }
    }
  }

  &.d3 {
    & .sheet-content {
      grid-template-rows: 251px auto;
      margin-top: 397px;
    }
  }

  &.a5l {
    width: 794px;
    height: 559px;

    & .sheet-content {
      grid-template-rows: 240px 240px;
      margin: 40px;

      & .content {
        margin: 0;
      }

      & .prices {
        grid-template-rows: auto 76px;
        grid-template-columns: auto auto;
        padding: 0;
      }
    }
  }
}

.d0 .sheet-bg {
  background-image: url("assets/a4_stern.jpg");
}
.d1 .sheet-bg {
  background-image: url("assets/a4.jpg");
}
.d2 .sheet-bg {
  background-image: url("assets/a5.jpg");
}
.d3 .sheet-bg {
  background-image: url("assets/a5.jpg");
}

/* placements default */
.area-title {
  color: #111;
  font-weight: 700;
  font-size: 46px;
  line-height: 1.1;
}

.area-subtitle {
  margin-bottom: 40px;
  color: #111;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
}

.area-text,
.area-warranty {
  font-size: 22px;
}

.area-specs {
  padding: 20px 20px;
  font-size: 22px;
}

.area-price {
  color: white;
  font-weight: 900;
  font-size: 140px;
}

.area-price-list {
  color: white;
  font-weight: 900;
  font-size: 40px;

  .t-price-list {
    display: flex;
    flex-direction: column;
  }
}

.area-discount {
  position: absolute;
  top: -80px;
  right: 130px;
  rotate: -16deg;
  font-weight: bold;
  font-size: 60px;

  &.small {
    top: -100px;
    right: 155px;
    font-size: 80px;
  }
}

.area-qr {
  position: absolute;
  top: 40px;
  width: 100px;
}

/* placements d0 & d1 */
.d0,
.d1 {
}

/* placements d2 & 3 */
.d2,
.d3 {
  & .area-title {
    display: grid;
    grid-template-columns: auto 80px;
    font-size: 28px;
  }

  & .area-subtitle {
    font-size: 18px;
  }

  & .area-text,
  .area-warranty {
    font-size: 18px;
  }

  & .area-specs {
    font-size: 18px;
  }

  & .area-discount {
    top: -65px;
    right: 80px;
    font-size: 40px;

    &.small {
      top: -80px;
      right: 95px;
      font-size: 55px;
    }
  }

  & .area-price {
    font-size: 80px;
  }

  & .area-price-list {
    font-size: 30px;
  }

  & .area-qr {
    right: 40px;
    width: 70px;
  }
}

.d3 {
  & .area-text,
  .area-warranty {
    display: none;
  }

  & .area-specs {
    display: none;
  }
}

/* placements d4 */
.d4 {
  & .area-title {
    grid-template-columns: auto 70px;
    color: var(--red);
    font-size: 28px;

    & .t-main {
      margin-right: 80px;
    }
  }

  & .area-subtitle {
    margin-bottom: 30px;
    font-size: 18px;
  }

  & .area-text,
  & .area-warranty {
    font-size: 18px;
  }

  & .area-specs {
    padding: 5px 0;
    font-size: 18px;

    table {
      border-collapse: collapse;

      tr:nth-child(odd) {
        background: var(--muted-light);
      }

      td {
        padding: 2px 5px;
      }
    }
  }

  & .area-discount {
    top: -110px;
    right: 0;
    rotate: 0deg;
    background-image: url(/assets/aktion.png);
    background-size: contain;
    background-repeat: no-repeat;
    width: 100px;
    height: 100px;
    font-size: 27px;

    &.small .t-discount {
      top: -5px;
      left: 25px;
      font-size: 40px;
    }

    .t-discount {
      position: absolute;
      top: 6px;
      left: 20px;
      rotate: -16deg;
      margin: 20px 0;
    }
  }

  & .area-price {
    grid-area: 2 / 1;
    align-self: start;
    margin-right: auto;
    background: var(--red);
    padding: 0 20px;
    font-size: 60px;
  }

  & .area-price-list {
    grid-area: 1 / 1;
    align-self: end;
    margin-right: auto;
    background: black;
    padding: 0 10px;
    font-size: 25px;

    .t-price-list {
      flex-direction: row;
      gap: 5px;
    }
  }

  & .area-qr {
    top: 0;
    right: 0;
    width: 80px;
  }

  & .area-product-img {
    grid-area: 1 / 2 / 3 / 3;
    justify-self: end;
    min-width: 0;
    height: 100%;
    min-height: 0;
  }
}
