.aneps-checkout-wrapper {
  --padding-top: 25px;
  --padding-bottom: 50px;
  background-color: white;

  padding-top: var(--padding-top);
  padding-bottom: var(--padding-bottom);

  @media (width > 1024px) {
    --padding-top: 45px;
    --padding-bottom: 75px;
  }
}

.aneps-checkout__box {
  box-shadow: var(--shadow-checkout);
  border-radius: var(--card-border-radius);
}

.aneps-checkout__box__content {
  --gap: 1em;
  padding: var(--card-padding);
  align-items: center;
  z-index: 1;
  position: relative;

  &,
  form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    justify-content: space-between;
  }

  .return-message,
  .voucher-message {
    font-size: 1.6em;
    font-weight: 300;
    line-height: 1.3;
    display: none;
  }
  .voucher-message {
    margin-top: 20px !important;

    &.active {
      display: block;
    }
  }
}

.woocommerce form.aneps-checkout .aneps-checkout__box__content .form-row {
  width: 100%;
}

.woocommerce form.aneps-checkout .aneps-checkout__box__content .form-row-first,
.woocommerce form.aneps-checkout .aneps-checkout__box__content .form-row-last {
  width: calc(50% - 5px);
  float: none;
}

/* Custom checkbox styles */
.aneps-checkout .checkbox,
.woocommerce-privacy-policy-text {
  font-size: 1.2em;
  list-style: 1.3;
  font-weight: 300;
  cursor: pointer;

  p {
    line-height: 1.3;
  }
  a {
    color: var(--color-secondary);
    font-weight: var(--font-weight-bold);
    text-decoration: underline;
  }
  input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    aspect-ratio: 1 / 1;
    border: var(--border-thin) solid var(--color-secondary);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    position: relative;
    margin-right: var(--space-2);
    display: inline-flex;

    &:checked {
      background-color: var(--color-secondary);
    }

    &:checked::before {
      content: "✓";
      position: absolute;
      color: white;
      font-size: 12px;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }
}
.woocommerce .aneps-checkout__box__content {
  .form-row-first:has(+ .form-row-middle),
  .form-row-middle,
  .form-row-middle + .form-row-last {
    width: 100%;
    float: left;

    @media (width > 991px) {
      width: calc(100% / 3 - var(--gap)) !important;
    }

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

.woocommerce-checkout #payment {
  background-color: transparent;
}

.woocommerce-checkout .select2-results__option {
  font-size: 1.4em;
  font-weight: 300;
  padding: 15px 10px;
}

.aneps-checkout__box h4 {
  font-size: 1.25em;
  padding: 20px;
  border-bottom: solid 1px var(--color-border);
}

.aneps-checkout
  .select2-container--default
  .select2-selection--single:not([aria-expanded="true"]) {
  border: solid 1px transparent;
  border-bottom: solid 1px var(--color-text-muted);
}

.aneps-checkout .select2-container--default .select2-selection--single {
  padding: 20px 0;
  height: auto;
}

.aneps-checkout
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  font-size: 1.4em;
  font-weight: 300;
  padding: 0;
}

.woocommerce
  form.checkout_coupon.woocommerce-form-coupon
  .checkout-coupon-field {
  margin-bottom: 15px;
}

.woocommerce form.checkout_coupon.woocommerce-form-coupon input.input-text {
  font-size: 1.4em;
  font-weight: 300;
  border: none;
  border-bottom: solid 1px var(--color-text-muted);
  outline: none;
  padding: 20px 15px;
  width: 100%;
  margin-bottom: 0;
}

.woocommerce
  form.checkout_coupon.woocommerce-form-coupon
  input.input-text:focus {
  background: var(--color-gray-bg);
}

