:root {
  --cunghoc-checkout-green: #174a35;
  --cunghoc-checkout-green-soft: #eef7f2;
  --cunghoc-checkout-border: #dbe5df;
  --cunghoc-checkout-text: #17221d;
  --cunghoc-checkout-muted: #66756d;
}

.cunghoc-course-cart-page .cunghoc-commerce-heading,
.cunghoc-course-cart-page .cunghoc-cart-layout,
.cunghoc-course-checkout-page .cunghoc-commerce-heading,
.cunghoc-course-checkout-page .woocommerce-form-coupon-toggle,
.cunghoc-course-checkout-page form.checkout_coupon,
.cunghoc-course-checkout-page form.checkout.woocommerce-checkout {
  box-sizing: border-box;
}

.cunghoc-commerce-heading {
  width: calc(100% - 32px);
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 24px;
  border: 1px solid var(--cunghoc-checkout-border);
  border-radius: 18px;
  background: var(--cunghoc-checkout-green-soft);
}

.cunghoc-commerce-heading h1 {
  margin: 4px 0 8px;
  color: var(--cunghoc-checkout-text);
  font-size: clamp(26px, 3vw, 38px);
}

.cunghoc-commerce-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--cunghoc-checkout-muted);
}

.cunghoc-commerce-eyebrow {
  display: inline-block;
  color: var(--cunghoc-checkout-green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/*
 * Flatsome đã tạo sẵn .woocommerce.row gồm cột large-7 và large-5.
 * Không dùng grid ở wrapper ngoài để tránh notices-wrapper đẩy row sang cột khác.
 */
.cunghoc-cart-layout {
  display: block;
  width: calc(100% - 32px);
  max-width: 1200px;
  margin: 0 auto;
}

.cunghoc-cart-layout > .woocommerce-notices-wrapper {
  width: 100%;
}

.cunghoc-cart-layout > .woocommerce.row {
  width: 100%;
  max-width: 100%;
  margin-right: 0;
  margin-left: 0;
}

.cunghoc-cart-layout .woocommerce-cart-form,
.cunghoc-cart-layout .cart-sidebar {
  box-sizing: border-box;
  padding: 22px;
  border: 1px solid var(--cunghoc-checkout-border);
  border-radius: 18px;
  background: #fff;
}

.cunghoc-cart-layout .woocommerce-cart-form {
  width: 100%;
  margin: 0;
}

.cunghoc-cart-layout .cart-collaterals {
  position: static;
  width: 41.66666667%;
}

.cunghoc-cart-layout .cart-sidebar {
  position: sticky;
  top: 24px;
  width: 100%;
}

.cunghoc-cart-layout .cart-collaterals .cart_totals,
.cunghoc-cart-layout .cart-collaterals .cart-sidebar,
.cunghoc-cart-layout .cart-collaterals .ux-cart-coupon {
  width: 100%;
}

.cunghoc-course-cart-page table.shop_table,
.cunghoc-course-checkout-page table.shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
}

.cunghoc-course-cart-page table.shop_table th,
.cunghoc-course-cart-page table.shop_table td,
.cunghoc-course-checkout-page table.shop_table th,
.cunghoc-course-checkout-page table.shop_table td {
  border-color: #edf1ee;
}

.cunghoc-course-cart-item .product-thumbnail img,
.cunghoc-course-cart-image {
  width: 110px !important;
  height: 78px !important;
  object-fit: cover;
  border-radius: 12px;
}

.cunghoc-course-cart-item .product-name > a {
  color: var(--cunghoc-checkout-text);
  font-size: 17px;
  font-weight: 700;
}

.cunghoc-course-cart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  color: var(--cunghoc-checkout-muted);
  font-size: 13px;
}

.cunghoc-course-quantity {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--cunghoc-checkout-green-soft);
  color: var(--cunghoc-checkout-green);
  font-size: 13px;
  font-weight: 700;
}

.cunghoc-course-cart-page .product-quantity {
  white-space: nowrap;
}

.cunghoc-course-cart-page .actions button[name="update_cart"] {
  display: none !important;
}

.cunghoc-course-cart-page .wc-proceed-to-checkout .button,
.cunghoc-course-checkout-page #place_order,
.cunghoc-bill-upload .button.alt {
  min-height: 48px;
  border-radius: 12px;
  background: var(--cunghoc-checkout-green) !important;
  color: #fff !important;
  font-weight: 700;
}

/* Checkout Flatsome: dùng row 7/5 gốc, không bọc form bằng CSS Grid. */
.cunghoc-course-checkout-page .woocommerce-form-coupon-toggle,
.cunghoc-course-checkout-page form.checkout_coupon,
.cunghoc-course-checkout-page form.checkout.woocommerce-checkout {
  width: calc(100% - 32px);
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
}

