/* DP Checkout Style & VAT 1.0.0
 * Presentation only. Scoped to the existing #dp-onepage-checkout template.
 * Do not paste another copy into Additional CSS when this plugin is active.
 */
#dp-onepage-checkout {
    --dp-accent: #ed8608;
    --dp-accent-dark: #a84a04;
    --dp-ink: #1e2c40;
    --dp-muted: #697587;
    --dp-border: #e3e8ef;
    --dp-soft: #f6f8fb;
    --dp-shadow: 0 7px 26px rgba(24, 43, 67, .045);
    --dp-radius: 16px;
    color: var(--dp-ink);
    font-size: 14px;
    line-height: 1.55;
    padding-bottom: 32px;
}
body.woocommerce-checkout:has(#dp-onepage-checkout) #main { background: #f6f8fb; }
#dp-onepage-checkout *, #dp-onepage-checkout *::before, #dp-onepage-checkout *::after { box-sizing: border-box; }
#dp-onepage-checkout .dp-ui-card,
#dp-onepage-checkout .dp-onepage-cart,
#dp-onepage-checkout .dp-onepage-review .checkout-sidebar {
    background: #fff;
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    box-shadow: var(--dp-shadow);
    padding: 24px;
    min-width: 0;
}
#dp-onepage-checkout .dp-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 0 20px;
    margin-bottom: 4px;
}
#dp-onepage-checkout .dp-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    height: 34px;
    border-radius: 10px;
    background: #fff1dd;
    color: #a85200;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}
#dp-onepage-checkout .dp-section-heading h2 {
    margin: 0 0 3px;
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: -.3px;
    color: var(--dp-ink);
    font-weight: 700;
    text-transform: none;
}
#dp-onepage-checkout .dp-section-heading p { margin: 0; color: var(--dp-muted); font-size: 12px; line-height: 1.55; }
#dp-onepage-checkout .dp-onepage-cart .woocommerce,
#dp-onepage-checkout .dp-onepage-cart .cart-auto-refresh { margin-bottom: 0; padding-bottom: 0; }
#dp-onepage-checkout .dp-onepage-cart .row-divided > .col + .col:not(.large-12) { border-left: 0; }
#dp-onepage-checkout .dp-onepage-cart .row::before { border: 0; }

