/*
 * BCH Commerce Studio — canonical Thank You layout
 * v1.0.10
 * Loaded after commerce.css so legacy Thank You rules cannot collide.
 */

body.bch-thankyou-page,
body.bch-thankyou-page * {
    box-sizing:border-box;
}

/* Theme / WoodMart shell normalization. */
body.bch-thankyou-page .main-page-wrapper,
body.bch-thankyou-page .wd-page-content,
body.bch-thankyou-page .page-content,
body.bch-thankyou-page .content-layout-wrapper,
body.bch-thankyou-page .content-layout-wrapper > .site-content,
body.bch-thankyou-page .main-page-wrapper .site-content,
body.bch-thankyou-page .main-page-wrapper .content-area,
body.bch-thankyou-page .main-page-wrapper .wd-content-area,
body.bch-thankyou-page .entry-content,
body.bch-thankyou-page .woocommerce {
    float:none!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
}

body.bch-thankyou-page .content-layout-wrapper {
    display:block!important;
    grid-template-columns:1fr!important;
}

/* WooCommerce is the only page-level grid. */
body.bch-thankyou-page .woocommerce-order {
    display:grid!important;
    grid-template-columns:minmax(0,1.55fr) minmax(340px,.85fr)!important;
    gap:24px!important;
    align-items:start!important;
    width:min(100%,1360px)!important;
    max-width:1360px!important;
    min-width:0!important;
    margin:0 auto!important;
    padding:clamp(14px,2vw,28px)!important;
    overflow:visible!important;
}

/* Elementor output MUST occupy a complete grid row. */
body.bch-thankyou-page .woocommerce-order > .bch-thankyou-template-shell,
body.bch-thankyou-page .woocommerce-order > .bch-thankyou-content-shell,
body.bch-thankyou-page .woocommerce-order > [data-elementor-type],
body.bch-thankyou-page .woocommerce-order > .elementor {
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
}

body.bch-thankyou-page .bch-thankyou-template-shell,
body.bch-thankyou-page .bch-thankyou-template-shell > .elementor,
body.bch-thankyou-page .bch-thankyou-template-shell .elementor-section,
body.bch-thankyou-page .bch-thankyou-template-shell .elementor-container,
body.bch-thankyou-page .bch-thankyou-template-shell .elementor-column,
body.bch-thankyou-page .bch-thankyou-template-shell .elementor-widget-wrap,
body.bch-thankyou-page .bch-thankyou-template-shell .elementor-widget,
body.bch-thankyou-page .bch-thankyou-template-shell .elementor-widget-container,
body.bch-thankyou-page .bch-thankyou-template-shell .e-con,
body.bch-thankyou-page .bch-thankyou-template-shell .e-con-inner {
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
}

body.bch-thankyou-page .bch-thankyou-template-shell .elementor-section.elementor-section-boxed > .elementor-container,
body.bch-thankyou-page .bch-thankyou-template-shell .e-con.e-con-boxed > .e-con-inner {
    max-width:none!important;
}

/* One controlled vertical stack for hero / support / proof. */
body.bch-thankyou-page .bch-thankyou-content-shell {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:18px!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
}

body.bch-thankyou-page .bch-thankyou-content-shell > .bch-thankyou-hero,
body.bch-thankyou-page .bch-thankyou-content-shell > .bch-thankyou-support,
body.bch-thankyou-page .bch-thankyou-content-shell > .bch-payment-proof,
body.bch-thankyou-page .bch-thankyou-content-shell > .bch-thankyou-anchor {
    grid-column:1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    float:none!important;
}