.cunghoc-course-checkout-page .woocommerce-form-coupon-toggle {
  margin-bottom: 18px;
}

.cunghoc-course-checkout-page .woocommerce-form-coupon-toggle .message-container {
  width: 100%;
  max-width: none;
}

.cunghoc-course-checkout-page form.checkout_coupon {
  margin-top: -8px;
  margin-bottom: 22px;
}

.cunghoc-course-checkout-page form.checkout.woocommerce-checkout {
  display: block;
}

.cunghoc-course-checkout-page form.checkout.woocommerce-checkout > .row.pt-0 {
  display: flex;
  width: auto;
  max-width: none;
  margin-right: -15px;
  margin-left: -15px;
  align-items: flex-start;
}

.cunghoc-course-checkout-page form.checkout.woocommerce-checkout > .row.pt-0 > .large-7.col {
  flex: 0 0 58.33333333%;
  width: 58.33333333%;
  max-width: 58.33333333%;
}

.cunghoc-course-checkout-page form.checkout.woocommerce-checkout > .row.pt-0 > .large-5.col {
  flex: 0 0 41.66666667%;
  width: 41.66666667%;
  max-width: 41.66666667%;
}

.cunghoc-course-checkout-page #customer_details,
.cunghoc-course-checkout-page form.checkout .large-5.col > .col-inner.has-border {
  box-sizing: border-box;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--cunghoc-checkout-border) !important;
  border-radius: 18px;
  background: #fff;
}

.cunghoc-course-checkout-page form.checkout .large-5.col > .col-inner.has-border {
  position: sticky;
  top: 24px;
}

.cunghoc-course-checkout-page .checkout-sidebar {
  overflow: visible;
}

.cunghoc-course-checkout-page #order_review_heading {
  margin: 0 0 18px;
  padding: 0;
  color: var(--cunghoc-checkout-text);
}

.cunghoc-course-checkout-page #order_review {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.cunghoc-course-checkout-page #order_review .shop_table {
  table-layout: fixed;
}

.cunghoc-course-checkout-page #order_review .product-name {
  width: 68%;
  padding-right: 14px;
  overflow-wrap: anywhere;
}

.cunghoc-course-checkout-page #order_review .product-total {
  width: 32%;
  text-align: right;
  white-space: nowrap;
}

.cunghoc-course-checkout-page .woocommerce-billing-fields h3 {
  margin-top: 0;
}

.cunghoc-course-checkout-page .woocommerce-billing-fields__field-wrapper {
  display: flow-root;
}

.cunghoc-course-checkout-page .form-row input.input-text,
.cunghoc-course-checkout-page .form-row select,
.cunghoc-course-checkout-page .select2-container .select2-selection,
.cunghoc-bill-upload input[type="file"],
.cunghoc-bill-upload textarea {
  min-height: 46px;
  border: 1px solid #cad7cf;
  border-radius: 10px;
  background: #fff;
}

.cunghoc-course-checkout-page #payment {
  margin-top: 18px;
  border-radius: 14px;
  background: #f7faf8;
}

.cunghoc-course-checkout-page #payment ul.payment_methods {
  padding: 16px;
  border-bottom-color: var(--cunghoc-checkout-border);
}

.cunghoc-course-checkout-page #payment div.payment_box {
  margin: 14px 0 0;
  border-radius: 12px;
  background: #fff;
}

.cunghoc-course-checkout-page #place_order {
  width: 100%;
}

.cunghoc-course-order-received-page .cunghoc-order-payment-section,
.woocommerce-account .cunghoc-order-payment-section {
  padding: 24px;
  border: 1px solid var(--cunghoc-checkout-border);
  border-radius: 18px;
  background: #fff;
}

.cunghoc-course-order-received-page .cunghoc-payment-card,
.woocommerce-account .cunghoc-payment-card {
  border-color: var(--cunghoc-checkout-border);
  box-shadow: none;
}

.cunghoc-replace-course-link {
  margin-left: 8px;
}