/* Cart table: open spacing, minimal rules, readable amounts. */
#dp-onepage-cart table.shop_table {
    border: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 0;
    font-size: 13px;
    table-layout: auto;
}
#dp-onepage-cart table.shop_table thead th {
    padding: 12px 8px;
    background: var(--dp-soft);
    border: 0 !important;
    color: #5c697c;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .045em;
    line-height: 1.4;
    white-space: nowrap;
    text-transform: uppercase;
}
#dp-onepage-cart table.shop_table thead th:first-child { border-radius: 9px 0 0 9px; }
#dp-onepage-cart table.shop_table thead th:last-child { border-radius: 0 9px 9px 0; }
#dp-onepage-cart table.shop_table tbody td {
    border: 0 !important;
    border-bottom: 1px solid #edf0f5 !important;
    padding: 17px 8px;
    vertical-align: middle;
    background: transparent;
}
#dp-onepage-cart table.shop_table tbody tr.cart_item:hover td { background: #fcfdff; }
#dp-onepage-cart table.shop_table .product-remove { width: 26px; padding-left: 0; padding-right: 4px; }
#dp-onepage-cart table.shop_table .product-thumbnail { width: 56px; min-width: 48px; padding-left: 0; }
#dp-onepage-cart .product-thumbnail img { display: block; width: 50px; max-width: 50px; height: 64px; object-fit: contain; border-radius: 7px; }
#dp-onepage-cart table.shop_table .product-name { min-width: 0; text-align: left; }
#dp-onepage-cart .product-name a { color: var(--dp-ink); font-size: 13px; line-height: 1.55; font-weight: 500; text-decoration: none; }
#dp-onepage-cart .product-name a:hover { color: var(--dp-accent-dark); }
#dp-onepage-cart .variation { color: var(--dp-muted); font-size: 11px; margin-top: 5px; margin-bottom: 0; }
#dp-onepage-cart .variation p { margin: 0; }
#dp-onepage-cart table.shop_table .product-price,
#dp-onepage-cart table.shop_table .product-subtotal { text-align: right; white-space: nowrap; }
#dp-onepage-cart table.shop_table .product-quantity { text-align: center; }
#dp-onepage-cart .amount { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--dp-ink); white-space: nowrap; }
#dp-onepage-cart .product-subtotal .amount { color: var(--dp-accent-dark); }
#dp-onepage-cart a.remove { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; min-height: 23px; line-height: 1; border: 1px solid #e3e8ef; border-radius: 50%; color: #94a0af !important; font-size: 17px; font-weight: 400; text-decoration: none; }
#dp-onepage-cart a.remove:hover { color: #b52d2d !important; background: #fff0f0; border-color: #efbbbb; }
#dp-onepage-cart .quantity { display: inline-flex; align-items: stretch; justify-content: center; margin: 0; min-width: 84px; height: 36px; border: 1px solid #dde4ec; border-radius: 9px; overflow: hidden; box-shadow: none; }
#dp-onepage-cart .quantity .qty,
#dp-onepage-cart .quantity .button,
#dp-onepage-cart .quantity input[type="button"] { margin: 0 !important; padding: 0 !important; min-height: 34px; height: 34px; min-width: 0; border: 0 !important; box-shadow: none !important; background: #fff; color: var(--dp-ink); font-size: 13px; line-height: 34px; border-radius: 0; }
#dp-onepage-cart .quantity .qty { width: 32px; max-width: 36px; text-align: center; -moz-appearance: textfield; }
#dp-onepage-cart .quantity .qty::-webkit-outer-spin-button,
#dp-onepage-cart .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#dp-onepage-cart .quantity .button,
#dp-onepage-cart .quantity input[type="button"] { width: 25px; background: #f7f9fc; }
#dp-onepage-cart .quantity .button:hover,
#dp-onepage-cart .quantity input[type="button"]:hover { background: #fff1dd; }
#dp-onepage-cart table.shop_table td.actions { padding-top: 17px; padding-bottom: 0; border-bottom: 0 !important; }
#dp-onepage-cart .actions .button { border-radius: 9px; font-size: 12px; letter-spacing: 0; }
#dp-onepage-cart .actions .coupon { display: flex; flex-wrap: wrap; gap: 8px; }
#dp-onepage-cart .actions #coupon_code { min-height: 40px; border-radius: 9px; flex: 1 1 130px; }
#dp-onepage-cart .cart-footer-content:empty { display: none; }

/* Customer card + invoice card, within the existing customer grid area. */
#dp-onepage-checkout .dp-customer-card .woocommerce-billing-fields > h3,
#dp-onepage-checkout .dp-customer-card .woocommerce-additional-fields > h3 { display: none; }
#dp-onepage-checkout #customer_details { margin: 0; }
#dp-onepage-checkout .dp-customer-card .form-row,
#dp-onepage-checkout .dp-invoice-card .form-row { float: none; width: 100%; padding: 0; margin: 0 0 17px; }
#dp-onepage-checkout .dp-customer-card label,
#dp-onepage-checkout .dp-invoice-fields label { display: block; color: #273549; font-weight: 600; font-size: 13px; margin: 0 0 7px; line-height: 1.5; }
#dp-onepage-checkout .dp-customer-card .optional { color: var(--dp-muted); font-weight: 400; }
#dp-onepage-checkout .dp-customer-card .required,
#dp-onepage-checkout .dp-invoice-fields .required { color: #c44627; text-decoration: none; }
#dp-onepage-checkout .dp-customer-card input.input-text,
#dp-onepage-checkout .dp-customer-card textarea,
#dp-onepage-checkout .dp-customer-card select,
#dp-onepage-checkout .dp-invoice-fields input.input-text,
#dp-onepage-checkout .dp-invoice-fields textarea {
    width: 100%;
    height: 46px;
    padding: 11px 13px;
    margin: 0;
    border: 1px solid #dce3eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    color: #253248;
    font: inherit;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
