.wp-block-post-content:has(.woocommerce) {
  @media (max-width: 1024px) {
    padding: 0 21px;
  }
}

.woocommerce {
  background-color: #303030;
  display: flex;
  justify-content: center;
  border-radius: 55px;
  overflow: hidden;
  margin-top: 50px;
  margin-bottom: 50px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  
  @media (max-width: 1024px) {
    border-radius: 34px;
    padding: 0;
    gap: 21px;
    margin-top: 41px;
    background: none;
  }

  .woocommerce-MyAccount-navigation {
    display: flex;
    flex-direction: column;
    padding: 60px 20px 80px 20px;
    gap: 20px;
    background-color: #090909;
    width: 100%;
    max-width: 650px;
    border-radius: 55px;

    ul {
      margin: 0px;
    }
    @media (max-width: 1024px) {
      max-width: 100%;
      border-radius: 34px;
      padding: 21px;
      gap: 0;

      .woocommerce-MyAccount-navigation-link:not(.log-out) {
        a {
          display: flex;
          align-items: center;
          justify-content: space-between;
          &::after {
            content: ">";
            font-size: 17px;
            line-height: 20px;
            font-weight: 500;
            color: #00b9f2;
            margin-left: 10px;
          }
        }
      }
    }

    ul {
      display: flex;
      flex-direction: column;
      @media (max-width: 1024px) {
        padding: 0;
        margin-top: -20px;
      }

      &:nth-child(1) {
        .link-your-account {
          border-bottom: 0px;
        }
      }

      h3 {
        font-size: 21px;
        line-height: 34px;
        text-transform: uppercase;
        color: #fff;
        font-weight: 500;
        margin-bottom: 10px;
        @media (max-width: 1024px) {
          font-family: Poppins, sans-serif;
          font-weight: 500;
          font-size: 16px;
        }
      }
      li {
        list-style-type: none;
        color: #ffffff;
        font-size: 21px;
        line-height: 34px;
        font-weight: 500;
        margin-left: 30px;
        padding: 20px 0px;
        border-bottom: 1px solid #ffffff;
        width: 100%;
        max-width: 400px;
        @media (max-width: 1024px) {
          max-width: 100%;
          padding: 10px 0;
          margin-left: 0;
        }

        a {
          text-decoration: none;
          color: #ffffff;
          transition: 0.3s;
          list-style-type: none;
          color: #ffffff;
          font-size: 21px;
          line-height: 34px;
          font-weight: 500;
          @media (max-width: 1024px) {
            font-size: 13px;
            line-height: 20px;
          }

          &:hover {
            color: #00b9f2;
          }
        }

        &.log-out {
          margin: 0px;
          border-bottom: 0px;
          text-transform: uppercase;
          @media (max-width: 1024px) {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            text-align: center;
            bottom: -60px;
          }

          a {
            color: #00b9f2;

            &:hover {
              color: #ffffff;
            }
          }
        }
      }
    }
  }

  .woocommerce-MyAccount-content {
    width: 100%;

    .pms-account-container {
      padding: 60px 80px;
      display: flex;
      flex-direction: column;
      @media (max-width: 1024px) {
        padding: 21px;
        .pms-no-payments {
          background: #454545;
          height: 85px;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 24px;
          font-size: 13px;
          line-height: 20px;
          font-weight: 500;
          color: #ffffff;
        }
      }

      h2 {
        margin-bottom: 100px;
        @media (max-width: 1024px) {
          display: none;
        }
      }

      .pms-account-navigation {
        ul {
          @media (max-width: 1024px) {
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            max-width: 100%;
          }
          gap: 10px;
          justify-content: space-between;
          .pms-account-navigation-link {
            a {
              text-decoration: none;
              color: #ffffff;
              font-size: 21px;
              line-height: 34px;
              font-weight: 500;
              transition: 0.3s;
              @media (max-width: 1024px) {
                font-size: 13px;
                line-height: 20px;
              }

              &:hover {
                color: #00b9f2;
              }
            }
          }
        }
        .pms-account-navigation-link--logout {
          display: none !important;
        }
      }

      #pms_edit-profile-form {
        .pms-form-fields-wrapper {
          .pms-user-login-field,
          .pms-user-email-field,
          .pms-first-name-field,
          .pms-last-name-field,
          .pms-pass1-field,
          .pms-pass2-field {
            display: none;
          }

          li {
            .cozmoslabs-form-field-label {
              color: #ffffff;
              font-size: 14px;
              line-height: 34px;
              font-weight: 500;
            }
            input,
            select {
              background-color: #303030 !important;
              border-radius: 14px;
              font-size: 21px;
              line-height: 34px;
              font-weight: 500;
              color: #ffffff;
              outline: none;
              transition: 0.3s;

              option {
                background-color: #303030;
              }
              &:focus-visible,
              &:focus,
              &:active,
              &:hover {
                outline: none;
                border: 1px solid #00b9f2;
                transition: 0.3s;
              }
              &[type="submit"] {
                color: #00b9f2 !important;
                @media (max-width: 1024px) {
                  font-size: 13px;
                  line-height: 20px;
                  background: none;
                }
              }
            }
            &:has(input[type="submit"]) {
              display: flex;
              justify-content: flex-end;
            }
          }
        }
      }
      .pms-account-subscription-details-table {
        background-color: #202020;
        border-radius: 34px;
        padding: 30px;
        tbody {
          line-height: 40px;

          tr {
            display: flex;
            justify-content: space-between;
            align-items: center;
            td {
              @media (max-width: 1024px) {
                font-size: 13px;
                line-height: 20px;
              }
              &.status-active {
                color: #00b9f2;
              }
              .pms-account-subscription-action-link__cancel {
                text-decoration: none;
                color: #ff7979;
                transition: 0.3s;
                cursor: pointer;
                font-size: 21px;
                line-height: 34px;
                font-weight: 500;
                @media (max-width: 1024px) {
                  font-size: 13px;
                  line-height: 20px;
                }
                &:hover {
                  color: #ffffff;
                }
              }
            }
          }
        }
      }
    }

    h2 {
      color: #ffffff;
      text-transform: uppercase;
      font-weight: 500;
      @media (max-width: 1024px) {
        display: none;
      }
    }

    .account-dashboard,
    .edit-account {
      width: 100%;
      padding: 60px 70px;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
      @media (max-width: 1024px) {
        padding: 21px;
        border-radius: 34px;
        gap: 10px;

        .account-content {
          border-bottom: 1px solid #ffffff;
          margin-top: 20px;
        }
      }

      .content-element {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        border-bottom: 1px solid #ffffff;
        padding: 20px 0px;
        font-size: 21px;
        line-height: 34px;
        color: #ffffff;
        transition: 0.3s;
        position: relative;
        margin: 0px;
        column-gap: 10px;

        label {
          white-space: nowrap;
        }

        @media (max-width: 1024px) {
          font-size: 13px;
          flex-direction: column;
          padding: 0;
          margin: 0;
          align-items: flex-start;
          border: none;
        }
        strong {
          font-style: italic;
          @media (max-width: 1024px) {
            color: #8c8c8c;
            margin-top: -15px;
          }
        }

        &.edit-button {
          text-decoration: none;
          color: #00b9f2;
          cursor: pointer;
          @media (max-width: 1024px) {
            width: 50%;
            float: right;
            display: flex;
            align-items: flex-end;
          }

          &:hover {
            color: #fff;
          }
        }

        &.delete-button {
          text-decoration: none;
          color: #ff7979;
          cursor: pointer;
          @media (max-width: 1024px) {
            width: 50%;
          }

          &:hover {
            color: #ffffff;
          }
        }
        input {
          width: 300px;
          background-color: unset;
          font-size: 17px;
          line-height: 21px;
          color: #ffffff;
          border: 1px solid #ffffff50;
          border-radius: 10px;
          padding: 5px;
          transition: 0.3s;
          @media (max-width: 1024px) {
            width: 100%;
            border-color: #B5B5B5;
            height: 40px;
            border-radius: 21px;
            padding: 0 10px;
            color: #8C8C8C;
          }

          &:focus-visible {
            outline: 0px;
          }

          &.invalid {
            border: 1px solid #ff7979;
          }
        }

        .error-message {
          position: absolute;
          right: 10px;
          top: 14px;
          padding: 0px 10px;
          background-color: #303030;
          font-size: 14px;
          line-height: 8px;
          transition: 0.3s;
          pointer-events: none;
        }

        &.password-container {
          flex-direction: column;

          .first-password,
          .second-password,
          .current-password {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            @media (max-width: 1024px) {
              flex-direction: column;
              align-items: flex-start;

              input {
                width: 100%;
                color: #8C8C8C;
              }
            }

            .password-wrapper {
              position: relative;
              @media (max-width: 1024px) {
                width: 100%;
              }
            }

            .toggle-password {
              position: absolute;
              height: 20px;
              width: 20px;
              right: 10px;
              top: 50%;
              transform: translateY(-50%);
              display: none;
              justify-content: center;
              align-items: center;
              background: none;
              border: 0;
              padding: 0;
              cursor: pointer;

              &:focus-visible {
                outline: none;
                box-shadow: 0 0 0 3px #fff, 0 0 0 6px #005fcc;
                border-radius: 50%;
              }

              img {
                width: 20px;
                height: 20px;
                filter: invert(100%);
                cursor: pointer;
              }
            }
          }
        }
        &.submit-container {
          @media (max-width: 1024px) {
            flex-direction: row-reverse;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            max-width: 100%;
          }
          a {
            text-decoration: none;
            transition: 0.3s;
            cursor: pointer;
            font-size: 21px;
            line-height: 34px;

            &.cancel-button {
              color: #ff7979;
            }

            &:hover {
              color: #ffffff;
            }
          }
          button {
            background-color: unset;
            border: none;
            font-size: 21px;
            line-height: 34px;
            color: #00b9f2;
            transition: 0.3s;
            cursor: pointer;

            &:hover {
              color: #ffffff;
            }

            &:disabled {
              color: grey;
              cursor: default;
            }
          }
        }
      }

      .popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(3px);
        z-index: 999;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition:
          opacity 0.3s ease,
          visibility 0.3s ease;

        &.show {
          opacity: 1;
          visibility: visible;

          .popup-content {
            transform: translateY(0);
          }
        }

        .error-message {
          position: absolute;
          top: 100px;
          right: 60px;
        }

        .popup-content {
          background-color: #303030;
          padding: 30px 60px;
          border-radius: 30px;
          text-align: center;
          width: 600px;
          transform: translateY(-20px);
          transition: transform 0.3s ease;
          display: flex;
          flex-direction: column;
          gap: 30px;

          p {
            color: #ffffff;
            font-size: 21px;
            line-height: 34px;
          }

          .delete-password-container {
            display: flex;
            width: 100%;
            justify-content: space-between;
            gap: 10px;

            label {
              color: #ffffff;
              font-size: 17px;
              line-height: 34px;
              border: none;
              display: flex;
              justify-content: center;
              align-items: center;
            }

            input {
              flex: auto;
              background-color: #ffffff;
              border-radius: 30px;
              color: #303030;
              height: 40px;
              border: none;
              padding: 0px 20px;
              text-align: center;
              @media (max-width: 1024px) {
                color: #8C8C8C;
              }
            }
          }
          .buttons {
            display: flex;
            justify-content: center;
            gap: 20px;

            button {
              border: none;
              border-radius: 30px;
              font-size: 17px;
              line-height: 21px;
              transition: 0.3s;
              padding: 10px 30px;
              cursor: pointer;
              color: #303030;

              &:focus-visible {
                outline: none;
                box-shadow: 0 0 0 3px #fff, 0 0 0 6px #005fcc;
              }

              &#confirm-delete-btn {
                background-color: #00b9f2;
                border: 2px solid #00b9f2;

                &:hover {
                  background-color: #303030;
                  color: #00b9f2;
                }

                &:disabled {
                  border: 2px solid grey;
                  background-color: grey;
                  cursor: default;

                  &:hover {
                    background-color: grey;
                    color: #303030;
                  }
                }
              }

              &#cancel-delete-btn {
                background-color: #ff7979;
                border: 2px solid #ff7979;

                &:hover {
                  background-color: #303030;
                  color: #ff7979;
                }
              }
            }
          }
        }
      }
    }
  }
}

