/* ==========================================================================
   WooCommerce Dark & Neon Custom Styling System - Ujuescape Theme
   ========================================================================== */

/* 1. Global Product & Price Styling */
.woocommerce .product {
  background: transparent;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--color-neon-gold) !important;
  font-size: 1.8rem;
  font-weight: 800;
}

.woocommerce div.product form.cart .button {
  background: #ce5fe7 !important;
  color: #fff !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  padding: 1rem 2rem !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
  border: none !important;
  transition: all 0.3s ease !important;
}

.woocommerce div.product form.cart .button:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2px);
}

/* 2. Optimized Container Width Expansion (Full 1480px Container Layout Balance) */
.woocommerce-checkout,
.woocommerce-cart,
.woocommerce-order {
  width: 100%;
  max-width: 100% !important;
  margin-left: auto;
  margin-right: auto;
}

.uj-checkout-card {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  margin-top: 0 !important;
  display: flow-root !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
}

/* 3. Compact Coupon Banner & Form (`.woocommerce-info`, `form.checkout_coupon`) */
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error {
  background-color: #141820 !important;
  border: 1px solid #222938 !important;
  border-left: 4px solid var(--color-neon-cyan) !important;
  color: #e2e8f0 !important;
  padding: 0.85rem 1.15rem !important;
  border-radius: var(--radius-md) !important;
  margin-bottom: 1.5rem !important;
  font-size: 0.9rem !important;
}

.woocommerce .woocommerce-error {
  border-left-color: var(--color-secondary-accent) !important;
}

.woocommerce-info a {
  color: var(--color-neon-cyan) !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}

form.checkout_coupon {
  background: #141820 !important;
  border: 1px solid #222938 !important;
  padding: 1.25rem !important;
  border-radius: var(--radius-md) !important;
  margin-bottom: 1.5rem !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

form.checkout_coupon input.input-text {
  background: #0d0f12 !important;
  border: 1px solid #283245 !important;
  color: #ffffff !important;
  border-radius: var(--radius-md) !important;
  padding: 0.65rem 0.9rem !important;
}

form.checkout_coupon button.button {
  background: var(--color-neon-cyan) !important;
  color: #0d0f12 !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  padding: 0.65rem 1.25rem !important;
  border-radius: var(--radius-md) !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.25s ease;
}

form.checkout_coupon button.button:hover {
  background: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* 4. Checkout Section Headings & Form Labels */
.woocommerce-checkout h3,
#order_review_heading,
.woocommerce-billing-fields h3,
.woocommerce-additional-fields h3 {
  font-family: var(--font-body) !important;
  font-size: 1.15rem !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
  padding-top: 0 !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 2px solid rgba(206, 95, 231, 0.4) !important;
}

.woocommerce-billing-fields {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Reset float issues on WooCommerce form rows */
.woocommerce-checkout .form-row {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: both !important;
}

.woocommerce-checkout p.form-row label {
  color: #cbd5e1 !important;
  font-size: 0.825rem !important;
  font-weight: 700 !important;
  margin-top: 0 !important;
  margin-bottom: 0.35rem !important;
  display: block !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2 !important;
}

.woocommerce-checkout p.form-row label span.required {
  color: #ce5fe7 !important;
  font-weight: 800 !important;
}

/* 5. Sleek Compact Inputs, Textarea & Select Dropdowns */
.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea {
  background-color: #0d0f12 !important;
  color: #ffffff !important;
  border: 1px solid #283245 !important;
  border-radius: var(--radius-md) !important;
  padding: 0.7rem 0.9rem !important;
  font-size: 0.925rem !important;
  font-family: var(--font-body) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
  border-color: #ce5fe7 !important;
  box-shadow: none !important;
  outline: none !important;
  background-color: #12161f !important;
}

.woocommerce-checkout input.input-text::placeholder,
.woocommerce-checkout textarea::placeholder {
  color: #64748b !important;
}

/* 6. Integrated Additional Fields (Notes) Section */
.woocommerce-additional-fields {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
}

.woocommerce-additional-fields textarea#order_comments {
  min-height: 80px !important;
  resize: vertical !important;
}

/* 7. Order Review Table Styling */
#order_review {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

table.woocommerce-checkout-review-order-table {
  background: #0d0f12 !important;
  border: 1px solid #222938 !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin-bottom: 1rem !important;
}

table.woocommerce-checkout-review-order-table th,
table.woocommerce-checkout-review-order-table td {
  padding: 0.75rem 0.9rem !important;
  border-bottom: 1px solid #222938 !important;
  color: #e2e8f0 !important;
  font-size: 0.85rem !important;
}

table.woocommerce-checkout-review-order-table thead th {
  background: #141820 !important;
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: var(--color-neon-cyan) !important;
}

table.woocommerce-checkout-review-order-table tr.cart_item td.product-name {
  font-weight: 700 !important;
  color: #ffffff !important;
}

/* Item Variations & Booking Meta List */
table.woocommerce-checkout-review-order-table dl.variation,
table.woocommerce-checkout-review-order-table .wc-item-meta {
  margin-top: 0.4rem !important;
  margin-bottom: 0.2rem !important;
  font-size: 0.8rem !important;
  line-height: 1.4;
}

table.woocommerce-checkout-review-order-table dl.variation dt {
  color: #94a3b8 !important;
  font-weight: 600 !important;
  float: left !important;
  clear: left !important;
  margin-right: 0.4rem !important;
}

table.woocommerce-checkout-review-order-table dl.variation dd {
  color: var(--color-neon-cyan) !important;
  font-weight: 700 !important;
  float: left !important;
  margin-bottom: 0.2rem !important;
}

table.woocommerce-checkout-review-order-table tr.order-total th,
table.woocommerce-checkout-review-order-table tr.order-total td {
  border-bottom: none !important;
  background: #141820 !important;
}

table.woocommerce-checkout-review-order-table tr.order-total td .amount {
  color: var(--color-neon-gold) !important;
  font-size: 1.35rem !important;
  font-weight: 900 !important;
}

/* 8. Payment Gateways Section (`#payment`) */
#payment {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-top: 0 !important;
}

#payment ul.payment_methods {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 1rem 0 !important;
  border-bottom: 1px solid #222938 !important;
  padding-bottom: 0.85rem !important;
}

