/* Extracted from theme style.css. Keep cascade order in functions.php. */

/* WooCommerce Overrides - Hide default elements */
.woocommerce div.product {
  font-family: var(--body-font);
}

.woocommerce div.product .product_title {
  display: none;
}

.woocommerce div.product p.price {
  display: none;
}

.woocommerce div.product .woocommerce-product-gallery {
  display: none;
}

.woocommerce div.product form.cart {
  margin: 0;
}

.woocommerce div.product div.summary {
  margin: 0;
  padding: 0;
  width: 100%;
  float: none;
}

.woocommerce div.product .product_meta {
  display: none;
}

.woocommerce div.product .related {
  display: none;
}

.woocommerce-breadcrumb {
  display: none;
}

.woocommerce-message {
  display: none;
}

/*----------------Pasarela de pago: Step 1 -------------*/
.review-page-gateway {
  min-height: 100vh;
  padding-top: 2rem;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;

  background: var(--bg);
}

.payment-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: row;
  background: var(--bg);
  padding-top: 4rem;
}

.payment-hero {
  flex: 1;
  min-height: 100vh;
  height: auto;
  align-self: stretch;
  background: linear-gradient(to top,
      var(--brand-orange) 0%,
      var(--brand-pink) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.payment-hero__content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  padding: 0 5rem;
  gap: 2rem;
  line-height: 1;

  &.top {
    padding-top: 3rem;
    justify-content: flex-start;
  }
}

.payment-hero__bubble {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 1);
  opacity: 0.1;
  animation: moveBubble 10s infinite ease-in-out;
}

.payment-hero .b-1 {
  width: 350px;
  height: 350px;
  top: 5%;
  left: 0%;
  animation-duration: 15s;
}

.payment-hero .b-2 {
  width: 400px;
  height: 400px;
  bottom: 0%;
  right: 0%;
  animation-duration: 18s;
}

.payment-hero .b-3 {
  width: 150px;
  height: 150px;
  bottom: 30%;
  left: 35%;
  animation-duration: 12s;
}

.payment-hero .b-4 {
  width: 300px;
  height: 300px;
  top: 60%;
  left: 10%;
  animation-duration: 14s;
}

.payment-hero .b-5 {
  width: 280px;
  height: 280px;
  top: 10%;
  right: 10%;
  animation-duration: 16s;
}

.payment-hero .b-6 {
  width: 150px;
  height: 150px;
  bottom: 55%;
  left: 70%;
  animation-duration: 12s;
}

