.laser-form {
  position: fixed;
  top: 0;
  height: 100dvh;
  background: #f3eeea;
  z-index: 99999;
  padding: 15px;
  padding-bottom: 130px;
  width: min(100%, 640px);
  right: 0;
  transition: transform 200ms ease;
  will-change: transform;

  &:not(.open) {
    transform: translate3d(100%, 0, 0);
  }

  @media (min-width: 768px) {
    box-shadow: -20px 10px 70px rgb(0 0 0 / 20%);
    border-radius: 10px 0 0 10px;
    overflow: hidden;
  }

  .input-container {
    margin-bottom: 15px;

    label {
      font-weight: bold;
    }
  }

  h2 {
    font-size: 32px;
  }
}

.laser-form-steps {
  overflow-y: auto;
  height: 100%;
  overscroll-behavior: contain;

  .step {
    &.step-summary.active {
      height: 100%;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    &:not(.active) {
      display: none;
    }
  }
}

.laser-form-navigation {
  position: absolute;
  bottom: 0;
  left: 0;
  background: #fff;
  padding: 15px;
  width: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;
  box-shadow: 0 -3px 5px rgba(0, 0, 0, 0.05);
  border-radius: 10px 10px 0 0;
  text-align: center;

  .continue {
    background: #ab9379;
    color: #fff !important;
    border: unset !important;
    border-radius: 15px;
    display: block;
    width: 100%;
    line-height: 1;
    padding: 16px;
    margin: 15px 0 10px;
    cursor: pointer;
    transition: opacity 120ms ease;
  }

  .disabled {
    pointer-events: none;
    opacity: 0.5;
  }

  .return {
    cursor: pointer;
    line-height: 1;
    font-size: 14px;
  }

  .progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    position: relative;
    margin-bottom: 0 !important;
    border: unset;

    &::before {
      content: "";
      width: 100%;
      height: 2px;
      background: #d2cac7;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
    }

    .dot {
      background: #d1c9c6;
      display: block;
      width: 18px;
      height: 18px;
      border-radius: 100%;
      position: relative;
      border: solid 3px #fff;
      flex-shrink: 0;

      &.active {
        background: #33b4a7;
      }
    }
  }

  &.loading {
    pointer-events: none;

    &::before {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 16px;
      height: 16px;
      margin-left: -8px;
      margin-top: -8px;
      border: 2px solid #ccc;
      border-top-color: #33b4a7;
      border-radius: 50%;
      animation: spin 0.6s linear infinite;
      z-index: 10;
    }

    &::after {
      content: "";
      position: absolute;
      z-index: 9;
      background: #ffffff40;
      width: 100%;
      height: 100%;
      backdrop-filter: blur(2px);
    }
  }
}

.body-group-card {
  background: #fefaf9;
  border-radius: 15px;
  overflow: hidden;
  border: solid 1px #d3cfce;
  margin-bottom: 30px;
  flex: 1;

  .body-group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: solid 1px #d3cfce;

    .body-group-card-header-name {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 5px;

      img {
        width: 22px;
      }

      h3 {
        margin: 0;
        line-height: 1;
        font-size: 18px;
      }
    }

    .body-group-card-header-sessions {
      font-size: 12px;
    }
  }

  .body-group-card-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    height: calc(100% - 40px);
  }

  .body-part {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;

    .body-part-image {
      flex-basis: 23%;
      flex-shrink: 0;
      position: relative;

      img {
        width: 100%;
        border: solid 3px transparent;
        border-radius: 10px;
        aspect-ratio: 1;
        object-fit: cover;
      }

      .remove-body-part {
        position: absolute;
        top: 0;
        left: 0;
        line-height: 1;
        cursor: pointer;
        color: red;
        font-weight: bold;
        margin: 8px;
        border: solid 1px;
        border-radius: 5px;
        padding: 1px 3px;
      }
    }

    .body-part-sessions {
      flex: 1;

      .body-part-sessions-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;

        h4 {
          margin: 0;
          line-height: 1;
          font-size: 18px;
        }

        .body-part-sessions-amount {
          font-size: 12px;
          margin: 0;
          line-height: 1;
        }
      }

      .body-part-sessions-options {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
      }

      .body-part-sessions-option {
        flex: 1;

        label {
          border: solid 1px #d3cfce;
          border-radius: 8px;
          padding: 10px 5px;
          text-align: center;
          font-size: 14px;
          width: 100%;
          font-weight: normal;
          margin: 0;

          .price {
            display: block;
            margin-top: 5px;
            color: #638f76;
            font-weight: bold;
          }
        }

        input {
          display: none;

          &:checked + label {
            background: #638f76;
            border-color: #638f76;
            color: #fff;

            .price {
              color: #fff;
            }
          }
        }
      }
    }

    &.has-sessions {
      .body-part-image img {
        border-color: #638f76;
      }
    }
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.body-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;

  .body-part {
    background: #fefaf9;
    border-radius: 15px;
    overflow: hidden;
    border: solid 1px #d3cfce;

    .body-part-image img {
      display: block;
      margin: auto;
      width: 100%;
      aspect-ratio: 16/9;
      object-fit: cover;
    }

    .body-part-name {
      padding: 10px;

      h4 {
        margin: 0;
        font-size: 16px !important;
        text-align: center;
      }
    }
  }

  input {
    display: none;

    &:checked + .body-part {
      border-color: #638f76;
      background: #638f76;

      h4 {
        color: #fff;
      }
    }
  }
}

#summary {
  background: #2fb1a5;
  border-radius: 10px;
  overflow: hidden;

  * {
    color: #000;
    font-weight: normal;
    margin: 0;
    vertical-align: middle;
    border: unset;
  }

  th {
    text-align: left;
    padding: 10px;
  }

  td {
    text-align: right;
    padding: 10px;
  }

  .areas-discount {
    display: block;
    line-height: 1.2;
    font-size: 95%;

    &.active {
      color: #fff;
    }

    &:first-of-type {
      margin-top: 10px !important;
    }
  }
}

.scroll-indicator {
  display: block;
  text-align: center;
  font-size: 80%;
  background: #d1c9c6;
  padding: 4px;
  border-radius: 6px;
}