#payment ul.payment_methods li.wc_payment_method {
  margin-bottom: 0.85rem !important;
}

#payment ul.payment_methods li.wc_payment_method label {
  font-weight: 700 !important;
  color: #ffffff !important;
  font-size: 0.925rem !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

#payment ul.payment_methods li.wc_payment_method input[type="radio"] {
  accent-color: #ce5fe7 !important;
  width: 17px !important;
  height: 17px !important;
  cursor: pointer;
}

#payment ul.payment_methods li.wc_payment_method .payment_box {
  background: #0d0f12 !important;
  border: 1px solid #283245 !important;
  border-radius: var(--radius-md) !important;
  padding: 0.85rem 1rem !important;
  margin-top: 0.6rem !important;
  color: #cbd5e1 !important;
  font-size: 0.825rem !important;
}

/* Wrap QR Banking Image Grid nicely */
#payment ul.payment_methods li.wc_payment_method .payment_box img {
  background: #ffffff !important;
  padding: 0.4rem !important;
  border-radius: var(--radius-sm) !important;
  max-width: 100% !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  margin-top: 0.4rem;
}

.woocommerce-privacy-policy-text {
  color: #94a3b8 !important;
  font-size: 0.775rem !important;
  margin-bottom: 1rem !important;
  line-height: 1.4;
}

/* 9. Place Order Button (`#place_order`) */
.woocommerce-checkout #place_order,
#payment button#place_order {
  width: 100% !important;
  background: #ce5fe7 !important;
  color: #ffffff !important;
  font-family: var(--font-body) !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 1rem 1.75rem !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin-top: 0.4rem !important;
}

.woocommerce-checkout #place_order:hover,
#payment button#place_order:hover {
  background: #ffffff !important;
  color: #ce5fe7 !important;
  border-color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2px);
}

