/* WooCommerce My Account trên khung customer.css của theme gốc (templates/customers/*). */

/* Thông báo WooCommerce theo snippets/form__error.liquid (.notification). */
:is(.m-customer-forms, .m-register-form, .m-reset-password-form, .m-account, .m-customer-order-detail) :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) {
  display: block;
  margin: 0 0 20px;
  padding: .75rem 1rem;
  border: 0;
  list-style: none;
  background-color: var(--color-warning-bg);
  color: rgb(var(--color-warning));
  font-size: 15px;
  line-height: 1.5;
}
:is(.m-customer-forms, .m-register-form, .m-reset-password-form, .m-account, .m-customer-order-detail) :is(.woocommerce-message, .woocommerce-info) {
  background-color: var(--color-success-bg);
  color: rgb(var(--color-success));
}
:is(.m-customer-forms, .m-register-form, .m-reset-password-form, .m-account, .m-customer-order-detail) :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before {
  content: none;
}
:is(.m-customer-forms, .m-register-form, .m-reset-password-form, .m-account, .m-customer-order-detail) :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) li + li {
  margin-top: 4px;
}
:is(.m-customer-forms, .m-register-form, .m-reset-password-form, .m-account, .m-customer-order-detail) :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) a {
  color: inherit;
  text-decoration: underline;
}
.m-account .notification.show,
.m-reset-password-form .notification.show {
  max-height: none;
}

/* Đăng nhập / đăng ký / đặt lại mật khẩu. */
.m-customer-forms form > .form-field + .m-reset-password-btn {
  margin-top: 20px;
}
.m-register-form__title {
  font-size: 24px;
  line-height: 1.3333;
  font-weight: 500;
  margin-bottom: 24px;
}
.m-register-form .m-button + .m-button {
  margin-top: 0;
}
.m-reset-password-form .m-button {
  width: 100%;
}
.m-reset-password-form .m-reset-password-form__cancel {
  margin-top: 12px;
}
.m-reset-password-form .m-customer__recover-form-posted {
  margin: 0;
}

/* Menu và nội dung tài khoản. */
.m-account__navigation a.active {
  color: rgb(var(--color-foreground));
}
.m-account__content {
  min-width: 0;
}
.m-account .m-customer-address:first-of-type {
  margin-top: 0;
}
.m-account .m-customer-address__empty {
  margin: 0;
  padding: 20px 0;
  color: rgb(var(--color-foreground-secondary));
  border-bottom: 1px solid var(--color-border, #dedede);
}

/* Form địa chỉ (woocommerce_form_field) và thông tin tài khoản. */
.m-account .address-form .woocommerce-address-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.m-account .address-form .form-row {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  grid-column: 1 / -1;
}
.m-account .address-form .form-row-first {
  grid-column: 1;
}
.m-account .address-form .form-row-last {
  grid-column: 2;
}
@media screen and (max-width: 767px) {
  .m-account .address-form .woocommerce-address-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
  .m-account .address-form :is(.form-row-first, .form-row-last) {
    grid-column: 1;
  }
}
.m-account .address-form :is(.form-row label, .form-field--label) {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  line-height: 1.5;
}
.m-account .address-form .required {
  color: rgb(var(--color-error));
  text-decoration: none;
}
.m-account .address-form .form-field-group + .form-field-group {
  margin-top: 16px;
}
.m-account .address-form .form-field--description {
  display: block;
  margin-top: 6px;
  color: rgb(var(--color-foreground-secondary));
  font-size: 14px;
}
.m-account .address-form .form-row .woocommerce-input-wrapper {
  display: block;
}
.m-account .address-form .select2-container .select2-selection--single {
  height: auto;
  min-height: 46px;
  border: var(--inputs-border-width, 1px) solid rgb(var(--color-border));
  background-color: rgb(var(--color-form-field));
}
.m-account .address-form .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 8px 32px 8px 12px;
  line-height: 28px;
  color: rgb(var(--color-form-field-text));
}
.m-account .address-form .select2-container .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 6px;
}
.m-account .address-form .select2-container--focus .select2-selection--single,
.m-account .address-form .select2-container--open .select2-selection--single {
  border-color: var(--field-focus-color) !important;
  box-shadow: var(--field-focus-shadow) !important;
}
.m-account .m-customer__password {
  margin: 40px 0 0;
  padding: 0;
  border: 0;
}
.m-account .m-customer__password legend {
  padding: 0;
}
.m-account .m-customer__action {
  flex-wrap: wrap;
  gap: 12px 20px;
}
.m-account .m-customer__action .m-customer__edit-btn,
.m-account .m-customer__action .m-customer__cancel-edit-btn {
  margin: 0;
}

/* Thẻ thanh toán đã lưu (Stripe) — bảng WooCommerce theo kiểu bảng đơn hàng. */
.m-account .woocommerce-MyAccount-paymentMethods {
  width: 100%;
  margin-bottom: 30px;
  border-collapse: collapse;
  border: 0;
}
.m-account .woocommerce-MyAccount-paymentMethods :is(th, td) {
  padding: 20px 12px 20px 0;
  border: 0;
  border-bottom: 1px solid var(--color-border, #dedede);
  background: none;
  text-align: left;
}
.m-account .woocommerce-MyAccount-paymentMethods th {
  font-weight: 500;
}
.m-account .woocommerce-MyAccount-paymentMethods .button + .button {
  margin-left: 8px;
}

/* Chi tiết đơn hàng (sections/main-order.liquid). */
#MainContent .m-page-header--template-order .m-breadcrumb--item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 24px;
}
.m-customer-order-detail__header p {
  margin: 4px 0 0;
  color: rgb(var(--color-foreground-secondary));
}
.m-customer-order-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.m-customer-order-detail .item-props {
  margin-top: 4px;
  color: rgb(var(--color-foreground-secondary));
  font-size: 14px;
}
.m-customer-order-detail .item-props__property {
  display: block;
}
.m-customer-order-detail .item-props p {
  display: inline;
  margin: 0;
}
.m-customer-order-detail dl,
.m-customer-order-detail dd {
  margin: 0;
}
.m-customer-order-detail .m-order-discount__item svg {
  flex: 0 0 20px;
}
.m-customer-order-detail__updates {
  margin-top: 40px;
}
.m-customer-order-detail__updates h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}
.m-customer-order-detail__update {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border, #dedede);
}
.m-customer-order-detail__update-date {
  margin: 0 0 4px;
  color: rgb(var(--color-foreground-secondary));
  font-size: 14px;
}
.m-customer-order-detail__update p:last-child {
  margin-bottom: 0;
}
