/* L&B Checkout Design – scoped to checkout only through body.lbco-active */
body.lbco-active {
    --lbco-navy: #102542;
    --lbco-navy-2: #17365f;
    --lbco-orange: #ff6258;
    --lbco-bg: #f5f7fa;
    --lbco-card: #ffffff;
    --lbco-line: #e2e7ee;
    --lbco-text: #172033;
    --lbco-muted: #667085;
    --lbco-radius: 18px;
    --lbco-shadow: 0 14px 42px rgba(16, 37, 66, .08);
}

body.lbco-active #content.site-content,
body.lbco-active .site-content {
    background: var(--lbco-bg) !important;
}

body.lbco-active #primary.content-area {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 54px 26px 80px !important;
    background: var(--lbco-bg) !important;
}

body.lbco-active #primary > .col-md-12 {
    width: 100% !important;
    max-width: 1260px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    float: none !important;
}

body.lbco-active #primary > .col-md-12 > .col-md-12,
body.lbco-active .lbco-layout {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px) !important;
    gap: 42px !important;
    align-items: start !important;
    float: none !important;
}

body.lbco-active .lbco-layout > .col-md-6,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6 {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.lbco-active .lbco-checkout-panel > div,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:first-child > div {
    margin: 0 !important;
}

body.lbco-active .lbco-checkout-panel .site-main,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:first-child .site-main {
    margin: 0 !important;
}

body.lbco-active .lbco-checkout-panel article,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:first-child article {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.lbco-active .lbco-checkout-panel .entry-content,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:first-child .entry-content {
    margin: 0 !important;
}

body.lbco-active .lbco-checkout-panel .woocommerce,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:first-child .woocommerce {
    padding: 30px !important;
    background: var(--lbco-card) !important;
    border: 1px solid var(--lbco-line) !important;
    border-radius: var(--lbco-radius) !important;
    box-shadow: var(--lbco-shadow) !important;
}

body.lbco-active .lbco-benefits-panel,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child {
    padding: 30px !important;
    background: var(--lbco-card) !important;
    border: 1px solid var(--lbco-line) !important;
    border-radius: var(--lbco-radius) !important;
    box-shadow: 0 10px 32px rgba(16, 37, 66, .055) !important;
    position: sticky !important;
    top: 26px !important;
}

body.lbco-active .lbco-benefits-panel > span:first-child,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child > span:first-child {
    display: block !important;
    margin-bottom: 20px !important;
    color: var(--lbco-navy) !important;
    font-size: 26px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
}

body.lbco-active .lbco-benefits-panel h1,
body.lbco-active .lbco-benefits-panel h2,
body.lbco-active .lbco-benefits-panel h3,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child h1,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child h2,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child h3 {
    color: var(--lbco-text) !important;
    line-height: 1.25 !important;
    letter-spacing: -.015em !important;
}

body.lbco-active .lbco-benefits-panel p,
body.lbco-active .lbco-benefits-panel li,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child p,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child li {
    color: #344054 !important;
    font-size: 16px !important;
    line-height: 1.65 !important;
}

body.lbco-active .lbco-benefits-panel ul,
body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child ul {
    margin: 22px 0 !important;
    padding-left: 22px !important;
}

body.lbco-active .woocommerce form.checkout,
body.lbco-active form.woocommerce-checkout {
    margin: 0 !important;
}

body.lbco-active .woocommerce-checkout #customer_details,
body.lbco-active .woocommerce-checkout #order_review,
body.lbco-active .woocommerce-checkout #order_review_heading {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.lbco-active .woocommerce-checkout #customer_details .col-1,
body.lbco-active .woocommerce-checkout #customer_details .col-2 {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.lbco-active .woocommerce-billing-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 12px !important;
}

body.lbco-active .woocommerce form .form-row {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.lbco-active .woocommerce form .form-row-wide,
body.lbco-active .woocommerce form .stripe-gateway-checkout-email-field,
body.lbco-active #billing_phone_field,
body.lbco-active #billing_address_1_field,
body.lbco-active #billing_country_field,
body.lbco-active #billing_postcode_field,
body.lbco-active #billing_city_field,
body.lbco-active #billing_alg_wc_checkout_field_1_field {
    grid-column: 1 / -1 !important;
}

body.lbco-active .woocommerce form .form-row label:not(.woocommerce-form__label-for-checkbox) {
    display: block !important;
    margin: 0 0 7px !important;
    color: #344054 !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

body.lbco-active .woocommerce form .form-row input.input-text,
body.lbco-active .woocommerce form .form-row textarea,
body.lbco-active .woocommerce form .form-row select,
body.lbco-active .select2-container .select2-selection--single {
    width: 100% !important;
    min-height: 54px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    color: var(--lbco-text) !important;
    background: #fff !important;
    border: 1px solid #d7dde5 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03) !important;
    font-size: 16px !important;
    outline: none !important;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
}

body.lbco-active .woocommerce form .form-row textarea {
    min-height: 110px !important;
    padding-top: 14px !important;
    resize: vertical !important;
}

body.lbco-active .woocommerce form .form-row input.input-text:focus,
body.lbco-active .woocommerce form .form-row textarea:focus,
body.lbco-active .woocommerce form .form-row select:focus,
body.lbco-active .select2-container--open .select2-selection--single {
    border-color: var(--lbco-navy) !important;
    box-shadow: 0 0 0 3px rgba(16, 37, 66, .10) !important;
}

body.lbco-active .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 52px !important;
    padding: 0 !important;
}

body.lbco-active .select2-container .select2-selection--single .select2-selection__arrow {
    height: 52px !important;
    right: 10px !important;
}

body.lbco-active .woocommerce-billing-fields h3,
body.lbco-active #order_review_heading,
body.lbco-active .woocommerce-additional-fields h3 {
    margin: 0 0 18px !important;
    color: var(--lbco-navy) !important;
    font-size: 20px !important;
    font-weight: 800 !important;
}

body.lbco-active .woocommerce-checkout-review-order-table {
    width: 100% !important;
    margin: 26px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--lbco-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.lbco-active .woocommerce-checkout-review-order-table th,
body.lbco-active .woocommerce-checkout-review-order-table td {
    padding: 18px 0 !important;
    border: 0 !important;
    color: var(--lbco-text) !important;
    font-size: 15px !important;
}

body.lbco-active .woocommerce-checkout-review-order-table .order-total th,
body.lbco-active .woocommerce-checkout-review-order-table .order-total td {
    border-top: 1px solid var(--lbco-line) !important;
    font-size: 17px !important;
    font-weight: 800 !important;
}

body.lbco-active .woocommerce-checkout-review-order-table .order-total td {
    text-align: right !important;
}

body.lbco-active #payment.woocommerce-checkout-payment {
    margin: 22px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
}

body.lbco-active #payment ul.payment_methods {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.lbco-active #payment ul.payment_methods li.wc_payment_method {
    width: 100% !important;
    margin: 0 0 10px !important;
    padding: 16px 18px !important;
    float: none !important;
    text-align: left !important;
    color: var(--lbco-text) !important;
    background: #f8fafc !important;
    border: 1px solid var(--lbco-line) !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
}

