/* ----------------------------------------------------------
   MOBILE MY ACCOUNT LAYOUT — XSTORE CHILD
   ----------------------------------------------------------*/

@media (max-width: 768px) {

  /* Wrapper becomes vertical layout on mobile */
  .woocommerce-MyAccount-navigation-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 12px;
  }

  /* User info stays at very top */
  .woocommerce-MyAccount-navigation-wrapper .MyAccount-user-info {
    order: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
  }

  /* Avatar styling */
  .woocommerce-MyAccount-navigation-wrapper .MyAccount-user-info img {
    border-radius: 50%;
  }

  /* Navigation — horizontal scroll */
  .woocommerce-MyAccount-navigation {
    order: 1;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0;
    margin: 0;
  }

  .woocommerce-MyAccount-navigation li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .woocommerce-MyAccount-navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    white-space: nowrap;
    background: #fff;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid rgba(0,0,0,0.08);
    text-decoration: none;
    transition: 0.2s;
  }

  /* Hover effect */
  .woocommerce-MyAccount-navigation a:hover {
    background: #f3f3f3;
  }

  /* Active tab */
  .woocommerce-MyAccount-navigation .is-active a {
    background: var(--et_main-color, #0b7cff);
    color: #fff;
    border-color: var(--et_main-color, #0b7cff);
  }

  /* Content area below nav */
  .woocommerce-MyAccount-content {
    padding: 15px;
  }
}

/* ===== Strong, specific styles for My Account user info (XStore Child) ===== */

/* Target the exact wrapper used by your template */
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info {
    /* Force a two-column flex layout and prevent accidental overriding */
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: row !important;
    flex-direction: row !important;
    -ms-flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 12px 0 !important;
    box-sizing: border-box !important;
}

/* Left column: avatar */
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info .user-info-left,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info .user-info-left {
    flex: 0 0 auto !important; /* fixed width block */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

/* Avatar image - force size and shape */
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info .user-info-left img,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info .user-info-left img,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info .user-info-left .avatar,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info .user-info-left .avatar {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Right column: text block — take remaining width */
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info .user-info-right,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info .user-info-right {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important; /* left-align the texts */
    text-align: left !important;
    gap: 3px !important;
    margin: 0 !important;
}

/* Name styling */
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info .MyAccount-user-name,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info .MyAccount-user-name {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    margin: 0 0 4px 0 !important;
    color: inherit !important;
    text-align: left !important;
}

/* Email and phone lines with prefixes */
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info .MyAccount-user-email,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info .MyAccount-user-email,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info .MyAccount-user-phone,
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info .MyAccount-user-phone {
    font-size: 14px !important;
    color: #444 !important;
    margin: 0 !important;
    text-align: left !important;
}

/* If XStore adds float or width rules, override them */
.woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info * {
    float: none !important;
    width: auto !important;
}

/* Mobile tweaks: ensure enough spacing on small screens */
@media (max-width: 480px) {
    .woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info {
        gap: 10px !important;
        padding: 10px 6px !important;
    }
    .woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info .user-info-left img {
        width: 56px !important;
        height: 56px !important;
    }
    .woocommerce-MyAccount-navigation-wrapper.type-new .MyAccount-user-info.custom-user-info .MyAccount-user-name {
        font-size: 16px !important;
    }
}

/* ===========================
   Ensure larger padding for My Account nav buttons
   Paste this at the very end of myaccount-mobile.css
   =========================== */

/* Mobile / tablet (override theme) */
@media (max-width: 1024px) {

  /* Strongly target XStore's wrapper + nav links */
  .woocommerce-MyAccount-navigation-wrapper.type-new .woocommerce-MyAccount-navigation ul,
  .woocommerce-MyAccount-navigation-wrapper.type-new .woocommerce-MyAccount-navigation ul li {
      margin: 0;
      padding: 0;
      list-style: none;
  }

  .woocommerce-MyAccount-navigation-wrapper.type-new .woocommerce-MyAccount-navigation a,
  .woocommerce-MyAccount-navigation-wrapper.type-new .woocommerce-MyAccount-navigation ul li a,
  .woocommerce-MyAccount-navigation a {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      padding: 10px 15px !important;        /* ← desired padding: top/bottom left/right */
      font-size: 15px !important;           /* optional: increase text size */
      line-height: 1 !important;
      min-width: 64px !important;           /* prevents collapse when label short */
      white-space: nowrap !important;
      box-sizing: border-box !important;
      border-radius: 10px !important;
  }

  /* If your theme applies inner <span> or child rules, target them too */
  .woocommerce-MyAccount-navigation-wrapper.type-new .woocommerce-MyAccount-navigation a > * {
      display: inline-block !important;
      padding: 0 !important;
      margin: 0 !important;
  }

  /* Increase hit area on small screens */
  .woocommerce-MyAccount-navigation-wrapper.type-new .woocommerce-MyAccount-navigation a,
  .woocommerce-MyAccount-navigation a {
      touch-action: manipulation;
  }

  /* If some theme rule uses padding-left/right specifically on li > a, override it */
  .woocommerce-MyAccount-navigation-wrapper.type-new .woocommerce-MyAccount-navigation ul li a {
      padding-left: 10px !important;
      padding-right: 10px !important;
  }
}

/* Desktop: if you want larger pills on desktop as well (optional) */
@media (min-width: 1025px) {
  .woocommerce-MyAccount-navigation-wrapper.type-new .woocommerce-MyAccount-navigation a {
      padding: 12px 20px !important;
      font-size: 15px !important;
  }
}