@media (max-width: 980px) {
  .cunghoc-cart-layout > .woocommerce.row {
    display: block;
  }

  .cunghoc-cart-layout .col.large-7,
  .cunghoc-cart-layout .cart-collaterals.large-5 {
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
  }

  .cunghoc-cart-layout .cart-collaterals {
    margin-top: 22px;
  }

  .cunghoc-cart-layout .cart-sidebar {
    position: static;
  }

  .cunghoc-course-checkout-page form.checkout.woocommerce-checkout > .row.pt-0 {
    display: block;
    margin-right: 0;
    margin-left: 0;
  }

  .cunghoc-course-checkout-page form.checkout.woocommerce-checkout > .row.pt-0 > .large-7.col,
  .cunghoc-course-checkout-page form.checkout.woocommerce-checkout > .row.pt-0 > .large-5.col {
    width: 100%;
    max-width: 100%;
    padding-right: 0;
    padding-left: 0;
    flex-basis: 100%;
  }

  .cunghoc-course-checkout-page form.checkout.woocommerce-checkout > .row.pt-0 > .large-5.col {
    margin-top: 22px;
  }

  .cunghoc-course-checkout-page form.checkout .large-5.col > .col-inner.has-border {
    position: static;
  }
}

@media (max-width: 640px) {
  .cunghoc-commerce-heading,
  .cunghoc-cart-layout,
  .cunghoc-course-checkout-page .woocommerce-form-coupon-toggle,
  .cunghoc-course-checkout-page form.checkout_coupon,
  .cunghoc-course-checkout-page form.checkout.woocommerce-checkout {
    width: calc(100% - 24px);
  }

  .cunghoc-commerce-heading,
  .cunghoc-cart-layout .woocommerce-cart-form,
  .cunghoc-cart-layout .cart-sidebar,
  .cunghoc-course-checkout-page #customer_details,
  .cunghoc-course-checkout-page form.checkout .large-5.col > .col-inner.has-border,
  .cunghoc-course-order-received-page .cunghoc-order-payment-section,
  .woocommerce-account .cunghoc-order-payment-section {
    padding: 16px;
    border-radius: 14px;
  }

  .cunghoc-course-cart-page table.shop_table_responsive tr.cunghoc-course-cart-item {
    padding: 14px 0;
  }

  .cunghoc-course-cart-page table.shop_table_responsive .product-thumbnail {
    display: block;
    text-align: left !important;
  }

  .cunghoc-course-cart-page table.shop_table_responsive .product-thumbnail::before {
    display: none;
  }

  .cunghoc-course-cart-item .product-thumbnail img,
  .cunghoc-course-cart-image {
    width: 100% !important;
    height: auto !important;
    max-height: 210px;
  }

  .cunghoc-course-checkout-page #billing_first_name_field,
  .cunghoc-course-checkout-page #billing_last_name_field {
    float: none;
    width: 100%;
  }

  .cunghoc-course-checkout-page #order_review .product-name {
    width: 64%;
  }

  .cunghoc-course-checkout-page #order_review .product-total {
    width: 36%;
  }
}

/* ========================================================================
 * CungHoc Checkout - security icon display fix.
 * The theme still supplies typography/components, but no theme container is
 * used by the custom templates below.
 * ====================================================================== */

body.cunghoc-custom-checkout-template,
body.cunghoc-student-payment-template {
  min-height: 100vh;
  margin: 0;
  background: #f6f7f9;
  color: #17221d;
}

body.cunghoc-custom-checkout-template *,
body.cunghoc-student-payment-template * {
  box-sizing: border-box;
}

body.cunghoc-custom-checkout-template .cunghoc-checkout-app,
body.cunghoc-student-payment-template .cunghoc-student-payment-app {
  min-height: 100vh;
}

.cunghoc-checkout-topbar {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid #e4e9e6;
  background: rgba(255, 255, 255, .98);
}