.aneps-checkout {
  form .form-row {
    padding: 0;
    position: relative;

    .woocommerce-input-wrapper {
      &::after {
        content: "";
        display: block;
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0%;
        height: 2px;
        background: var(--color-secondary-dark);
        transition: 1s all;
        z-index: 2;
        pointer-events: none;
      }

      &:has(> input:focus)::after,
      &:has(> select:focus)::after {
        width: 100%;
        transition: 0.4s all;
      }
    }

    input[type="email"],
    input[type="date"],
    input[type="tel"],
    input[type="text"],
    input[type="password"],
    select {
      font-size: 1.4em;
      font-weight: 300;
      border: none !important;
      border-bottom: solid 1px var(--color-text-muted) !important;
      border-radius: 0 !important;
      outline: none;
      padding: 20px 15px;
      width: 100%;

      /* Correção para Pagbank */
      &:not([id*="pagbank_credit_card"]) {
        min-height: 64px;
      }

      &:focus {
        border-bottom: solid 1px var(--color-secondary-dark) !important;
        background: var(--color-gray-bg);
        transition:
          border-bottom 0.2s,
          background 0.2s;
      }

      &:disabled,
      .disabled {
        background: var(--color-gray-bg-hover);
        color: var(--color-text-muted);
        cursor: not-allowed;
      }
    }
  }
}

.aneps-checkout input[type="text"]::placeholder,
.aneps-checkout input[type="password"]::placeholder {
  /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: var(--color-text-muted);
  opacity: 1; /* Firefox */
}

.aneps-checkout input[type="text"]:-ms-input-placeholder,
.aneps-checkout input[type="password"]:-ms-input-placeholder {
  /* Internet Explorer 10-11 */
  color: var(--color-text-muted);
}

.aneps-checkout input[type="text"]::-ms-input-placeholder,
.aneps-checkout input[type="password"]::-ms-input-placeholder {
  /* Microsoft Edge */
  color: var(--color-text-muted);
}

.aneps-checkout .checkout-label {
  position: relative;

  > label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    font-size: 1.4em;
    font-weight: 300;
    color: var(--color-text-muted);
    opacity: 1;
    pointer-events: none;
    transition:
      top 0.2s ease,
      transform 0.2s ease,
      font-size 0.2s ease,
      opacity 0.2s ease,
      color 0.2s ease;
    z-index: 1;
    display: block !important;
    clip: auto !important;
    clip-path: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    white-space: nowrap;
  }

  input[type="email"],
  input[type="date"],
  input[type="tel"],
  input[type="text"],
  input[type="password"],
  select,
  textarea {
    transition:
      color 0.2s ease;
  }

  input::placeholder,
  textarea::placeholder {
    color: transparent !important;
    opacity: 0 !important;
  }

  input[type="date"]:not(:focus):not(.has-value)::-webkit-datetime-edit {
    color: transparent !important;
  }

  &:has(input:focus) > label,
  &:has(select:focus) > label,
  &:has(textarea:focus) > label,
  &:has(input:not(:placeholder-shown)) > label,
  &:has(textarea:not(:placeholder-shown)) > label,
  &:has(select option:checked:not([value=""])) > label,
  &:has(input[type="date"][value]) > label,
  &:has(.has-value) > label {
    top: 5px;
    transform: none;
    font-size: 1em;
    opacity: 1;
  }

  &:has(input:focus) > label,
  &:has(select:focus) > label,
  &:has(textarea:focus) > label {
    color: var(--color-secondary-dark);
  }

  &:has(input:focus),
  &:has(select:focus),
  &:has(textarea:focus),
  &:has(input:not(:placeholder-shown)),
  &:has(textarea:not(:placeholder-shown)),
  &:has(select option:checked:not([value=""])),
  &:has(input[type="date"][value]),
  &:has(.has-value) {
    input[type="email"],
    input[type="date"],
    input[type="tel"],
    input[type="text"],
    input[type="password"],
    select,
    textarea {
      padding-top: 28px;
      padding-bottom: 12px;
    }
  }

  &:has(input:focus),
  &:has(textarea:focus),
  &:has(input:not(:placeholder-shown)),
  &:has(textarea:not(:placeholder-shown)) {
    input[type="email"]::placeholder,
    input[type="date"]::placeholder,
    input[type="tel"]::placeholder,
    input[type="text"]::placeholder,
    input[type="password"]::placeholder,
    textarea::placeholder {
      color: transparent;
    }
  }
}

.woocommerce-checkout-review-order-table h4 {
  position: relative;
  cursor: pointer;
}

.woocommerce-checkout-review-order-table h4::before {
  content: "";
  display: block;
  position: absolute;
  width: 8px;
  height: 14px;
  background: url(./../images/anchor_right.svg) no-repeat center center;
  background-size: 100%;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transition: all 300ms;
}