#dp-onepage-checkout .dp-customer-card textarea,
#dp-onepage-checkout .dp-invoice-fields textarea { height: auto; min-height: 90px; line-height: 1.6; resize: vertical; }
#dp-onepage-checkout .dp-customer-card input::placeholder,
#dp-onepage-checkout .dp-customer-card textarea::placeholder,
#dp-onepage-checkout .dp-invoice-fields input::placeholder,
#dp-onepage-checkout .dp-invoice-fields textarea::placeholder { color: #8b95a4; opacity: 1; font-weight: 400; }
#dp-onepage-checkout .dp-customer-card input:focus,
#dp-onepage-checkout .dp-customer-card textarea:focus,
#dp-onepage-checkout .dp-invoice-fields input:focus,
#dp-onepage-checkout .dp-invoice-fields textarea:focus { border-color: #eeab52; outline: 0; box-shadow: 0 0 0 3px rgba(237,134,8,.10); }
#dp-onepage-checkout .dp-customer-card .woocommerce-invalid input,
#dp-onepage-checkout .dp-invoice-fields .woocommerce-invalid input,
#dp-onepage-checkout .dp-invoice-fields .woocommerce-invalid textarea { border-color: #c43f3f; }
#dp-onepage-checkout .dp-customer-card input[type="hidden"] { display: none; }
#dp-onepage-checkout .dp-customer-card .woocommerce-additional-fields__field-wrapper > .form-row:last-child { margin-bottom: 0; }
#dp-onepage-checkout .dp-invoice-card { margin-top: 22px; padding: 22px 24px; }
#dp-onepage-checkout .dp-vat-toggle { display: flex; align-items: center; gap: 12px; margin: 0; cursor: pointer; }
#dp-onepage-checkout .dp-vat-icon { display: inline-flex; flex: 0 0 38px; height: 40px; border: 1px solid #ebddc7; border-radius: 10px; justify-content: center; align-items: center; font-size: 10px; font-weight: 800; letter-spacing: .06em; background: #fff8ec; color: #956015; }
#dp-onepage-checkout .dp-vat-toggle-copy { display: block; flex: 1; min-width: 0; }
#dp-onepage-checkout .dp-vat-toggle-copy strong { display: block; margin: 0 0 3px; font-size: 15px; line-height: 1.4; color: var(--dp-ink); font-weight: 700; }
#dp-onepage-checkout .dp-vat-toggle-copy small { display: block; color: var(--dp-muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
#dp-onepage-checkout #dp_invoice_requested { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--dp-accent); cursor: pointer; }
#dp-onepage-checkout #dp_invoice_requested:focus-visible { outline: 3px solid #f1bc76; outline-offset: 3px; }
#dp-onepage-checkout .dp-vat-hint { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #edf0f5; color: var(--dp-muted); font-size: 11px; line-height: 1.65; }
#dp-onepage-checkout .dp-invoice-fields { margin-top: 18px; }
#dp-onepage-checkout .dp-invoice-fields[hidden] { display: none !important; }
#dp-onepage-checkout .dp-vat-intro { font-size: 12px; color: var(--dp-muted); margin: 0 0 16px; }
#dp-onepage-checkout .dp-invoice-fields .form-row:last-child { margin-bottom: 0; }
#dp-onepage-checkout .dp-invoice-card.is-requested { border-color: #edc997; }