.cunghoc-checkout-topbar__inner {
  display: flex;
  width: min(100% - 40px, 1280px);
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cunghoc-checkout-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.cunghoc-checkout-brand .custom-logo-link {
  display: inline-flex;
  margin: 0;
  align-items: center;
}

.cunghoc-checkout-brand .custom-logo-link img {
  width: auto;
  max-width: 180px;
  max-height: 44px;
  object-fit: contain;
}

.cunghoc-checkout-brand__text {
  color: #174a35;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.cunghoc-checkout-brand__divider {
  width: 1px;
  height: 30px;
  background: #d9e1dc;
}

.cunghoc-checkout-brand__label {
  overflow: hidden;
  color: #44534b;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cunghoc-checkout-back {
  display: inline-flex;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #cad7cf;
  border-radius: 10px;
  color: #174a35;
  background: #fff;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.cunghoc-checkout-back:hover {
  border-color: #174a35;
  color: #174a35;
  background: #eef7f2;
  transform: translateY(-1px);
}

.cunghoc-checkout-main,
.cunghoc-student-payment-main {
  width: min(100% - 40px, 1280px);
  margin: 0 auto;
  padding: 44px 0 64px;
}

.cunghoc-checkout-intro,
.cunghoc-payment-page-heading {
  display: flex;
  margin-bottom: 30px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.cunghoc-checkout-intro > div:first-child,
.cunghoc-payment-page-heading > div:first-child {
  max-width: 720px;
}

.cunghoc-checkout-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #25704f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cunghoc-checkout-intro h1,
.cunghoc-payment-page-heading h1 {
  margin: 0 0 10px;
  color: #15211b;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.cunghoc-checkout-intro p,
.cunghoc-payment-page-heading p {
  max-width: 680px;
  margin: 0;
  color: #66756d;
  font-size: 16px;
  line-height: 1.65;
}

.cunghoc-checkout-security {
  display: flex;
  width: min(100%, 330px);
  padding: 15px 16px;
  border: 1px solid #d8e6dd;
  border-radius: 14px;
  background: #eef7f2;
  align-items: flex-start;
  gap: 12px;
}

.cunghoc-checkout-security__icon {
  display: flex !important;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: #25704f;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-weight: 800;
}

.cunghoc-checkout-security strong,
.cunghoc-checkout-security span {
  display: block;
}

.cunghoc-checkout-security strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.cunghoc-checkout-security div span {
  color: #617069;
  font-size: 12px;
  line-height: 1.45;
}

.cunghoc-checkout-mobile-course {
  display: none;
}

.cunghoc-checkout-coupon-slot {
  width: calc(100% - 478px);
  max-width: 760px;
  margin: 0 0 18px;
}

.cunghoc-custom-checkout-template .woocommerce-form-coupon-toggle,
.cunghoc-custom-checkout-template form.checkout_coupon {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

.cunghoc-custom-checkout-template .woocommerce-form-coupon-toggle .message-wrapper,
.cunghoc-custom-checkout-template .woocommerce-form-coupon-toggle .message-container {
  width: 100%;
  max-width: none;
  margin: 0;
}

.cunghoc-custom-checkout-template .woocommerce-form-coupon-toggle .message-container {
  padding: 13px 16px;
  border: 1px solid #dfe6e2;
  border-radius: 12px;
  color: #4c5c53;
  background: #fff;
  text-align: left;
}

.cunghoc-custom-checkout-template form.checkout_coupon {
  padding: 16px;
  border: 1px dashed #b9ccc0;
  border-radius: 12px;
  background: #fff;
}

.cunghoc-checkout-stage,
.cunghoc-checkout-stage > .woocommerce,
.cunghoc-custom-checkout-template form.checkout.woocommerce-checkout {
  width: 100%;
  max-width: none;
  margin: 0;
}

.cunghoc-custom-checkout-template .woocommerce-notices-wrapper {
  width: 100%;
  margin: 0 0 18px;
}

.cunghoc-custom-checkout-template form.checkout.woocommerce-checkout > .row.pt-0 {
  display: grid;
  width: 100%;
  max-width: none;
  margin: 0;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 48px;
  align-items: start;
}

.cunghoc-custom-checkout-template form.checkout.woocommerce-checkout > .row.pt-0 > .large-7.col,
.cunghoc-custom-checkout-template form.checkout.woocommerce-checkout > .row.pt-0 > .large-5.col {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  flex: none;
}

.cunghoc-custom-checkout-template #customer_details,
.cunghoc-custom-checkout-template form.checkout .large-5.col > .col-inner.has-border {
  width: 100%;
  margin: 0;
  padding: 30px;
  border: 1px solid #e0e6e2 !important;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(24, 46, 35, .06);
}

.cunghoc-custom-checkout-template form.checkout .large-5.col > .col-inner.has-border {
  position: sticky;
  top: 24px;
}

.cunghoc-custom-checkout-template #customer_details > .clear + .clear,
.cunghoc-custom-checkout-template .woocommerce-shipping-fields,
.cunghoc-custom-checkout-template .woocommerce-additional-fields {
  display: none !important;
}

.cunghoc-custom-checkout-template .woocommerce-billing-fields h3,
.cunghoc-custom-checkout-template #order_review_heading {
  margin: 0 0 22px;
  padding: 0;
  color: #17221d;
  font-size: 22px;
  line-height: 1.3;
}

.cunghoc-custom-checkout-template .woocommerce-billing-fields h3::after {
  display: block;
  margin-top: 7px;
  color: #7a8880;
  content: "Thông tin này dùng để xác nhận đơn hàng và mở quyền học đúng tài khoản.";
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.cunghoc-custom-checkout-template .woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.cunghoc-custom-checkout-template .woocommerce-billing-fields__field-wrapper .form-row {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.cunghoc-custom-checkout-template #billing_email_field,
.cunghoc-custom-checkout-template #billing_phone_field {
  grid-column: 1 / -1;
}

.cunghoc-custom-checkout-template .form-row label {
  display: block;
  margin: 0 0 8px;
  color: #2b3932;
  font-size: 13px;
  font-weight: 700;
}

.cunghoc-custom-checkout-template .form-row label .required {
  color: #b83232;
}

.cunghoc-custom-checkout-template .form-row input.input-text,
.cunghoc-custom-checkout-template .form-row select,
.cunghoc-custom-checkout-template .select2-container .select2-selection {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #cfd9d3;
  border-radius: 10px;
  color: #17221d;
  background: #fff;
  box-shadow: none;
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.cunghoc-custom-checkout-template .form-row input.input-text:focus,
.cunghoc-custom-checkout-template .form-row select:focus {
  border-color: #25704f;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 112, 79, .12);
}

.cunghoc-custom-checkout-template .checkout-sidebar {
  overflow: visible;
}

.cunghoc-custom-checkout-template #order_review {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.cunghoc-custom-checkout-template #order_review .shop_table {
  width: 100%;
  margin: 0;
  border: 0;
  table-layout: fixed;
}

.cunghoc-custom-checkout-template #order_review .shop_table thead {
  display: none;
}

.cunghoc-custom-checkout-template #order_review .shop_table th,
.cunghoc-custom-checkout-template #order_review .shop_table td {
  padding: 14px 0;
  border-color: #edf1ee;
  vertical-align: top;
}

.cunghoc-custom-checkout-template #order_review .shop_table .product-name {
  width: 70%;
  padding-right: 14px;
  color: #17221d;
}

.cunghoc-custom-checkout-template #order_review .shop_table .product-total {
  width: 30%;
  color: #17221d;
  text-align: right;
  white-space: nowrap;
}