body {
  background-color: #1e1e1e !important;
}

/* Mobile adjustments for My Account layout */
@media (max-width: 768px) {
  /* Stack account content first, navigation second */
  .woocommerce-account .woocommerce {
    display: flex;
    flex-direction: column;
  }

  .woocommerce-account .woocommerce .woocommerce-MyAccount-content {
    order: 1;
    @media (max-width: 1024px) {
      background: #090909;
      border-radius: 34px;
      position: relative;

    }
  }

  .woocommerce-account .woocommerce .woocommerce-MyAccount-navigation {
    order: 3; /* below content and subscription link */
  }

  /* Hide the first navigation group (Konto) on mobile */
  .woocommerce-account
    .woocommerce
    .woocommerce-MyAccount-navigation
    > ul:first-of-type {
    display: none;
  }

  /* Show the mobile-only subscription link under account info */
  .woocommerce-account .account-dashboard .subscription-link-mobile {
    display: block;
    text-decoration: none;
    color: #ffffff;
    border-bottom: 1px solid #ffffff;
    padding: 20px 0;
    font-size: 21px;
    line-height: 34px;
    font-weight: 500;

    @media (max-width: 1024px) {
      display: flex;
      flex-direction: row !important;
      align-items: center;
      justify-content: space-between;
      &::after {
        content: ">";
        font-size: 17px;
        line-height: 20px;
        font-weight: 500;
        color: #00b9f2;
        margin-left: 10px;
      }
    }
  }
}

/* Hide mobile-only subscription link on wider screens */
@media (min-width: 769px) {
  .woocommerce-account .account-dashboard .subscription-link-mobile {
    display: none;
  }
}