.woocommerce-checkout-review-order-table h4.aberto::before {
  transform: translateY(-50%) rotate(-90deg);
}

.woocommerce-checkout .shop_table th {
  font-size: 1.2em;
  font-weight: 400 !important;
  color: var(--color-text-secondary);
}

.woocommerce-checkout .order-total th {
  font-size: 1.6em;
  font-weight: 500 !important;
}

.woocommerce-checkout .shop_table td {
  font-size: 1.8em !important;
  font-weight: 600;
  color: #333f49;
}

.woocommerce-checkout .shop_table tr:first-child th,
.woocommerce-checkout .shop_table tr:first-child td {
  border: 0 !important;
}

.aneps-cart__bag {
  margin-top: -6px;
}

.woocommerce table.shop_table {
  border: 0;
}

.aneps-checkout select {
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  background-image: url(../images/down_select.png) !important;
  background-position: right 8px center !important;
  background-repeat: no-repeat !important;
  padding-right: 20px !important;
}

.aneps-checkout .select2-container {
  width: 100% !important;
}

.aneps-checkout
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow
  b {
  width: 100%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%) rotate(90deg);
  background: url(../images/anchor_right.svg) no-repeat center center !important;
  background-size: contain;
  border: none;
  margin-top: 18px;
}

.aneps-checkout #billing_country_field {
  display: none;
}

.woocommerce-checkout .select2-search--dropdown .select2-search__field {
  font-size: 1.4em;
  font-weight: 300;
  padding: 15px;
}

.checkout-steps {
  font-size: 1.1em;
  font-weight: 500;
  z-index: 11;
  margin: 0 auto 50px auto;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.checkout-steps li:first-child {
  margin-left: 50px;
}

.checkout-steps li:first-child::before {
  width: 70px;
}

.checkout-steps li {
  width: 35px;
  height: 35px;
  position: relative;
  margin-left: 150px;
  flex: 0 0 auto;
}

.checkout-steps li span {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 5px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.checkout-steps li span .aneps-checkout-control-steps {
  color: var(--color-secondary);
  text-decoration: none;
  display: block;
  line-height: inherit;
  margin-top: 0;
  transition:
    color 0.4s ease,
    font-weight 0.4s ease;
}

.checkout-steps li span .aneps-checkout-control-steps.active {
  color: var(--color-secondary-light);
  font-weight: 700;
}

.checkout-steps li span .aneps-checkout-control-steps.is-completed {
  color: #43db99;
  font-weight: 700;
}

.checkout-steps li span a.aneps-checkout-control-steps {
  cursor: pointer;
}

.checkout-steps li span .aneps-checkout-step-label-payment {
  cursor: default;
}

.checkout-steps li::before,
.checkout-steps li::after {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
}

.checkout-steps li::before {
  height: 3px;
  width: 190px;
  background: #cbcbcb;
  transform: translateY(-50%);
  right: 14px;
}

.checkout-steps li::after {
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #cbcbcb;
  border-radius: 50%;
  z-index: 1;
}

.checkout-steps__0 li:first-child::after,
.checkout-steps__1 li:nth-child(-n + 2)::after,
.checkout-steps__2 li:nth-child(-n + 3)::after,
.checkout-steps__3 li:nth-child(-n + 4)::after {
  background: #43db99 url(../images/checked_icon.svg) no-repeat center center;
  background-size: 10px 10px;
}

.checkout-steps__0 li:first-child,
.checkout-steps__1 li:nth-child(2),
.checkout-steps__2 li:nth-child(3),
.checkout-steps__3 li:nth-child(4) {
  color: var(--color-secondary);
  font-weight: 700;
}

.checkout-steps__0 li:first-child::after,
.checkout-steps__0 li:first-child::before {
  background-color: var(--color-secondary);
}

.checkout-steps__1 li:nth-child(2)::after,
.checkout-steps__1 li:nth-child(2)::before,
.checkout-steps__2 li:nth-child(3)::after,
.checkout-steps__2 li:nth-child(3)::before,
.checkout-steps__3 li:nth-child(4)::after,
.checkout-steps__3 li:nth-child(4)::before {
  background-color: var(--color-secondary);
}

.checkout-steps__1 li:first-child,
.checkout-steps__2 li:nth-child(-n + 2),
.checkout-steps__3 li:nth-child(-n + 3),
.checkout-steps__4 li:nth-child(-n + 4) {
  color: #43db99;
  font-weight: 700;
}

.checkout-steps__1 li:first-child::before,
.checkout-steps__1 li:first-child::after,
.checkout-steps__2 li:nth-child(-n + 2)::after,
.checkout-steps__2 li:nth-child(-n + 2)::before,
.checkout-steps__2 li:nth-child(2)::after,
.checkout-steps__3 li:nth-child(3)::before,
.checkout-steps__3 li:nth-child(3)::after {
  background-color: #43db99;
}

.checkout-steps__0 li:first-child::after,
.checkout-steps__1 li:nth-child(-n + 2)::after,
.checkout-steps__2 li:nth-child(-n + 3)::after,
.checkout-steps__3 li:nth-child(-n + 4)::after {
  width: 25px;
  height: 25px;
}

.aneps-checkout__step:not(.aneps-checkout__0) {
  display: none;
}

.aneps-checkout__step--hidden {
  display: none;
}

.aneps-checkout__step--visible {
  display: block;
}

#checkout_resume .btn {
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

.aneps-checkout__box__content .shop_table {
  margin-bottom: 0 !important;
}

.woocommerce-checkout table.shop_table td {
  padding: 20px 12px;
}

.woocommerce-checkout table.shop_table td:first-child,
.woocommerce-checkout table.shop_table th:first-child {
  padding-left: 0;
}

.woocommerce-checkout table.shop_table td:last-child {
  padding-right: 0;
}

.woocommerce-checkout table.shop_table td:only-child {
  padding-left: 0;
  padding-right: 0;
}

.woocommerce-checkout td:last-child:not(:only-child) {
  text-align: right;
}

#aneps-checkout__products {
  display: none;
}

.woocommerce-checkout .shop_table td.product-thumbnail img {
  width: 52px;
  height: 52px;
  max-width: 52px !important;
  border-radius: 10px;
  object-fit: cover;
}

.woocommerce-checkout .shop_table td.product-name {
  text-align: left !important;
  font-size: 1.4em !important;
  line-height: 1.4em !important;
}

.woocommerce-checkout .shop_table .product-total {
  display: block;
  color: var(--color-secondary);
  font-size: 0.9em;
}

.woocommerce-checkout .woocommerce-remove-coupon {
  font-size: 0;
}

.woocommerce-checkout .woocommerce-remove-coupon::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url(../images/ico_close.svg) no-repeat center center;
  background-size: contain;
}