.cunghoc-checkout-course-line {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
}

.cunghoc-checkout-course-thumb {
  width: 88px;
  height: 62px;
  overflow: hidden;
  border-radius: 9px;
  background: #eaf1ed;
  flex: 0 0 auto;
}

.cunghoc-checkout-course-thumb img,
.cunghoc-student-payment-course img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cunghoc-checkout-course-placeholder {
  display: inline-flex;
  width: 100%;
  height: 100%;
  color: #174a35;
  background: #e7f3ec;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.cunghoc-checkout-course-copy {
  min-width: 0;
}

.cunghoc-checkout-course-copy strong,
.cunghoc-checkout-course-copy span,
.cunghoc-checkout-course-copy small {
  display: block;
}

.cunghoc-checkout-course-copy strong {
  color: #17221d;
  font-size: 14px;
  line-height: 1.35;
}

.cunghoc-checkout-course-copy strong > a {
  color: inherit;
  text-decoration: none;
}

.cunghoc-checkout-course-copy span {
  margin-top: 4px;
  color: #66756d;
  font-size: 12px;
}

.cunghoc-checkout-course-copy small {
  margin-top: 2px;
  color: #8a958f;
  font-size: 11px;
}

.cunghoc-custom-checkout-template #order_review .product-quantity,
.cunghoc-custom-checkout-template #order_review dl.variation {
  display: none !important;
}

.cunghoc-custom-checkout-template #order_review tfoot .cart-subtotal th,
.cunghoc-custom-checkout-template #order_review tfoot .cart-subtotal td {
  padding-top: 18px;
}

.cunghoc-custom-checkout-template #order_review tfoot .order-total th,
.cunghoc-custom-checkout-template #order_review tfoot .order-total td {
  padding-top: 18px;
  border-top: 1px solid #dfe6e2;
  font-size: 18px;
}

.cunghoc-custom-checkout-template #payment {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #f5f8f6;
}

.cunghoc-custom-checkout-template #payment ul.payment_methods {
  margin: 0;
  padding: 16px;
  border: 1px solid #dce7e1;
  border-radius: 14px;
  background: #f5f8f6;
}

.cunghoc-custom-checkout-template #payment ul.payment_methods > li > label {
  color: #173728;
  font-weight: 800;
}

.cunghoc-custom-checkout-template #payment div.payment_box {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
}