.checkout-gateway {
  flex: 1;
  height: 100%;
  min-height: 100vh;
  padding: 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-self: flex-start;

  .checkout-gateway__content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;

    a {
      text-decoration: none;
    }
  }

  .stepper-gateway {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;

    .stepper-gateway__step {
      font-size: 1rem;
      font-weight: 700;
      color: var(--purple-stroke);
    }

    .stepper-gateway__bar {
      height: 4px;
      background: var(--gray-4);
      position: relative;

      .stepper-gateway__fill {
        width: 15%;
        height: 100%;
        background: var(--purple-stroke);
        position: absolute;
      }
    }

    .stepper-gateway__labels {
      display: flex;
      justify-content: space-between;

      .stepper-gateway__label {
        font-size: 0.875rem;
        color: var(--gray-2);
        font-weight: 600;
      }
    }
  }

  .checkout-gateway__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .teacher-card-gateway {
    padding: clamp(1rem, 2vw, 1.5rem);
    background: var(--white);
    border-radius: var(--radius-2);
    border: 2px solid var(--purple-stroke);
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    position: relative;

    .product-remove {
      position: absolute;
      top: -0.5rem;
      right: -0.5rem;

      border-radius: 50%;
      width: 30px;
      height: 30px;
      background: var(--purple-stroke);
      display: flex;
      align-items: center;
      justify-content: center;

      a.remove-icon {
        img {
          width: 10px;
          height: 10px;
        }
      }
    }

    .teacher-card-gateway__header {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      gap: 1.5rem;
      border-bottom: 1px solid var(--purple-stroke);
      padding-bottom: 1rem;
      padding-top: 0.5rem;
    }

    .teacher-card-gateway__avatar {
      width: 100px;
      height: 100px;
      background: var(--gray-4);
      border-radius: 50% !important;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .teacher-card-gateway__avatar img {
      width: 100%;
      height: 100%;
      border-radius: 50% !important;
      object-fit: cover;
      display: block;
    }

    .teacher-card-gateway__info {
      flex: 1;
      min-width: 200px;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;

      .teacher-card-gateway__name {
        a {
          text-decoration: none;
        }
      }

      .teacher-card-gateway__tag {
        display: flex;
        align-items: center;
        gap: 0.5rem;

        a {
          text-decoration: none;
        }

        .teacher-card-gateway__icon {
          width: 1.1rem;
          height: 1.1rem;
        }

        .teacher-card-gateway__tag-text {
          font-size: 0.875rem;
          color: var(--gray);
          font-weight: 500;
        }
      }
    }

    .teacher-card-gateway__stats {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      align-items: flex-end;

      .teacher-card-gateway__date {
        display: flex;
        gap: 0.4rem;
        align-items: center;

        img {
          width: 15px;
          height: 15px;
        }
      }

      .teacher-card-gateway__rating {
        display: flex;
        align-items: center;
        gap: 0.5rem;

        .teacher-card-gateway__star {
          width: 1.2rem;
          height: 1.2rem;
          transform: translateY(-1.5px);
        }

        .teacher-card-gateway__score {
          font-size: 1rem;
          font-weight: 700;
          color: var(--gray);
        }

        .teacher-card-gateway__count {
          font-size: 0.75rem;
          color: var(--gray-2);
        }
      }

      .teacher-card-gateway__flags {
        display: flex;
        gap: 2px;
        border-radius: 50%;
        background-color: white;

        .teacher-card-gateway__flag {
          width: 30px;
          height: 30px;
          padding: 0.3rem;
          border-radius: 50%;
          overflow: hidden;
          box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;

          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
    }
  }

  .teacher-card-gateway__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-4);

    .teacher-card-gateway__counter {
      display: flex;
      align-items: center;
      background: var(--gray-4);
      padding: 4px 8px;
      gap: 12px;
      border: 2px solid var(--purple-stroke);
      border-radius: var(--radius-pill);

      .teacher-card-gateway__btn {
        background: none;
        border: none;
        cursor: pointer;
        width: 28px;
        height: 28px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;

        .teacher-card-gateway__line-h {
          width: 12px;
          height: 2px;
          background-color: var(--purple-stroke);
        }

      }

      .teacher-card-gateway__number {
        font-size: 1rem;
        font-weight: 700;
        color: var(--purple-stroke);
      }
    }

    .teacher-card-gateway__price {
      font-size: clamp(1.5rem, 4vw, 2rem);
      font-weight: 800;
      font-family: var(--subtitle-font);
    }
  }
}

.cart-collaterals {
  align-self: flex-end;
}

.summary-gateway {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  .summary-gateway__box {
    background-color: var(--gray-4);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: var(--radius-2);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;

    .summary-gateway__row {
      display: flex;
      justify-content: space-between;
      align-items: center;

      .summary-gateway__label {
        font-size: 1rem;
        color: var(--gray);
        font-weight: 600;
      }

      .summary-gateway__value {
        font-size: 1rem;
        color: var(--gray);
        font-weight: 700;
      }

      .summary-gateway__total-label {
        font-size: clamp(1.5rem, 3vw, 2rem);
        font-weight: 800;
        color: var(--gray);
        font-family: var(--subtitle-font);
      }

      .summary-gateway__total-value {
        font-size: clamp(1.5rem, 3vw, 2rem);
        font-weight: 800;
        color: var(--gray);
        font-family: var(--subtitle-font);
      }
    }

    .summary-gateway__hr {
      border: none;
      border-top: 1px solid var(--purple-stroke);
      opacity: 0.1;
    }
  }
}

.actions-gateway {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: auto;

  .actions-gateway__group {
    display: flex;
    gap: 1rem;
    width: auto;

    a {
      text-decoration: none;
    }
  }
}

.woocommerce .cart-collaterals::after,
.woocommerce .cart-collaterals::before,
.woocommerce-page .cart-collaterals::after,
.woocommerce-page .cart-collaterals::before {
  content: "";
  display: none;
}