/* 10. Unified booking step 2: checkout hierarchy and responsive balance */
.woocommerce-checkout .uju-booking-steps,
.woocommerce-order .uju-booking-steps,
.woocommerce-cart .uju-booking-steps {
  max-width: 100% !important;
  margin-bottom: 2rem;
}

.uju-checkout-intro {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
}

.uju-checkout-intro > span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--color-neon-cyan);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.uju-checkout-intro h2 {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
}

.uju-checkout-intro p {
  max-width: 650px;
  margin: 0.65rem auto 0;
  color: #929bad;
  font-size: 0.82rem;
  line-height: 1.65;
}

.uju-checkout-layout {
  gap: 1.5rem !important;
}

.uju-checkout-card {
  background: linear-gradient(155deg, #171b24 0%, #12151d 100%) !important;
}

.uju-checkout-layout > div:first-child .uju-checkout-card:first-child {
  border-color: rgba(206, 95, 231, 0.42) !important;
}

.uju-checkout-layout > div:last-child .uju-checkout-card:first-child {
  border-color: rgba(0, 240, 255, 0.22) !important;
}

table.woocommerce-checkout-review-order-table {
  table-layout: fixed;
}

table.woocommerce-checkout-review-order-table th.product-name,
table.woocommerce-checkout-review-order-table td.product-name {
  width: 72%;
}

table.woocommerce-checkout-review-order-table th.product-total,
table.woocommerce-checkout-review-order-table td.product-total {
  width: 28%;
  text-align: right;
  white-space: nowrap;
}

table.woocommerce-checkout-review-order-table dl.variation {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  gap: 0.25rem 0.5rem;
  align-items: start;
}

table.woocommerce-checkout-review-order-table dl.variation::before,
table.woocommerce-checkout-review-order-table dl.variation::after {
  display: none !important;
}

table.woocommerce-checkout-review-order-table dl.variation dt,
table.woocommerce-checkout-review-order-table dl.variation dd {
  float: none !important;
  clear: none !important;
  min-width: 0;
  margin: 0 !important;
}

table.woocommerce-checkout-review-order-table dl.variation dd p {
  margin: 0 !important;
  overflow-wrap: anywhere;
}

.woocommerce-checkout input:-webkit-autofill,
.woocommerce-checkout input:-webkit-autofill:hover,
.woocommerce-checkout input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 0 0 1000px #0d0f12 inset !important;
  transition: background-color 9999s ease-out 0s;
}

@media (min-width: 1024px) {
  .uju-checkout-layout > .lg\:col-span-7 {
    grid-column: span 7 / span 7;
  }

  .uju-checkout-layout > .lg\:col-span-5 {
    grid-column: span 5 / span 5;
  }
}

@media (max-width: 767px) {
  .woocommerce-checkout .uju-checkout-card {
    padding: 1.1rem !important;
    border-radius: var(--radius-md) !important;
  }

  table.woocommerce-checkout-review-order-table th,
  table.woocommerce-checkout-review-order-table td {
    padding: 0.7rem !important;
    font-size: 0.76rem !important;
  }

  table.woocommerce-checkout-review-order-table dl.variation {
    grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
    font-size: 0.7rem !important;
  }

  .uj-security-badge-box {
    line-height: 1.6;
  }
}

@media (max-width: 420px) {
  table.woocommerce-checkout-review-order-table th.product-name,
  table.woocommerce-checkout-review-order-table td.product-name {
    width: 68%;
  }

  table.woocommerce-checkout-review-order-table th.product-total,
  table.woocommerce-checkout-review-order-table td.product-total {
    width: 32%;
  }
}

/* 11. VietQR gateway — scoped so other payment methods remain untouched */
#payment ul.payment_methods li.payment_method_vietqr {
  position: relative;
  overflow: hidden;
  margin: 0 0 1rem !important;
  padding: 0.9rem !important;
  background: linear-gradient(145deg, rgba(20, 24, 32, 0.98), rgba(11, 14, 19, 0.98)) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: var(--radius-md) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#payment ul.payment_methods li.payment_method_vietqr:has(> input[type="radio"]:checked) {
  border-color: rgba(206, 95, 231, 0.7) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
}