.cunghoc-custom-checkout-template .cunghoc-payment-card-checkout {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.cunghoc-custom-checkout-template .cunghoc-payment-card-checkout .cunghoc-payment-checkout-icon {
  display: none;
}

.cunghoc-custom-checkout-template .cunghoc-payment-card-checkout dl {
  margin-bottom: 0;
}

.cunghoc-custom-checkout-template .form-row.place-order {
  margin: 0;
  padding: 16px 0 0;
}

.cunghoc-custom-checkout-template #place_order,
.cunghoc-payment-primary-action {
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  color: #fff !important;
  background: #174a35 !important;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  box-shadow: 0 10px 22px rgba(23, 74, 53, .18);
}

.cunghoc-custom-checkout-template #place_order:hover,
.cunghoc-payment-primary-action:hover {
  color: #fff !important;
  background: #0f3928 !important;
}

.cunghoc-custom-checkout-template .woocommerce-privacy-policy-text {
  margin-top: 14px;
  color: #7a8780;
  font-size: 11px;
  line-height: 1.5;
}

.cunghoc-checkout-footer {
  border-top: 1px solid #e3e9e5;
  color: #78857e;
  background: #fff;
}

.cunghoc-checkout-footer > div {
  display: flex;
  width: min(100% - 40px, 1280px);
  min-height: 68px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
}

/* Student payment page after the order is created. */
.cunghoc-payment-page-status {
  width: min(100%, 340px);
  padding: 15px 17px;
  border: 1px solid #dce5e0;
  border-radius: 14px;
  background: #fff;
}

.cunghoc-payment-page-status span,
.cunghoc-payment-page-status strong {
  display: block;
}

.cunghoc-payment-page-status span {
  margin-bottom: 4px;
  color: #7b8881;
  font-size: 12px;
}

.cunghoc-payment-page-status strong {
  color: #174a35;
  font-size: 14px;
}

.cunghoc-payment-page-status.is-rejected strong {
  color: #a12727;
}

.cunghoc-payment-created-notice {
  display: flex;
  margin: -8px 0 24px;
  padding: 15px 18px;
  border: 1px solid #cfe3d7;
  border-radius: 12px;
  color: #28573f;
  background: #eef8f2;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.cunghoc-payment-created-notice strong,
.cunghoc-payment-created-notice span {
  display: block;
}

.cunghoc-student-payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 36px;
  align-items: start;
}

.cunghoc-student-payment-content,
.cunghoc-student-payment-summary__sticky {
  min-width: 0;
  padding: 28px;
  border: 1px solid #e0e6e2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(24, 46, 35, .06);
}

.cunghoc-student-payment-summary__sticky {
  position: sticky;
  top: 24px;
}

.cunghoc-student-payment-summary h2 {
  margin: 0 0 20px;
  color: #17221d;
  font-size: 23px;
}

.cunghoc-student-payment-course {
  display: flex;
  padding-bottom: 20px;
  border-bottom: 1px solid #e7ece9;
  align-items: flex-start;
  gap: 13px;
}

.cunghoc-student-payment-course > img,
.cunghoc-student-payment-course > .cunghoc-checkout-course-placeholder {
  width: 105px;
  height: 72px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.cunghoc-student-payment-course strong,
.cunghoc-student-payment-course span,
.cunghoc-student-payment-course small {
  display: block;
}

.cunghoc-student-payment-course strong {
  color: #17221d;
  font-size: 15px;
  line-height: 1.35;
}

.cunghoc-student-payment-course span {
  margin-top: 5px;
  color: #66756d;
  font-size: 12px;
}

.cunghoc-student-payment-course small {
  margin-top: 3px;
  color: #8a958f;
  font-size: 11px;
}

.cunghoc-student-payment-order-meta {
  margin: 16px 0 20px;
}

.cunghoc-student-payment-order-meta > div {
  display: flex;
  padding: 9px 0;
  justify-content: space-between;
  gap: 16px;
}

.cunghoc-student-payment-order-meta dt,
.cunghoc-student-payment-order-meta dd {
  margin: 0;
  font-size: 13px;
}

.cunghoc-student-payment-order-meta dt {
  color: #748078;
}

.cunghoc-student-payment-order-meta dd {
  color: #26342d;
  text-align: right;
  font-weight: 700;
}

.cunghoc-student-payment-order-meta > div.is-total {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #dfe6e2;
}

.cunghoc-student-payment-order-meta > div.is-total dt,
.cunghoc-student-payment-order-meta > div.is-total dd {
  color: #17221d;
  font-size: 16px;
  font-weight: 800;
}

.cunghoc-payment-summary-note {
  margin: 0 0 16px;
  padding: 13px 14px;
  border-radius: 10px;
  color: #5f6d65;
  background: #f4f7f5;
  font-size: 12px;
  line-height: 1.55;
}

.cunghoc-payment-secondary-action {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border: 1px solid #cad7cf;
  border-radius: 10px;
  color: #174a35;
  background: #fff;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.cunghoc-student-payment-template .cunghoc-order-payment-section {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.cunghoc-student-payment-template .cunghoc-order-payment-section > h2 {
  margin: 0 0 22px;
  color: #17221d;
  font-size: 24px;
}

.cunghoc-student-payment-template .cunghoc-payment-card {
  display: grid;
  margin: 0;
  padding: 20px;
  border: 1px solid #dfe7e2;
  border-radius: 16px;
  background: #f8faf9;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 24px;
  box-shadow: none;
}

.cunghoc-student-payment-template .cunghoc-payment-qr-wrap {
  padding: 14px;
  border: 1px solid #e0e7e3;
  border-radius: 12px;
  background: #fff;
}

.cunghoc-student-payment-template .cunghoc-payment-qr {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
}

.cunghoc-student-payment-template .cunghoc-payment-details dl > div {
  padding: 10px 0;
  border-bottom: 1px solid #e6ece8;
}

.cunghoc-student-payment-template .cunghoc-copy-button {
  min-height: 34px;
  border-radius: 8px;
}

.cunghoc-student-payment-template .cunghoc-bill-upload {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid #dfe7e2;
  border-radius: 16px;
  background: #fff;
}

.cunghoc-student-payment-template .cunghoc-bill-upload h3 {
  margin-top: 0;
  color: #17221d;
}

.cunghoc-student-payment-template .cunghoc-bill-upload label {
  display: block;
  margin-bottom: 15px;
}

.cunghoc-student-payment-template .cunghoc-bill-upload label > span {
  display: block;
  margin-bottom: 7px;
  color: #2d3c34;
  font-size: 13px;
  font-weight: 700;
}

.cunghoc-student-payment-template .cunghoc-bill-upload input[type="file"],
.cunghoc-student-payment-template .cunghoc-bill-upload textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd9d3;
  border-radius: 10px;
  background: #fff;
}

.cunghoc-student-payment-template .cunghoc-bill-upload .button.alt {
  width: 100%;
  min-height: 52px;
  border-radius: 10px;
  background: #174a35 !important;
  text-transform: none;
}

@media (max-width: 1050px) {
  .cunghoc-custom-checkout-template form.checkout.woocommerce-checkout > .row.pt-0 {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 28px;
  }

  .cunghoc-checkout-coupon-slot {
    width: calc(100% - 418px);
  }

  .cunghoc-student-payment-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
  }

  .cunghoc-student-payment-template .cunghoc-payment-card {
    grid-template-columns: 230px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .cunghoc-checkout-main,
  .cunghoc-student-payment-main {
    padding-top: 30px;
  }

  .cunghoc-checkout-intro,
  .cunghoc-payment-page-heading {
    display: block;
  }

  .cunghoc-checkout-security,
  .cunghoc-payment-page-status {
    width: 100%;
    margin-top: 18px;
  }

  .cunghoc-checkout-mobile-course {
    display: flex;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #dfe6e2;
    border-radius: 14px;
    background: #fff;
    align-items: center;
    gap: 13px;
  }

  .cunghoc-checkout-mobile-course img {
    width: 96px;
    height: 66px;
    border-radius: 9px;
    object-fit: cover;
  }

  .cunghoc-checkout-mobile-course span,
  .cunghoc-checkout-mobile-course strong,
  .cunghoc-checkout-mobile-course small {
    display: block;
  }

  .cunghoc-checkout-mobile-course span {
    color: #25704f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .cunghoc-checkout-mobile-course strong {
    margin-top: 3px;
    color: #17221d;
    font-size: 15px;
  }

  .cunghoc-checkout-mobile-course small {
    margin-top: 3px;
    color: #66756d;
  }

  .cunghoc-checkout-coupon-slot {
    width: 100%;
    max-width: none;
  }

  .cunghoc-custom-checkout-template form.checkout.woocommerce-checkout > .row.pt-0,
  .cunghoc-student-payment-layout {
    display: block;
  }

  .cunghoc-custom-checkout-template form.checkout.woocommerce-checkout > .row.pt-0 > .large-5.col,
  .cunghoc-student-payment-summary {
    margin-top: 24px;
  }

  .cunghoc-custom-checkout-template form.checkout .large-5.col > .col-inner.has-border,
  .cunghoc-student-payment-summary__sticky {
    position: static;
  }
}

@media (max-width: 640px) {
  .cunghoc-checkout-topbar__inner,
  .cunghoc-checkout-main,
  .cunghoc-student-payment-main,
  .cunghoc-checkout-footer > div {
    width: min(100% - 24px, 1280px);
  }

  .cunghoc-checkout-topbar__inner {
    min-height: 64px;
  }

  .cunghoc-checkout-brand {
    gap: 10px;
  }

  .cunghoc-checkout-brand .custom-logo-link img {
    max-width: 128px;
    max-height: 38px;
  }

  .cunghoc-checkout-brand__divider,
  .cunghoc-checkout-brand__label {
    display: none;
  }

  .cunghoc-checkout-back {
    min-height: 38px;
    padding: 0 11px;
    font-size: 0;
  }

  .cunghoc-checkout-back span {
    font-size: 20px;
  }

  .cunghoc-checkout-main,
  .cunghoc-student-payment-main {
    padding: 24px 0 40px;
  }

  .cunghoc-checkout-intro h1,
  .cunghoc-payment-page-heading h1 {
    font-size: 29px;
  }

  .cunghoc-checkout-intro p,
  .cunghoc-payment-page-heading p {
    font-size: 14px;
  }

  .cunghoc-custom-checkout-template #customer_details,
  .cunghoc-custom-checkout-template form.checkout .large-5.col > .col-inner.has-border,
  .cunghoc-student-payment-content,
  .cunghoc-student-payment-summary__sticky {
    padding: 18px;
    border-radius: 14px;
  }

  .cunghoc-custom-checkout-template .woocommerce-billing-fields__field-wrapper {
    display: block;
  }

  .cunghoc-custom-checkout-template .woocommerce-billing-fields__field-wrapper .form-row {
    margin-bottom: 16px;
  }

  .cunghoc-custom-checkout-template .woocommerce-billing-fields__field-wrapper .form-row:last-child {
    margin-bottom: 0;
  }

  .cunghoc-custom-checkout-template #order_review .shop_table .product-name {
    width: 68%;
  }

  .cunghoc-custom-checkout-template #order_review .shop_table .product-total {
    width: 32%;
  }

  .cunghoc-checkout-course-thumb {
    width: 70px;
    height: 52px;
  }

  .cunghoc-student-payment-template .cunghoc-payment-card {
    display: block;
    padding: 14px;
  }

  .cunghoc-student-payment-template .cunghoc-payment-details {
    margin-top: 18px;
  }

  .cunghoc-payment-created-notice {
    display: block;
  }

  .cunghoc-payment-created-notice span {
    margin-top: 4px;
  }

  .cunghoc-checkout-footer > div {
    display: block;
    padding: 18px 0;
    text-align: center;
  }

  .cunghoc-checkout-footer span {
    display: block;
    margin: 3px 0;
  }
}