.woocommerce form.checkout_coupon {
  display: block !important;
  margin: 0;
  padding: 0;
  border: 0;
  position: relative;
}

.woocommerce form.checkout_coupon button {
  position: absolute;
  top: 20px;
  border: 0;
  background: transparent;
  color: var(--color-secondary);
  font-weight: bold;
  font-size: 1.5em;
  right: 0;
}

.woocommerce form.checkout_coupon label {
  font-size: 1.2em;
  font-weight: 400;
}

#checkout_resume {
  margin-bottom: 40px;
}

.woocommerce form.login,
.woocommerce form.register {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
}

.woocommerce form.register .d-flex {
  gap: 20px;
}

.woocommerce .woocommerce-form-login .woocommerce-form-login__submit {
  margin-right: 0;
}

.woocommerce .woocommerce-form-login .woocommerce-form-login__rememberme {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1em;
  font-weight: 400;
  cursor: pointer;
}

.woocommerce .woocommerce-form-login .woocommerce-form-login__rememberme input {
  width: 20px;
  height: 20px;
  margin-top: 0;
  margin-right: 10px;
}

.woocommerce-form-login .password-input {
  position: relative;
}

.show-password-input::after {
  content: "";
  background: url(../images/toggle_password.svg) no-repeat center center;
  background-size: contain;
  font-size: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.show-password-input {
  width: 20px;
  height: 20px;
  display: block;
  top: 23% !important;
  position: absolute;
  right: 0 !important;
}

.form-row-wide {
  width: 100%;
}

@media (max-width: 991px) {
  #checkout_resume {
    margin-top: 40px;
  }

  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last {
    width: 100%;
  }

  .checkout-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: min(100%, 680px);
    font-size: 0.8em;
    margin-bottom: 36px;
  }

  .checkout-steps li {
    flex: 1 1 0;
    min-width: 0;
    margin-left: 0;
    padding-top: 2px;
  }

  .checkout-steps li:first-child {
    margin-left: 0;
  }

  .checkout-steps li::before {
    top: 17px;
    left: calc(-50% - 6px);
    right: auto;
    width: calc(100% + 12px);
  }

  .checkout-steps li:first-child::before {
    display: none;
  }

  .checkout-steps li span {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    transform: none;
    white-space: normal;
  }

  .checkout-steps li span .aneps-checkout-control-steps {
    width: min(100%, 88px);
    max-width: 100%;
    line-height: 1.35;
    text-wrap: balance;
  }

  .checkout-steps li::after {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 5px auto 0;
  }

  .checkout-steps__0 li:first-child::after,
  .checkout-steps__1 li:nth-child(-n + 2)::after,
  .checkout-steps__2 li:nth-child(-n + 3)::after,
  .checkout-steps__3 li:nth-child(-n + 4)::after {
    margin-top: 0;
  }

  .woocommerce .woocommerce-form-login .woocommerce-form-login__rememberme {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    justify-content: center;
  }

  .woocommerce form.login {
    padding-bottom: 20px;
  }
}