.woocommerce .cart-collaterals::after,
.woocommerce-page .cart-collaterals::after {
  content: "";
  display: none;
}

/*-----------Pasarela de pago: step 2-----------*/

.portal-container {
  display: flex;
  min-height: 100vh;
  flex-direction: row;
  padding-top: 2rem;

  .portal-checkout {
    flex: 1;
    padding: clamp(1.5rem, 4vw, 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;

    a {
      text-decoration: none;
    }

    .portal-stepper {
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      width: 100%;

      .portal-stepper__step {
        font-size: 1rem;
        font-weight: 700;
        color: var(--purple-stroke);
      }

      .portal-stepper__bar {
        height: 4px;
        background: var(--gray-4);
        position: relative;

        .portal-stepper__fill {
          width: 50%;
          height: 100%;
          background: var(--purple-stroke);
          position: absolute;
        }
      }

      .portal-stepper__labels {
        display: flex;
        justify-content: space-between;

        .portal-stepper__label {
          font-size: 0.875rem;
          color: var(--gray-2);
          font-weight: 600;

          &.portal-stepper__label--active {
            color: var(--purple-stroke);
            font-weight: 700;
          }
        }
      }
    }


    .portal-form {
      background-color: var(--gray-4);
      padding: 1.5rem;
      border-radius: var(--radius-2);
      box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      gap: 2.5rem;

      font-family: var(--body-font);

      .form-row {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;

        label {
          font-size: 1rem;
        }

        span {

          input,
          select {
            outline: none;
            border: 1px solid var(--purple-stroke);
            border-radius: 8px;
            padding: 0.5rem 0.8rem;
          }
        }
      }
    }
  }
}


/* Runtime/plugin overrides: WooCommerce and payment gateways generate these classes. */
.woocommerce table.shop_table {
  border: 1px solid var(--gray-2) !important;
  margin: 0 -1px 24px 0;
  text-align: left;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 5px;
  overflow: hidden;
}

.woocommerce table.shop_table thead th {
  border-bottom: 1px solid var(--gray-2) !important;
}

.woocommerce table.shop_table tfoot .cart-subtotal {
  display: none;
}

.woocommerce-checkout-review-order-table .product-name strong.product-quantity {
  display: none !important;
}

.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout-review-order-table tfoot td {
  text-align: right !important;
}

.woocommerce-checkout-payment {
  ul {
    li {
      label {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--gray);
        font-family: var(--subtitle-font);

        img {
          display: none;
        }
      }

      &::after,
      &::before {
        content: "";
        display: none;
      }
    }
  }

  &::after,
  &::before {
    content: "";
    display: none;
  }
}

.woocommerce-checkout #payment div.payment_box {
  padding: 0;

  p.testmode-info {
    display: none;
  }
}

.woocommerce-checkout #payment div.payment_box p:last-child {
  display: flex;
  flex-direction: row;
  gap: 1rem;

  padding: 0.5rem 0.8rem;
}

.woocommerce-checkout #payment div.form-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  button {
    background-color: var(--purple-stroke);
    color: var(--white) !important;
    border-radius: var(--radius-button);
    font-size: var(--button-small);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 120px;
    height: 45px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    a {
      text-decoration: none;
      color: inherit;
    }

    &:hover {
      background-color: var(--purple-stroke-hover);
    }
  }
}

/* --------------Pasarela de pago: Step 3 ---------- */