/* Multi-gateway checkout — 2.0.0 */
.cunghoc-custom-checkout-template #payment ul.payment_methods > li.wc_payment_method {
  position: relative;
  margin: 0 0 10px;
  padding: 15px 15px 14px;
  border: 1px solid #dce5e0;
  border-radius: 12px;
  background: #fff;
}

.cunghoc-custom-checkout-template #payment ul.payment_methods > li.wc_payment_method:last-child {
  margin-bottom: 0;
}

.cunghoc-custom-checkout-template #payment ul.payment_methods > li.wc_payment_method:has(input[name="payment_method"]:checked) {
  border-color: #438064;
  box-shadow: 0 0 0 3px rgba(37, 112, 79, .08);
}

.cunghoc-custom-checkout-template #payment input[name="payment_method"] {
  margin: 2px 9px 0 0;
  vertical-align: top;
}

.cunghoc-custom-checkout-template #payment ul.payment_methods > li > label {
  display: inline-flex;
  max-width: calc(100% - 30px);
  margin: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  line-height: 1.4;
}

.cunghoc-gateway-badge {
  display: inline-flex;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #d4e2da;
  border-radius: 999px;
  color: #315b47;
  background: #eef7f2;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .01em;
}

.cunghoc-gateway-help {
  display: block;
  margin: 7px 0 0 27px;
  color: #6e7b74;
  font-size: 11px;
  line-height: 1.5;
}

.cunghoc-custom-checkout-template #payment div.payment_box {
  margin-left: 27px;
}

@media (max-width: 549px) {
  .cunghoc-custom-checkout-template #payment ul.payment_methods > li.wc_payment_method {
    padding: 13px;
  }

  .cunghoc-custom-checkout-template #payment ul.payment_methods > li > label {
    align-items: flex-start;
  }

  .cunghoc-gateway-badge {
    width: fit-content;
  }

  .cunghoc-gateway-help,
  .cunghoc-custom-checkout-template #payment div.payment_box {
    margin-left: 25px;
  }
}

.cunghoc-payment-branch-note{margin:14px 0;padding:13px 16px;border:1px solid #dbe4f0;border-radius:12px;background:#f8fafc;color:#334155}