@media (max-width: 575px) {
  .checkout-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
    width: 100%;
    max-width: 360px;
    justify-content: center;
  }

  .checkout-steps li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: auto;
    padding-top: 0;
  }

  .checkout-steps li::before {
    display: none;
  }

  .checkout-steps li::after {
    order: 1;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 auto 10px;
  }

  .checkout-steps li span {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    margin-top: 0;
    text-align: center;
  }

  .checkout-steps li span .aneps-checkout-control-steps {
    width: 100%;
    font-size: 1.5em;
    line-height: 1.25;
    text-wrap: balance;
  }

  .checkout-steps__0 li:first-child::after,
  .checkout-steps__1 li:nth-child(-n + 2)::after,
  .checkout-steps__2 li:nth-child(-n + 3)::after,
  .checkout-steps__3 li:nth-child(-n + 4)::after {
    background-size: 10px;
    margin: 0 auto 10px;
  }
}

.order-pay {
  --grid-template-columns: 1fr;
  --gap: 24px;
  display: grid;
  align-items: flex-start;
  grid-template-columns: var(--grid-template-columns);
  gap: var(--gap);
  padding-top: 25px;

  .woocommerce-NoticeGroup {
    grid-column: 1 / -1;

    .woocommerce-error {
      margin: 0;
    }
  }

  .order-pay__header {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .order-pay__eyebrow {
    color: var(--color-secondary);
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .order-pay__title {
    font-size: 2.6em;
    line-height: 1.2;
    margin: 0;
  }

  .order-pay__details,
  .order-pay__payment {
    min-width: 0;
  }

  .order-pay__details .aneps-checkout__box__content,
  .order-pay__payment .aneps-checkout__box__content {
    display: block;
    padding: var(--card-padding);
  }

  .shop_table {
    border-radius: 15px !important;
    margin: 0 !important;

    thead {
      border-bottom: 1px solid var(--border-color);

      tr {
        th:last-child {
          text-align: right;
        }
      }
    }

    th,
    td {
      vertical-align: top;
    }

    .product-quantity,
    .product-total,
    .product-subtotal {
      white-space: nowrap;
    }
  }

  .order-pay__payment-description {
    font-size: 1.3em;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin: 0 0 20px 0;
  }

  @media (width > 768px) {
    --grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    --gap: 32px;
  }
}

.woocommerce-checkout #payment,
.order-pay #payment {
  background: transparent;
}

.woocommerce-checkout #payment .wc_payment_methods.payment_methods.methods,
.order-pay .wc_payment_methods.payment_methods.methods {
  padding-top: 0 !important;
  margin: 0;
}

.woocommerce-checkout #payment .wc_payment_method,
.order-pay .wc_payment_method {
  box-shadow: none;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  margin-bottom: 12px !important;
  overflow: hidden;
}

.woocommerce-checkout #payment .wc_payment_method > input,
.order-pay .wc_payment_method > input {
  position: absolute;
  top: 18px;
  left: 16px;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.woocommerce-checkout #payment .wc_payment_method > label,
.order-pay .wc_payment_method > label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 16px;
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0 !important;
  width: 100%;
  cursor: pointer;
}

.woocommerce-checkout #payment .wc_payment_method > label img,
.order-pay .wc_payment_method > label img {
  max-height: 28px;
  width: auto;
}

.woocommerce-checkout #payment .wc_payment_method > input:checked + label,
.order-pay .wc_payment_method > input:checked + label,
.woocommerce-checkout
  #payment
  .woocommerce-SavedPaymentMethods-tokenInput:checked
  + label,
.order-pay
  #payment
  .woocommerce-SavedPaymentMethods-tokenInput:checked
  + label {
  color: var(--color-secondary);
}

.woocommerce-checkout #payment .woocommerce-SavedPaymentMethods,
.order-pay #payment .woocommerce-SavedPaymentMethods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px 0;
  padding: 0;
  list-style: none;
}

