/* WooCommerce customer account navigation and content. */
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) {
  --mg-account-ink: #211b17;
  --mg-account-accent: #873508;
  --mg-account-button: #a94413;
  --mg-account-tint: #fff0e5;
  --mg-account-border: #eae3dd;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 3vw, 32px);
  max-width: 1080px;
  margin-inline: auto;
  padding-block: clamp(16px, 3vw, 32px);
  color: var(--mg-account-ink);
}

body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation)::before,
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation)::after {
  display: none;
}

body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > :not(
  .woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content
) {
  grid-column: 1 / -1;
}

body.woocommerce-account .woocommerce > :is(.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--mg-account-border);
  border-radius: 14px;
  box-sizing: border-box;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
  padding: 8px;
  background: #faf7f4;
}

body.woocommerce-account .woocommerce-MyAccount-navigation :is(.mg-account-primary, .mg-account-signout, .mg-account-more > ul) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li > a,
body.woocommerce-account .mg-account-more > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  box-sizing: border-box;
  color: var(--mg-account-ink);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

body.woocommerce-account .mg-account-more {
  border-top: 1px solid var(--mg-account-border);
  margin-top: 6px;
  padding-top: 4px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul.mg-account-signout {
  border-top: 1px solid var(--mg-account-border);
  margin-top: 6px;
  padding-top: 4px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation .mg-account-signout li > a {
  color: #685b52;
  font-weight: 500;
}

body.woocommerce-account .mg-account-more > summary {
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  color: #685b52;
  font-weight: 500;
}

body.woocommerce-account .mg-account-more > summary::-webkit-details-marker {
  display: none;
}

body.woocommerce-account .mg-account-more > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}

body.woocommerce-account .mg-account-more[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li > a:hover,
body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a,
body.woocommerce-account .woocommerce-MyAccount-navigation a[aria-current="page"] {
  background: var(--mg-account-tint);
  color: var(--mg-account-accent);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a,
body.woocommerce-account .woocommerce-MyAccount-navigation a[aria-current="page"] {
  border-color: #eacdbb;
  font-weight: 750;
}

body.woocommerce-account .woocommerce-MyAccount-content {
  padding: clamp(14px, 3vw, 28px);
  background: #fff;
  color: var(--mg-account-ink);
  overflow-wrap: anywhere;
}

body.woocommerce-account .woocommerce-MyAccount-content > :last-child {
  margin-bottom: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content .mg-account-title {
  margin: 0 0 clamp(16px, 3vw, 24px);
  color: var(--mg-account-ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.02em;
}

body.woocommerce-account .woocommerce-EditAccountForm .input-text {
  min-height: 44px;
  border-color: var(--mg-account-border);
  border-radius: 9px;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-MyAccount-orders {
  margin: 0;
  border: 0;
  border-collapse: collapse;
}

body.woocommerce-account .woocommerce-MyAccount-orders :is(th, td) {
  padding: 12px 8px;
  border: 0;
  border-bottom: 1px solid var(--mg-account-border);
  background: transparent;
  color: var(--mg-account-ink);
}

body.woocommerce-account .woocommerce-MyAccount-orders thead th {
  color: #685b52;
  font-size: .83rem;
}

body.woocommerce-account .woocommerce-MyAccount-orders .woocommerce-orders-table__cell-order-number a {
  font-weight: 700;
}

body.woocommerce-account .woocommerce-MyAccount-content a:not(.button) {
  color: var(--mg-account-accent);
  text-decoration: underline;
  text-underline-offset: .16em;
}

body.woocommerce-account .woocommerce-MyAccount-content :is(a, button, input).button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--mg-account-button);
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}

body.woocommerce-account .woocommerce-MyAccount-content :is(a, button, input).button:hover {
  background: var(--mg-account-accent);
  color: #fff;
}

body.woocommerce-account :is(.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) :focus-visible {
  outline: 2px solid var(--mg-account-button);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation ul.mg-account-primary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation .mg-account-primary li > a {
    justify-content: center;
    padding-inline: 5px;
    text-align: center;
  }
}