/* Order review: preserve all WooCommerce totals, shipping and payment nodes. */
#dp-onepage-checkout .dp-onepage-review .col-inner { padding: 0 !important; margin: 0; border: 0 !important; background: transparent; box-shadow: none; }
#dp-onepage-checkout .dp-onepage-review .checkout-sidebar { border-top: 3px solid var(--dp-accent); }
#dp-onepage-checkout #order_review_heading {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--dp-ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.3px;
    text-transform: none;
    margin: 0 0 21px;
    padding: 0;
    border: 0;
}
#dp-onepage-checkout #order_review_heading::before { content: '03'; display: inline-flex; flex: 0 0 34px; height: 34px; align-items: center; justify-content: center; border-radius: 10px; background: #fff1dd; color: #a85200; font-size: 12px; letter-spacing: .04em; }
#dp-onepage-checkout #order_review table { width: 100%; border: 0 !important; border-collapse: separate; border-spacing: 0; margin: 0 0 20px; background: #fff; }
#dp-onepage-checkout #order_review table th,
#dp-onepage-checkout #order_review table td { border: 0 !important; border-bottom: 1px solid #edf0f5 !important; padding: 13px 0; font-size: 13px; vertical-align: top; line-height: 1.65; }
#dp-onepage-checkout #order_review table thead th { padding-top: 0; padding-bottom: 10px; font-size: 10px; color: #758092; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
#dp-onepage-checkout #order_review .product-name { color: #526076; padding-right: 15px; }
#dp-onepage-checkout #order_review .product-quantity { color: #26374d; font-weight: 700; white-space: nowrap; }
#dp-onepage-checkout #order_review .variation { font-size: 11px; margin: 5px 0 0; color: var(--dp-muted); }
#dp-onepage-checkout #order_review .variation p { margin: 0; }
#dp-onepage-checkout #order_review .product-total,
#dp-onepage-checkout #order_review tfoot td { text-align: right; }
#dp-onepage-checkout #order_review tfoot th { font-weight: 500; color: #526076; text-align: left; }
#dp-onepage-checkout #order_review .amount { color: var(--dp-ink); white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
#dp-onepage-checkout #order_review tfoot tr.order-total th,
#dp-onepage-checkout #order_review tfoot tr.order-total td { background: #fff6e8; padding: 16px 12px; border: 0 !important; }
#dp-onepage-checkout #order_review tfoot tr.order-total th { border-radius: 10px 0 0 10px; color: #25344a; font-weight: 700; vertical-align: middle; }
#dp-onepage-checkout #order_review tfoot tr.order-total td { border-radius: 0 10px 10px 0; }
#dp-onepage-checkout #order_review tfoot tr.order-total .amount { font-size: 21px; line-height: 1.2; color: #ac4e04; letter-spacing: -.4px; font-weight: 800; }
#dp-onepage-checkout #order_review .includes_tax { display: block; color: var(--dp-muted); font-size: 10px; font-weight: 400; }
#dp-onepage-checkout #order_review .includes_tax .amount { font-size: inherit !important; font-weight: inherit !important; }
#dp-onepage-checkout #shipping_method { margin: 0; padding: 0; list-style: none; }
#dp-onepage-checkout #shipping_method li { margin: 0 0 4px; }
#dp-onepage-checkout #shipping_method label { margin: 0; font-weight: 400; font-size: 13px; color: #526076; }
#dp-onepage-checkout #payment { background: transparent; border: 0; border-radius: 0; padding: 0; }
#dp-onepage-checkout #payment ul.payment_methods { padding: 0; border: 0; margin: 0 0 18px; list-style: none; }
#dp-onepage-checkout #payment ul.payment_methods > li { border: 1px solid #e6eaf0; background: #fbfcfe; border-radius: 10px; margin: 0 0 9px; padding: 13px; }
#dp-onepage-checkout #payment ul.payment_methods > li > label { font-size: 13px; font-weight: 600; color: var(--dp-ink); }
#dp-onepage-checkout #payment .payment_box { background: transparent; color: var(--dp-muted); margin: 7px 0 0; padding: 0; font-size: 12px; line-height: 1.65; }
#dp-onepage-checkout #payment .payment_box::before { display: none; }
#dp-onepage-checkout #payment .payment_box p:last-child { margin-bottom: 0; }
#dp-onepage-checkout #payment .form-row.place-order { padding: 0; margin: 0; }
#dp-onepage-checkout #payment .woocommerce-privacy-policy-text,
#dp-onepage-checkout #payment .woocommerce-terms-and-conditions-checkbox-text { font-size: 11px; color: var(--dp-muted); line-height: 1.7; }
#dp-onepage-checkout #place_order { width: 100%; min-height: 51px; padding: 13px 16px; margin: 9px 0 0; border: 0; border-radius: 10px; background: var(--dp-accent); color: #fff; box-shadow: 0 4px 10px rgba(212,113,0,.15); font-size: 14px; font-weight: 700; letter-spacing: .035em; line-height: 1.6; text-transform: uppercase; transition: background .15s, box-shadow .15s; }
#dp-onepage-checkout #place_order:hover { background: #d97803; box-shadow: 0 5px 14px rgba(212,113,0,.23); }
#dp-onepage-checkout #place_order:focus-visible { outline: 3px solid #f2bb72; outline-offset: 3px; }
#dp-onepage-checkout #place_order:disabled { opacity: .6; cursor: not-allowed; }
#dp-onepage-checkout .woocommerce-error,
#dp-onepage-checkout .woocommerce-info,
#dp-onepage-checkout .woocommerce-message { border-radius: 10px; font-size: 13px; }