.woocommerce-checkout #payment .woocommerce-SavedPaymentMethods > li,
.order-pay #payment .woocommerce-SavedPaymentMethods > li {
  margin: 0;
  padding: 0;
}

.woocommerce-checkout #payment .woocommerce-SavedPaymentMethods-tokenInput,
.order-pay #payment .woocommerce-SavedPaymentMethods-tokenInput {
  display: none !important;
}

.woocommerce-checkout #payment .woocommerce-SavedPaymentMethods > li > label,
.order-pay #payment .woocommerce-SavedPaymentMethods > li > label {
  display: block;
  font-size: 1.3em !important;
  line-height: 1.5;
  margin: 0 !important;
  cursor: pointer;
}

.woocommerce-checkout #payment .payment_box,
.order-pay .payment_box {
  &::before {
    display: none;
  }

  background: transparent !important;
  border-top: 1px solid var(--color-border);
  padding-block-start: 12px;
  width: auto;
  margin: 0 16px 16px 16px !important;

  .form_row {
    padding: 0 !important;
  }

  label {
    font-size: 1.2em !important;
    font-weight: 500;

    span {
      color: red;
    }
  }

  input:not([type="checkbox"]) {
    border: none !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: 30px !important;
    padding: 5px 15px !important;
    margin-top: 5px !important;
  }

  input[type="checkbox"] {
    width: 15px;
    height: 15px;
  }

  > p:only-child {
    font-size: 1.2em;
    margin: 0 !important;
  }

  > p:last-child {
    display: flex;
    align-items: center;
    margin-top: 0;

    label {
      margin: 0 !important;
    }
  }
}

.woocommerce-checkout,
.order-pay {
  #payment .wc_payment_method .payment_box .wc-saved-payment-methods {
    margin: 1em;
  }
}

.woocommerce-checkout #payment .form-row,
.order-pay .form-row {
  margin: 0;
}

.woocommerce-checkout #payment .form-row .button,
.woocommerce-checkout #payment .form-row .btn,
.order-pay .form-row .button,
.order-pay .form-row .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  margin-top: 20px;
}

.checkout-cart-error-container {
  --max-width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 1em;

  @media (width > 1024px) {
    --max-width: 600px;
  }

  p {
    line-height: 1.6;
    color: #666666;
  }

  a {
    display: inline-flex;
  }
}

/* Payment modal overlay */
.aneps-payment-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;

  &.active {
    display: flex;
  }
}

.aneps-payment-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.aneps-payment-modal__content {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.aneps-payment-modal__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--color-secondary, var(--color-secondary));
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: aneps-spin 0.8s linear infinite;
}

@keyframes aneps-spin {
  to {
    rotate: 360deg;
  }
}

.aneps-payment-modal__status {
  font-size: 1.4em;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.aneps-payment-modal__title {
  font-size: 1.6em;
  font-weight: 700;
  color: #222;
  margin: 0 0 12px;
}

.aneps-payment-modal__sub {
  font-size: 1.1em;
  font-weight: 300;
  color: #888;
}

.aneps-zero-coupon-msg {
  width: 100%;
  font-size: 1.4em;
  font-weight: 400;
  color: var(--color-secondary, var(--color-secondary));
  padding: 16px;
  background: #f0f7ff;
  border-radius: 8px;
  text-align: center;
}