body.lbco-active #payment ul.payment_methods li.wc_payment_method.lbco-selected,
body.lbco-active #payment ul.payment_methods li.wc_payment_method:has(input[type="radio"]:checked) {
    background: #fff !important;
    border-color: var(--lbco-navy) !important;
    box-shadow: 0 0 0 3px rgba(16, 37, 66, .07) !important;
}

body.lbco-active #payment ul.payment_methods li.wc_payment_method > input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    margin: 2px 10px 0 0 !important;
    vertical-align: top !important;
    accent-color: var(--lbco-navy) !important;
}

body.lbco-active #payment ul.payment_methods li.wc_payment_method > label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: calc(100% - 34px) !important;
    margin: 0 !important;
    color: var(--lbco-text) !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    font-weight: 750 !important;
    cursor: pointer !important;
}

body.lbco-active #payment ul.payment_methods li.wc_payment_method > label img {
    width: auto !important;
    max-width: 150px !important;
    max-height: 30px !important;
    margin-left: auto !important;
    object-fit: contain !important;
}

body.lbco-active #payment div.payment_box {
    margin: 14px 0 0 !important;
    padding: 15px !important;
    color: #475467 !important;
    background: #f2f4f7 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
}

body.lbco-active #payment div.payment_box::before {
    display: none !important;
}

body.lbco-active #payment .place-order {
    margin: 18px 0 0 !important;
    padding: 0 !important;
}

body.lbco-active #payment #place_order,
body.lbco-active .woocommerce #respond input#submit.alt,
body.lbco-active .woocommerce a.button.alt,
body.lbco-active .woocommerce button.button.alt,
body.lbco-active .woocommerce input.button.alt {
    width: 100% !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 15px 22px !important;
    float: none !important;
    color: #fff !important;
    background: var(--lbco-navy) !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
    text-transform: none !important;
    cursor: pointer !important;
    transition: transform .15s ease, background .18s ease, box-shadow .18s ease !important;
}

