.corporative-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;
      display: block;
      margin-bottom: 5px;
    }

    input {
      width: 100%;
      padding: 12px;
      border: 1px solid #d3cfce;
      border-radius: 8px;
    }
  }

  h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #33100d;
  }

  p {
    font-size: 15px;
    color: #555;
    margin-bottom: 15px;
  }
}

.corporative-form-steps {
  overflow-y: auto;
  height: 100%;
  overscroll-behavior: contain;
  padding-right: 5px;

  .step {
    &:not(.active) {
      display: none;
    }

    img {
      max-width: 100%;
      height: auto;
      border-radius: 10px;
      margin-bottom: 15px;
      display: block;
    }
  }
}

.corporative-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: #5f150b;
    color: #fff !important;
    border: unset !important;
    border-radius: 15px;
    display: block;
    width: 100%;
    line-height: 1;
    padding: 16px;
    margin: 15px 0 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 120ms ease;

    &:hover, &:active, &:focus {
      background: #7a1d11;
    }
  }

  .disabled {
    pointer-events: none;
    opacity: 0.5;
  }

  .return {
    cursor: pointer;
    line-height: 1;
    font-size: 14px;
    color: #666;
  }

  .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: #5f150b;
      }
    }
  }

  &.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: #5f150b;
      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);
    }
  }
}

/* Grids e cards das opções */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 15px;

  .option-item {
    width: 100%;
  }

  .option-input {
    display: none;

    &:checked + .option-card {
      border-color: #5f150b;
      background: #f9f1f0;

      h4 {
        color: #5f150b;
      }
    }
  }

  .option-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d3cfce;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 150ms ease;
    min-height: 56px;
    box-sizing: border-box;

    h4 {
      margin: 0;
      font-size: 15px;
      color: #33100d;
    }

    .price-tag {
      font-size: 14px;
      font-weight: bold;
      color: #5f150b;
      white-space: nowrap;
    }
  }
}

/* Motivadores (1 por linha, ícone na lateral) */
.motivators-grid {
  grid-template-columns: 1fr !important;

  .motivator-card {
    justify-content: flex-start;
    gap: 14px;

    .motivator-icon {
      width: 32px;
      height: 32px;
      object-fit: contain;
      flex-shrink: 0;
      margin: 0 !important;
    }

    h4 {
      text-align: left;
    }
  }
}

/* Pacotes / Quantidade (1 por linha, sem badge de desconto) */
.packages-grid {
  grid-template-columns: 1fr !important;

  .package-card {
    justify-content: flex-start;

    h4 {
      text-align: left;
    }

    .discount-badge {
      display: none !important;
    }
  }
}

/* Products specific grid layout (1 por linha, imagem sem margem cobrindo 100% da altura) */
.products-grid {
  grid-template-columns: 1fr !important;
  gap: 15px;

  .product-card {
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    text-align: left;
    border-radius: 12px;
    min-height: 120px;

    .product-card-image {
      flex-grow: 0;
      flex-shrink: 0;
      width: 130px;
      margin: 0;
      padding: 0;
      display: flex;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        margin: 0 !important;
        border-radius: 0 !important;
      }
    }

    .product-card-info {
      flex: 1;
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      justify-content: center;

      h4 {
        font-size: 15px;
        margin: 0 0 4px 0;
        text-align: left;
      }

      .product-summary {
        font-size: 12px;
        color: #777;
        margin: 0 0 6px 0;
        line-height: 1.35;
      }

      .product-price {
        font-weight: bold;
        font-size: 14px;
        color: #5f150b;
      }
    }
  }
}

/* Addons (1 por linha, ícone/título na esquerda e valor na direita) */
.addons-grid {
  grid-template-columns: 1fr !important;

  .addon-card {
    justify-content: space-between;

    .addon-card-left {
      display: flex;
      align-items: center;
      gap: 14px;

      .addon-image {
        width: 36px;
        height: 36px;
        object-fit: contain;
        flex-shrink: 0;
        margin: 0 !important;
      }

      h4 {
        text-align: left;
      }
    }
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
