/* 2.3.77 — Trang Đơn mua có tab trạng thái và liên kết từ Tổng quan. */

/* Các ô trạng thái ở Tổng quan phản hồi rõ hơn khi bấm. */
body.woocommerce-account .moon-account-status {
  position:relative;
  transition:transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

body.woocommerce-account .moon-account-status:hover,
body.woocommerce-account .moon-account-status:focus-visible {
  z-index:1;
  background:#fff8f3 !important;
  box-shadow:0 8px 20px rgba(218,105,53,.10);
  transform:translateY(-2px);
  outline:none;
}

/* Thanh tab trạng thái trong My Account > Đơn mua. */
body.woocommerce-account .moon-order-tabs {
  position:relative;
  width:100%;
  margin:0 0 16px;
  border:1px solid #eadfd8;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 24px rgba(77,48,33,.045);
  overflow:hidden;
}

body.woocommerce-account .moon-order-tabs__track {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  width:100%;
}

body.woocommerce-account .moon-order-tabs__item {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-width:0;
  min-height:58px;
  padding:12px 8px 14px;
  border-right:1px solid #f1e9e4;
  color:#5d4b42;
  background:#fff;
  font-size:12px;
  font-weight:750;
  line-height:1.25;
  text-align:center;
  text-decoration:none !important;
  transition:color .18s ease, background-color .18s ease;
}

body.woocommerce-account .moon-order-tabs__item:last-child {
  border-right:0;
}

body.woocommerce-account .moon-order-tabs__item::after {
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:0;
  height:3px;
  border-radius:999px 999px 0 0;
  background:transparent;
  transform:scaleX(.35);
  transition:transform .18s ease, background-color .18s ease;
}

body.woocommerce-account .moon-order-tabs__item:hover,
body.woocommerce-account .moon-order-tabs__item:focus-visible {
  color:#d7632f;
  background:#fff9f5;
  outline:none;
}

body.woocommerce-account .moon-order-tabs__item.is-active {
  color:#e26b35;
  background:linear-gradient(180deg,#fffaf7,#fff5ee);
}

body.woocommerce-account .moon-order-tabs__item.is-active::after {
  background:#ef7840;
  transform:scaleX(1);
}

body.woocommerce-account .moon-order-tabs__item b {
  display:inline-grid;
  place-items:center;
  min-width:19px;
  height:19px;
  padding:0 5px;
  border-radius:999px;
  color:#fff;
  background:#ef7840;
  font-size:9px;
  font-weight:850;
  line-height:1;
}

body.woocommerce-account .moon-order-tabs__heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin:0 0 13px;
  padding:0 2px;
}

body.woocommerce-account .moon-order-tabs__heading > div {
  min-width:0;
}

body.woocommerce-account .moon-order-tabs__heading small {
  display:block;
  margin:0 0 3px;
  color:#b66d49;
  font-size:9px;
  font-weight:850;
  letter-spacing:.09em;
}

body.woocommerce-account .moon-order-tabs__heading h2 {
  margin:0;
  color:#362a24;
  font-size:21px;
  line-height:1.25;
}

body.woocommerce-account .moon-order-tabs__heading > span {
  flex:0 0 auto;
  color:#8b7a70;
  font-size:10px;
}

/* Giữ danh sách đơn ngay sát thanh tab. */
body.woocommerce-account .moon-order-tabs + .moon-order-tabs__heading + .woocommerce-orders-table,
body.woocommerce-account .moon-order-tabs + .moon-order-tabs__heading + .woocommerce-info {
  margin-top:0 !important;
}

/* Mobile: tab cuộn ngang giống ứng dụng mua sắm, không ép chữ quá nhỏ. */
@media (max-width:782px) {
  body.woocommerce-account .moon-order-tabs {
    width:calc(100% + 2px);
    margin-left:-1px;
    margin-right:-1px;
    border-radius:13px;
  }

  body.woocommerce-account .moon-order-tabs__track {
    display:flex;
    align-items:stretch;
    width:max-content;
    min-width:100%;
    overflow:visible;
  }

  body.woocommerce-account .moon-order-tabs {
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }

  body.woocommerce-account .moon-order-tabs::-webkit-scrollbar {
    display:none;
  }

  body.woocommerce-account .moon-order-tabs__item {
    flex:1 0 104px;
    min-width:104px;
    min-height:52px;
    padding:10px 7px 13px;
    font-size:10px;
    white-space:nowrap;
  }

  body.woocommerce-account .moon-order-tabs__item:first-child {
    flex-basis:82px;
    min-width:82px;
  }

  body.woocommerce-account .moon-order-tabs__item::after {
    left:10px;
    right:10px;
  }

  body.woocommerce-account .moon-order-tabs__item b {
    min-width:17px;
    height:17px;
    padding:0 4px;
    font-size:8px;
  }

  body.woocommerce-account .moon-order-tabs__heading {
    align-items:flex-start;
    margin-bottom:10px;
  }

  body.woocommerce-account .moon-order-tabs__heading h2 {
    font-size:17px;
  }

  body.woocommerce-account .moon-order-tabs__heading > span {
    display:none;
  }

  body.woocommerce-account .moon-account-status:active {
    transform:scale(.97);
  }
}

@media (max-width:390px) {
  body.woocommerce-account .moon-order-tabs__item {
    flex-basis:96px;
    min-width:96px;
    font-size:9.4px;
  }

  body.woocommerce-account .moon-order-tabs__item:first-child {
    flex-basis:74px;
    min-width:74px;
  }
}