body.lbco-active #payment #place_order:hover {
    background: var(--lbco-navy-2) !important;
    box-shadow: 0 8px 24px rgba(16, 37, 66, .16) !important;
    transform: translateY(-1px) !important;
}

body.lbco-profile-no #payment #place_order {
    background: #ff5b24 !important;
}

body.lbco-profile-no #payment #place_order:hover {
    background: #e84d19 !important;
}

body.lbco-active .woocommerce-terms-and-conditions-wrapper {
    margin-top: 16px !important;
    color: var(--lbco-muted) !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

body.lbco-active .woocommerce-terms-and-conditions-wrapper .form-row.validate-required,
body.lbco-active .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: flex-start !important;
    gap: 9px !important;
    color: var(--lbco-muted) !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

body.lbco-active .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
    margin: 1px 0 0 !important;
    accent-color: var(--lbco-navy) !important;
}

body.lbco-active .woocommerce-terms-and-conditions-wrapper a {
    color: var(--lbco-navy) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

body.lbco-active #wc-stripe-express-checkout-element {
    margin: 0 0 18px !important;
    padding: 0 !important;
}

body.lbco-active #wc-stripe-express-checkout-button-separator {
    margin: 18px 0 !important;
    color: #98a2b3 !important;
    font-size: 12px !important;
    letter-spacing: .08em !important;
}

body.lbco-active #kco-wrapper {
    overflow: visible !important;
    padding: 0 !important;
}

body.lbco-active #kco-order-review {
    margin: 0 0 16px !important;
}

body.lbco-active #kco-iframe,
body.lbco-active #klarna-checkout-container {
    width: 100% !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    background: #fff !important;
}

body.lbco-active #klarna-checkout-iframe {
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    border: 0 !important;
    border-radius: 14px !important;
}

body.lbco-active .klarna-checkout-select-other-wrapper {
    margin: 0 0 14px !important;
    text-align: left !important;
}

body.lbco-active #klarna-checkout-select-other {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 9px 14px !important;
    color: var(--lbco-navy) !important;
    background: #edf2f7 !important;
    border: 1px solid #dbe2ea !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    text-decoration: none !important;
}

body.lbco-active .woocommerce-error,
body.lbco-active .woocommerce-message,
body.lbco-active .woocommerce-info {
    margin: 0 0 18px !important;
    padding: 14px 16px 14px 46px !important;
    border: 1px solid var(--lbco-line) !important;
    border-top: 0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: var(--lbco-text) !important;
    box-shadow: none !important;
}

body.lbco-active .vipps-banner {
    margin: 0 0 16px !important;
    padding: 14px 16px !important;
    border: 1px solid #ffd7c8 !important;
    border-radius: 12px !important;
    background: #fff7f3 !important;
    color: #7a3218 !important;
    font-size: 14px !important;
}

body.lbco-active .vipps-banner img.notice-logo {
    width: 18px !important;
    height: 18px !important;
    margin-right: 7px !important;
}

body.lbco-active .entry-title,
body.lbco-active form #order_review_heading:not(.elementor-widget-woocommerce-checkout-page #order_review_heading),
body.lbco-active #customer_details h3:not(.elementor-widget-woocommerce-checkout-page h3) {
    display: none !important;
}

/* Keep existing business logic that intentionally hides gateways on each site. */
body.lbco-profile-no .payment_method_stripe,
body.lbco-profile-no .payment_method_stripe_klarna,
body.lbco-profile-no .payment_method_dibs_easy {
    /* Existing site CSS decides visibility. Do not force display here. */
}

@media (max-width: 980px) {
    body.lbco-active #primary.content-area {
        padding: 30px 18px 56px !important;
    }

    body.lbco-active #primary > .col-md-12 > .col-md-12,
    body.lbco-active .lbco-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 22px !important;
    }

    body.lbco-active .lbco-benefits-panel,
    body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child {
        position: static !important;
        order: -1 !important;
        padding: 24px !important;
    }
}