@media (min-width: 850px) and (max-width: 1100px) {
    #dp-onepage-checkout .dp-ui-card,
    #dp-onepage-checkout .dp-onepage-cart,
    #dp-onepage-checkout .dp-onepage-review .checkout-sidebar { padding: 18px; }
    #dp-onepage-cart table.shop_table .product-thumbnail { display: none; }
    #dp-onepage-cart table.shop_table tbody td { padding-left: 5px; padding-right: 5px; }
    #dp-onepage-cart .amount { font-size: 12px; }
}
@media (max-width: 849px) {
    #dp-onepage-checkout .dp-ui-card,
    #dp-onepage-checkout .dp-onepage-cart,
    #dp-onepage-checkout .dp-onepage-review .checkout-sidebar { padding: 20px; }
    #dp-onepage-checkout .dp-section-heading h2,
    #dp-onepage-checkout #order_review_heading { font-size: 19px; }
    #dp-onepage-checkout .dp-invoice-card { margin-top: 20px; }
}
@media (max-width: 549px) {
    #dp-onepage-checkout .dp-ui-card,
    #dp-onepage-checkout .dp-onepage-cart,
    #dp-onepage-checkout .dp-onepage-review .checkout-sidebar { padding: 17px 15px; border-radius: 13px; }
    #dp-onepage-checkout .dp-section-heading { gap: 10px; padding-bottom: 15px; }
    #dp-onepage-checkout .dp-section-heading h2 { font-size: 18px; }
    #dp-onepage-checkout .dp-section-heading p { font-size: 11px; }
    #dp-onepage-cart table.shop_table,
    #dp-onepage-cart table.shop_table tbody { display: block; width: 100%; }
    #dp-onepage-cart table.shop_table thead { display: none; }
    #dp-onepage-cart table.shop_table tr.cart_item {
        display: grid;
        grid-template-columns: 52px minmax(0,1fr) 24px;
        grid-template-areas: 'thumb name remove' 'thumb price price' 'qty total total';
        gap: 5px 10px;
        padding: 17px 0;
        border-bottom: 1px solid #e9edf3;
        background: transparent;
    }
    #dp-onepage-cart table.shop_table tr.cart_item:first-child { padding-top: 4px; }
    #dp-onepage-cart table.shop_table tr.cart_item td { display: block; padding: 0 !important; width: auto; min-width: 0; border: 0 !important; background: transparent; }
    #dp-onepage-cart table.shop_table tr.cart_item td::before { display: none; content: none; }
    #dp-onepage-cart table.shop_table tr.cart_item .product-remove { grid-area: remove; justify-self: end; }
    #dp-onepage-cart table.shop_table tr.cart_item .product-thumbnail { grid-area: thumb; }
    #dp-onepage-cart table.shop_table tr.cart_item .product-name { grid-area: name; text-align: left !important; }
    #dp-onepage-cart table.shop_table tr.cart_item .product-price { grid-area: price; text-align: left !important; }
    #dp-onepage-cart table.shop_table tr.cart_item .product-quantity { grid-area: qty; text-align: left !important; margin-top: 7px; }
    #dp-onepage-cart table.shop_table tr.cart_item .product-subtotal { grid-area: total; justify-self: end; align-self: center; margin-top: 7px; }
    #dp-onepage-cart table.shop_table tr.cart_item .product-price::before { display: inline; content: 'Đơn giá: '; font-size: 11px; color: var(--dp-muted); }
    #dp-onepage-cart table.shop_table tr.cart_item .product-subtotal::before { display: inline; content: 'Tạm tính: '; font-size: 11px; color: var(--dp-muted); }
    #dp-onepage-cart .product-name a { font-size: 13px; }
    #dp-onepage-cart .quantity { min-width: 80px; }
    #dp-onepage-cart table.shop_table tr:not(.cart_item),
    #dp-onepage-cart table.shop_table td.actions { display: block; width: 100%; }
    #dp-onepage-checkout .dp-customer-card input.input-text,
    #dp-onepage-checkout .dp-customer-card textarea,
    #dp-onepage-checkout .dp-invoice-fields input.input-text,
    #dp-onepage-checkout .dp-invoice-fields textarea { font-size: 16px; }
    #dp-onepage-checkout .dp-vat-toggle { gap: 10px; }
    #dp-onepage-checkout .dp-vat-toggle-copy strong { font-size: 14px; }
    #dp-onepage-checkout #order_review tfoot tr.order-total .amount { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    #dp-onepage-checkout input, #dp-onepage-checkout textarea, #dp-onepage-checkout button { transition: none !important; }
}