#payment ul.payment_methods li.payment_method_vietqr > input[type="radio"] {
  position: absolute;
  top: 1.22rem;
  left: 1rem;
  z-index: 2;
  margin: 0 !important;
}

#payment ul.payment_methods li.payment_method_vietqr > label {
  display: flex !important;
  min-height: 28px;
  width: 100% !important;
  padding-left: 1.75rem;
  color: #f8fafc !important;
  line-height: 1.4 !important;
}

#payment ul.payment_methods li.payment_method_vietqr > label > img {
  width: 78px !important;
  height: 28px !important;
  max-width: 78px !important;
  object-fit: contain !important;
  margin: 0 0 0 auto !important;
  padding: 3px 7px !important;
  background: #ffffff !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}

#payment ul.payment_methods li.payment_method_vietqr .payment_box {
  position: relative;
  margin: 0.85rem 0 0 !important;
  padding: 1rem !important;
  background: #0c1017 !important;
  border-color: rgba(0, 240, 255, 0.22) !important;
}

#payment ul.payment_methods li.payment_method_vietqr .payment_box::before {
  border-bottom-color: rgba(0, 240, 255, 0.22) !important;
}

#payment ul.payment_methods li.payment_method_vietqr .payment_box > p {
  margin: 0 0 0.85rem !important;
  color: #aeb7c7 !important;
  font-size: 0.8rem !important;
  line-height: 1.6 !important;
}

#payment ul.payment_methods li.payment_method_vietqr .vietqr-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)) !important;
  gap: 0.5rem !important;
  width: 100% !important;
  max-height: 290px !important;
  overflow-y: auto !important;
  padding: 4px 2px 4px 0 !important;
}

/* Sleek dark scrollbar for bank list */
#payment ul.payment_methods li.payment_method_vietqr .vietqr-row::-webkit-scrollbar {
  width: 5px;
}
#payment ul.payment_methods li.payment_method_vietqr .vietqr-row::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
#payment ul.payment_methods li.payment_method_vietqr .vietqr-row::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}

#payment ul.payment_methods li.payment_method_vietqr .vietqr-row::after {
  content: "Hỗ trợ quét mã QR trên tất cả ứng dụng Mobile Banking Việt Nam";
  grid-column: 1 / -1;
  padding-top: 0.5rem;
  color: #768196;
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
}

#payment ul.payment_methods li.payment_method_vietqr .list-bank {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

#payment ul.payment_methods li.payment_method_vietqr .list-bank-box {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #ffffff !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  border-radius: 8px !important;
  transition: transform 0.15s ease, border-color 0.15s ease !important;
}

#payment ul.payment_methods li.payment_method_vietqr .list-bank-box:hover {
  border-color: #00f0ff !important;
  transform: translateY(-1px);
}

#payment ul.payment_methods li.payment_method_vietqr .list-bank-box img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 6px !important;
  object-fit: contain !important;
  background: #ffffff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 767px) {
  #payment ul.payment_methods li.payment_method_vietqr {
    padding: 0.8rem !important;
  }

  #payment ul.payment_methods li.payment_method_vietqr > input[type="radio"] {
    top: 1.08rem;
    left: 0.85rem;
  }

  #payment ul.payment_methods li.payment_method_vietqr > label {
    min-height: 25px;
    padding-left: 1.7rem;
    font-size: 0.82rem !important;
  }

  #payment ul.payment_methods li.payment_method_vietqr > label > img {
    width: 62px !important;
    height: 25px !important;
    max-width: 62px !important;
  }

  #payment ul.payment_methods li.payment_method_vietqr .payment_box {
    padding: 0.8rem !important;
  }

  #payment ul.payment_methods li.payment_method_vietqr .vietqr-row {
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)) !important;
    max-height: 240px !important;
  }
}