@media (max-width: 640px) {
    body.lbco-active #primary.content-area {
        padding: 18px 12px 40px !important;
    }

    body.lbco-active .lbco-checkout-panel .woocommerce,
    body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:first-child .woocommerce,
    body.lbco-active .lbco-benefits-panel,
    body.lbco-active #primary > .col-md-12 > .col-md-12 > .col-md-6:last-child {
        padding: 18px !important;
        border-radius: 14px !important;
        box-shadow: 0 8px 24px rgba(16, 37, 66, .05) !important;
    }

    body.lbco-active .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body.lbco-active .woocommerce form .form-row-first,
    body.lbco-active .woocommerce form .form-row-last,
    body.lbco-active .woocommerce form .form-row-wide {
        grid-column: 1 / -1 !important;
    }

    body.lbco-active .woocommerce form .form-row input.input-text,
    body.lbco-active .woocommerce form .form-row textarea,
    body.lbco-active .woocommerce form .form-row select,
    body.lbco-active .select2-container .select2-selection--single {
        min-height: 52px !important;
        font-size: 16px !important;
    }

    body.lbco-active #payment ul.payment_methods li.wc_payment_method {
        padding: 14px !important;
        border-radius: 12px !important;
    }

    body.lbco-active #payment ul.payment_methods li.wc_payment_method > label img {
        max-width: 110px !important;
        max-height: 26px !important;
    }
}


/* v1.0.1 – country-specific checkout refinements */
/* Norway: these optional fields are intentionally visually quiet; keep the fields/functionality, hide only their labels. */
body.lbco-active.lbco-profile-no #billing_address_1_field > label,
body.lbco-active.lbco-profile-no #billing_city_field > label {
    display: none !important;
}

/* Denmark: give the Stripe card UI more breathing room without touching Stripe's iframe/payment logic. */
body.lbco-active.lbco-profile-dk #payment .payment_method_stripe div.payment_box {
    padding: 22px !important;
}

body.lbco-active.lbco-profile-dk #payment .payment_method_stripe #wc-stripe-upe-form {
    margin: 0 !important;
    padding: 8px !important;
    background: #fff !important;
    border: 1px solid #e2e7ee !important;
    border-radius: 12px !important;
}

body.lbco-active.lbco-profile-dk #payment .payment_method_stripe .wc-stripe-upe-element {
    width: 100% !important;
    min-height: 56px !important;
    padding: 4px !important;
    box-sizing: border-box !important;
}

@media (max-width: 640px) {
    body.lbco-active.lbco-profile-dk #payment .payment_method_stripe div.payment_box {
        padding: 16px !important;
    }

    body.lbco-active.lbco-profile-dk #payment .payment_method_stripe #wc-stripe-upe-form {
        padding: 6px !important;
    }
}

/* v1.0.5 – checkout cleanup */
/* Checkout must stay distraction-free: hide Google/GPT ad slots, including sticky bottom banners. */
body.lbco-active [id^="gpt_unit_"],
body.lbco-active [id*="gpt_unit_"],
body.lbco-active [id^="google_ads_iframe_"],
body.lbco-active [id*="google_ads_iframe_"],
body.lbco-active ins.adsbygoogle,
body.lbco-active .adsbygoogle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Denmark: same cleanup as NO – keep the optional fields, hide only the labels. */
body.lbco-active.lbco-profile-dk #billing_address_1_field > label,
body.lbco-active.lbco-profile-dk #billing_city_field > label {
    display: none !important;
}

/* Denmark: more breathing room around the Stripe Payment Element itself. */
body.lbco-active.lbco-profile-dk #payment .payment_method_stripe div.payment_box {
    padding: 26px !important;
}

body.lbco-active.lbco-profile-dk #payment .payment_method_stripe #wc-stripe-upe-form {
    padding: 14px !important;
}

body.lbco-active.lbco-profile-dk #payment .payment_method_stripe .wc-stripe-upe-element,
body.lbco-active.lbco-profile-dk #payment .payment_method_stripe .StripeElement {
    min-height: 64px !important;
    padding: 10px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

body.lbco-active.lbco-profile-dk #payment .payment_method_stripe .wc-stripe-upe-element iframe,
body.lbco-active.lbco-profile-dk #payment .payment_method_stripe .StripeElement iframe {
    display: block !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
}

@media (max-width: 640px) {
    body.lbco-active.lbco-profile-dk #payment .payment_method_stripe div.payment_box {
        padding: 20px !important;
    }

    body.lbco-active.lbco-profile-dk #payment .payment_method_stripe #wc-stripe-upe-form {
        padding: 10px !important;
    }
}

/* v1.0.11: spacing for Fordelsklubb block */
.fordelsklubb {
    margin-top: 40px !important;
}