/* Hero */
body.bch-thankyou-page .bch-thankyou-hero {
    position:relative!important;
    overflow:hidden!important;
    padding:0!important;
    border:1px solid rgba(255,255,255,.08)!important;
    border-radius:26px!important;
    background:
        radial-gradient(circle at top right,rgba(240,122,0,.18),transparent 34%),
        radial-gradient(circle at top left,rgba(255,255,255,.05),transparent 28%),
        linear-gradient(145deg,var(--bch-thankyou-hero-bg,#111827),var(--bch-thankyou-hero-bg-alt,#192231))!important;
    color:var(--bch-thankyou-hero-text,#fff)!important;
    box-shadow:0 24px 60px rgba(0,0,0,.18)!important;
}

body.bch-thankyou-page .bch-thankyou-status {
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    gap:20px!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    padding:34px 36px 28px!important;
}

body.bch-thankyou-page .bch-thankyou-copy,
body.bch-thankyou-page .bch-thankyou-order-badge {
    min-width:0!important;
}

body.bch-thankyou-page .bch-thankyou-copy h1 {
    margin:0 0 7px!important;
    color:inherit!important;
    font-size:clamp(26px,2.4vw,38px)!important;
    font-weight:900!important;
    line-height:1.22!important;
}

body.bch-thankyou-page .bch-thankyou-copy p {
    width:100%!important;
    max-width:900px!important;
    margin:0!important;
    color:inherit!important;
    opacity:.86!important;
    font-size:clamp(13px,1.15vw,16px)!important;
    line-height:1.9!important;
}

body.bch-thankyou-page .bch-thankyou-order-badge {
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:140px!important;
    min-height:88px!important;
    padding:14px 18px!important;
    border:1px solid rgba(255,255,255,.22)!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.12)!important;
    text-align:center!important;
}

body.bch-thankyou-page .bch-thankyou-order-badge strong {
    overflow-wrap:anywhere!important;
}

body.bch-thankyou-page .bch-thankyou-summary {
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:12px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:18px 36px!important;
}

body.bch-thankyou-page .bch-thankyou-summary > div,
body.bch-thankyou-page .bch-thankyou-summary-item {
    display:grid!important;
    grid-template-columns:36px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:10px!important;
    align-items:center!important;
    min-width:0!important;
    min-height:76px!important;
    padding:13px 14px!important;
    border:1px solid rgba(255,255,255,.16)!important;
    border-radius:16px!important;
    background:rgba(255,255,255,.09)!important;
    overflow:hidden!important;
}

body.bch-thankyou-page .bch-thankyou-summary strong {
    min-width:0!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
}

body.bch-thankyou-page .bch-thankyou-actions {
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0 36px 22px!important;
}

body.bch-thankyou-page .bch-thankyou-actions a {
    min-width:0!important;
    max-width:100%!important;
}

/* Support */
body.bch-thankyou-page .bch-thankyou-support {
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    gap:14px!important;
    align-items:center!important;
    padding:16px 18px!important;
    border:1px solid var(--bch-checkout-border,#E5E7EB)!important;
    border-radius:20px!important;
    background:var(--bch-thankyou-support-bg,#fff)!important;
    box-shadow:0 10px 28px rgba(15,23,42,.08)!important;
    overflow:hidden!important;
}

body.bch-thankyou-page .bch-thankyou-support-copy {
    min-width:0!important;
}

body.bch-thankyou-page .bch-thankyou-support-copy strong,
body.bch-thankyou-page .bch-thankyou-support-copy span,
body.bch-thankyou-page .bch-thankyou-support-copy small {
    overflow-wrap:anywhere!important;
}

body.bch-thankyou-page .bch-thankyou-whatsapp {
    min-width:0!important;
    max-width:100%!important;
    white-space:normal!important;
}

/* Payment proof */
body.bch-thankyou-page .bch-payment-proof {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:16px!important;
    align-items:stretch!important;
    padding:20px!important;
    border:1px solid rgba(15,23,42,.08)!important;
    border-radius:22px!important;
    background:var(--bch-thankyou-proof-bg,#fff)!important;
    box-shadow:0 12px 30px rgba(15,23,42,.08)!important;
    overflow:hidden!important;
}

body.bch-thankyou-page .bch-payment-proof__head,
body.bch-thankyou-page .bch-payment-proof__status {
    display:flex!important;
    gap:14px!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
}

body.bch-thankyou-page .bch-payment-proof__head > div,
body.bch-thankyou-page .bch-payment-proof__status > div {
    min-width:0!important;
}

body.bch-thankyou-page .bch-payment-proof__head p,
body.bch-thankyou-page .bch-payment-proof__status p {
    overflow-wrap:anywhere!important;
}

body.bch-thankyou-page .bch-payment-proof__form {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(170px,220px)!important;
    gap:12px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    align-items:stretch!important;
}

body.bch-thankyou-page .bch-payment-proof__drop {
    width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
}

body.bch-thankyou-page .bch-payment-proof__submit {
    width:100%!important;
    min-width:0!important;
    max-width:220px!important;
    margin:0!important;
    align-self:stretch!important;
}

/* Native order/customer cards are separate grid items and never overlap. */
body.bch-thankyou-page .woocommerce-order > .woocommerce-order-details {
    grid-column:1 / 2!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
}

body.bch-thankyou-page .woocommerce-order > .woocommerce-customer-details {
    grid-column:2 / 3!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
}

body.bch-thankyou-page .woocommerce-order-details,
body.bch-thankyou-page .woocommerce-customer-details,
body.bch-thankyou-page .woocommerce-bacs-bank-details,
body.bch-thankyou-page .wc-bacs-bank-details {
    position:relative!important;
    float:none!important;
    max-width:none!important;
    padding:24px!important;
    border-radius:20px!important;
    overflow:hidden!important;
}

body.bch-thankyou-page .woocommerce-order-details table,
body.bch-thankyou-page .shop_table {
    width:100%!important;
    max-width:100%!important;
    table-layout:fixed!important;
}

body.bch-thankyou-page .woocommerce-order-details th,
body.bch-thankyou-page .woocommerce-order-details td,
body.bch-thankyou-page .shop_table th,
body.bch-thankyou-page .shop_table td,
body.bch-thankyou-page .woocommerce-customer-details address {
    min-width:0!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
}

body.bch-thankyou-page .bch-thankyou-product {
    min-width:0!important;
    max-width:100%!important;
}

/* Tablet */
@media (max-width:1024px) {
    body.bch-thankyou-page .woocommerce-order {
        grid-template-columns:1fr!important;
        gap:18px!important;
        padding:18px!important;
    }

    body.bch-thankyou-page .woocommerce-order > .woocommerce-order-details,
    body.bch-thankyou-page .woocommerce-order > .woocommerce-customer-details {
        grid-column:1!important;
    }

    body.bch-thankyou-page .bch-thankyou-summary {
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}

/* Mobile: one column everywhere; no side-by-side card can collide. */
@media (max-width:767px) {
    body.bch-thankyou-page .woocommerce-order {
        display:grid!important;
        grid-template-columns:minmax(0,1fr)!important;
        gap:14px!important;
        width:100%!important;
        max-width:100%!important;
        padding:10px!important;
    }

    body.bch-thankyou-page .bch-thankyou-content-shell {
        gap:12px!important;
    }

    body.bch-thankyou-page .bch-thankyou-hero {
        border-radius:18px!important;
    }

    body.bch-thankyou-page .bch-thankyou-status {
        grid-template-columns:auto minmax(0,1fr)!important;
        gap:12px!important;
        padding:18px 14px 14px!important;
    }

    body.bch-thankyou-page .bch-thankyou-icon {
        width:52px!important;
        height:52px!important;
        min-width:52px!important;
        font-size:26px!important;
    }

    body.bch-thankyou-page .bch-thankyou-copy h1 {
        font-size:21px!important;
    }

    body.bch-thankyou-page .bch-thankyou-copy p {
        font-size:12px!important;
        line-height:1.75!important;
    }

    body.bch-thankyou-page .bch-thankyou-order-badge {
        grid-column:1 / -1!important;
        width:100%!important;
        min-width:0!important;
        min-height:0!important;
        padding:10px 12px!important;
        flex-direction:row!important;
        justify-content:space-between!important;
    }

    body.bch-thankyou-page .bch-thankyou-summary {
        grid-template-columns:minmax(0,1fr)!important;
        gap:8px!important;
        padding:12px 14px!important;
    }

    body.bch-thankyou-page .bch-thankyou-summary > div,
    body.bch-thankyou-page .bch-thankyou-summary-item {
        min-height:64px!important;
        padding:10px 11px!important;
    }

    body.bch-thankyou-page .bch-thankyou-actions {
        flex-direction:column!important;
        align-items:stretch!important;
        gap:8px!important;
        padding:0 14px 14px!important;
    }

    body.bch-thankyou-page .bch-thankyou-actions a {
        width:100%!important;
    }

    body.bch-thankyou-page .bch-thankyou-support {
        grid-template-columns:auto minmax(0,1fr)!important;
        gap:10px!important;
        padding:12px!important;
        border-radius:16px!important;
    }

    body.bch-thankyou-page .bch-thankyou-whatsapp {
        grid-column:1 / -1!important;
        width:100%!important;
        justify-content:center!important;
        text-align:center!important;
    }

    body.bch-thankyou-page .bch-payment-proof {
        gap:12px!important;
        padding:12px!important;
        border-radius:16px!important;
    }

    body.bch-thankyou-page .bch-payment-proof__form {
        grid-template-columns:minmax(0,1fr)!important;
        gap:10px!important;
    }

    body.bch-thankyou-page .bch-payment-proof__submit {
        max-width:none!important;
        min-height:48px!important;
    }

    body.bch-thankyou-page .woocommerce-order-details,
    body.bch-thankyou-page .woocommerce-customer-details,
    body.bch-thankyou-page .woocommerce-bacs-bank-details,
    body.bch-thankyou-page .wc-bacs-bank-details {
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        padding:14px 12px!important;
        border-radius:16px!important;
    }

    body.bch-thankyou-page .woocommerce-order-details table,
    body.bch-thankyou-page .shop_table {
        font-size:12px!important;
    }
}