.portal-main-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: row;

  .portal-content-view {
    flex: 1;
    padding: clamp(1.5rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4vw, 3.5rem);

    .portal-stepper {
      display: flex;
      flex-direction: column;
      gap: 0.85rem;

      .portal-stepper__track {
        height: 4px;
        background: var(--purple-stroke);
        position: relative;

        .portal-stepper__progress-full {
          width: 100%;
          height: 100%;
          background: var(--purple-stroke);
          position: absolute;
        }
      }

      .portal-stepper__labels {
        display: flex;
        justify-content: space-between;
      }
    }

    .portal-success-card {
      background-color: var(--gray-4);
      padding: clamp(2.5rem, 5vw, 4rem);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 3rem;
      text-align: left;

      .portal-success-card__badge {
        width: 110px;
        height: 110px;
        background: var(--purple-stroke);
        border-radius: var(--radius-pill);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;

        img {
          width: 60px;
          height: 60px;
          object-fit: contain;
        }
      }

      .portal-success-card__info {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
      }
    }

    .portal-onboarding {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;

      .portal-onboarding__grid {
        display: flex;
        gap: 1.5rem;
        max-height: 300px;

        .portal-info-tile {
          flex: 1;
          background: var(--gray4);
          padding: 1.5rem;
          border: 2px solid var(--purple-stroke);

          display: flex;
          flex-direction: column;
          align-items: flex-start;
          justify-content: center;
          gap: 1rem;

          h4 {
            color: var(--gray);
          }

          .portal-info-tile__img {
            width: 35px;
            height: 35px;
            object-fit: contain;
          }
        }
      }
    }

    .portal-footer-nav {
      margin-top: auto;
      padding-top: 2rem;
      display: flex;
      justify-content: flex-end;

      .portal-footer-nav__wrapper {
        display: flex;
        align-items: center;
        gap: 1.5rem;

        a {
          text-decoration: none;
        }
      }
    }
  }
}

@media (max-width: 850px) {
  .terms-page-main {
    .terms-page-container {
      .terms-page-sidebar {
        display: none;
      }
    }
  }
}


@media (max-width: 1024px) {
  .terms-page-main {
    .terms-page-container {
      gap: 4rem;
    }
  }
}

.terms-page-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;

  .terms-page-head {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(120deg, #ffffff 0%, #fc9a3f 100%);
    height: 100%;
    width: 100%;
    padding: 5rem 3rem 3rem;
  }

  .terms-page-container {
    display: flex;
    flex-direction: row;
    gap: 8rem;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding: 2rem 3rem;

    .date {
      margin-bottom: 0.8rem;
    }

    .terms-page-sidebar {
      position: sticky;
      top: 70px;
      flex: 0 0 250px;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      align-items: flex-start;
      justify-content: flex-start;
      border-left: 1px solid var(--gray-3);
      padding-left: 1.5rem;
      height: calc(100vh - 80px);
      overflow-y: auto;
      z-index: 10;
      padding-top: 2rem;

      p {
        padding-bottom: 1rem;
      }

      ul {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        justify-content: flex-start;
        list-style: none;
        position: relative;

        li {
          a {
            font-size: var(--small);
            text-decoration: none;
            color: var(--gray);
            transition: all 0.2s ease;
            border-left: 2px solid transparent;
          }

          a:hover,
          a.active {
            color: var(--purple-stroke);
            font-weight: 600;
          }
        }
      }
    }

    .terms-page-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 2.5rem;
      align-items: flex-start;
      justify-content: flex-start;
      padding-bottom: 1.5rem;

      .terms-page-section {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        justify-content: flex-start;
        color: var(--gray);
        padding-top: 50px;
        margin-top: -50px;

        h2 {
          color: black;
        }

        .terms-page-list {
          display: flex;
          flex-direction: column;
          gap: 0.8rem;
          align-items: flex-start;
          justify-content: flex-start;
          padding-left: 1.5rem;
          padding-top: 0.5rem;
          padding-bottom: 0.5rem;

          li {
            font-size: var(--body);
            color: var(--gray);

            strong {
              color: black;
            }
          }
        }
      }
    }
  }
}

/* ----------- WOOC Options ----------- */

.wc-stripe-express-checkout-element,
.wc-stripe-express-checkout,
#wc-stripe-express-checkout-element,
#wc-stripe-payment-request-wrapper,
#wc-stripe-payment-request-button-separator,
.wc-stripe-payment-request-button-separator {
  display: none !important;
}

#wc-stripe-express-checkout-button-separator,
.wc-stripe-express-checkout-button-separator,
#wc-stripe-payment-request-button-separator,
.wc-stripe-payment-request-button-separator {
  display: none !important;
}

.woocommerce form .form-row::after,
.woocommerce form .form-row::before,
.woocommerce-page form .form-row::after,
.woocommerce-page form .form-row::before {
  content: " ";
  display: none;
}

.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  display: none;
}