/* Demo Readiness presentation-only fixes. */

/* Guest My Account: Coffeeno OTP owns the visible login UI. */
body.coffeeno-otp-account-guest h1.entry-title,
body.coffeeno-otp-account-guest .woocommerce > h2,
body.coffeeno-otp-account-guest #customer_login h2{
    display:none!important;
}

/* Woo cart notices must remain inside the mobile viewport. */
body.woocommerce-cart .woocommerce,
body.woocommerce-cart .woocommerce-notices-wrapper,
body.woocommerce-cart .woocommerce-error,
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .wc-block-components-notice-banner,
body.woocommerce-cart .wc-block-components-notice-banner__content{
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
}

body.woocommerce-cart .woocommerce-error,
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .wc-block-components-notice-banner,
body.woocommerce-cart .wc-block-components-notice-banner__content{
    width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
}

body.woocommerce-cart .woocommerce-error li,
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .wc-block-components-notice-banner__content,
body.woocommerce-cart .wc-block-components-notice-banner__content > *{
    max-width:100%;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
}

/* Shared Coffeeno header-cart surface. */
.coffeeno-cart-host{
    display:inline-flex;
    position:relative;
    line-height:1;
}

.coffeeno-header-cart{
    --coffeeno-header-cart-size:44px;
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-width:var(--coffeeno-header-cart-size);
    min-height:var(--coffeeno-header-cart-size);
    padding:8px 10px;
    border:0;
    border-radius:12px;
    background:transparent;
    color:inherit;
    cursor:pointer;
    line-height:1;
    box-shadow:none;
}

.coffeeno-header-cart:hover{
    color:inherit;
    opacity:.86;
}

.coffeeno-header-cart:focus-visible{
    color:inherit;
    outline:2px solid currentColor;
    outline-offset:2px;
}

.coffeeno-header-cart__icon{
    display:inline-flex;
    width:24px;
    height:24px;
    align-items:center;
    justify-content:center;
}

.coffeeno-header-cart__icon svg{
    display:block;
    width:100%;
    height:100%;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.coffeeno-header-cart__label{
    font-size:13px;
    font-weight:600;
    line-height:1.4;
    white-space:nowrap;
}

.coffeeno-header-cart__count{
    position:absolute;
    top:-7px;
    right:-7px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:20px;
    height:20px;
    padding:0 5px;
    border:2px solid #fff;
    border-radius:999px;
    background:var(--coffeeno-color-brand,#d8252b);
    color:#fff;
    font-size:10px;
    font-weight:800;
    line-height:1;
    box-sizing:border-box;
}

.coffeeno-header-cart-drawer .coffeeno-cart-panel{
    z-index:2;
}

/* Empty cart: one clear recovery path back to Coffeeno Quick Order. */
.coffeeno-empty-cart{
    width:min(100%,680px);
    margin:clamp(22px,5vw,52px) auto;
    padding:0 14px;
    box-sizing:border-box;
}

.coffeeno-empty-cart__inner{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:12px;
    padding:clamp(28px,6vw,48px) clamp(18px,5vw,42px);
    border:1px solid var(--coffeeno-color-border,#dedede);
    border-radius:22px;
    background:var(--coffeeno-color-surface,#fff);
    box-shadow:0 12px 34px rgba(0,0,0,.05);
}

.coffeeno-empty-cart__eyebrow{
    display:inline-flex;
    padding:6px 10px;
    border-radius:999px;
    background:var(--coffeeno-color-surface-soft,#f6f6f6);
    color:var(--coffeeno-color-muted,#666);
    font-size:12px;
    font-weight:700;
}

.coffeeno-empty-cart h2{
    margin:0;
    font-size:clamp(24px,5vw,34px);
    line-height:1.45;
}

.coffeeno-empty-cart p{
    max-width:500px;
    margin:0;
    color:var(--coffeeno-color-muted,#666);
    font-size:15px;
    line-height:1.9;
}

.coffeeno-empty-cart__cta{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:48px;
    margin-top:4px;
    padding:10px 22px;
    border-radius:14px;
    background:var(--coffeeno-color-brand,#d8252b);
    color:#fff!important;
    text-decoration:none!important;
    font-weight:800;
    transition:transform .16s ease,opacity .16s ease;
}

.coffeeno-empty-cart__cta:hover{
    color:#fff!important;
    opacity:.92;
    transform:translateY(-1px);
}

.coffeeno-empty-cart__cta:focus-visible{
    outline:2px solid var(--coffeeno-color-brand,#d8252b);
    outline-offset:3px;
}

@media(max-width:767px){
    body.woocommerce-cart .woocommerce-notices-wrapper{
        width:100%!important;
        overflow:hidden!important;
    }

    body.woocommerce-cart .woocommerce-error,
    body.woocommerce-cart .woocommerce-message,
    body.woocommerce-cart .woocommerce-info{
        display:block!important;
        margin:0 0 18px!important;
        padding:16px 16px 16px 42px!important;
        line-height:1.8!important;
        overflow:hidden!important;
    }

    body.woocommerce-cart .woocommerce-error::before,
    body.woocommerce-cart .woocommerce-message::before,
    body.woocommerce-cart .woocommerce-info::before{
        left:14px!important;
        top:16px!important;
    }

    body.woocommerce-cart .woocommerce-error li{
        display:block!important;
        margin:0!important;
        padding:0!important;
    }

    body.woocommerce-cart .wc-block-components-notice-banner{
        display:flex!important;
        align-items:flex-start!important;
        gap:10px!important;
        width:100%!important;
        min-width:0!important;
        margin:0 0 18px!important;
        padding:14px!important;
        overflow:hidden!important;
    }

    body.woocommerce-cart .wc-block-components-notice-banner__content{
        flex:1 1 auto!important;
        min-width:0!important;
        line-height:1.8!important;
        overflow:hidden!important;
    }

    /* The old sticky mobile menu no longer exists; anchor the Coffeeno FAB to the viewport edge. */
    .coffeeno-native-menu .coffeeno-cart-fab{
        right:14px!important;
        bottom:max(18px,env(safe-area-inset-bottom))!important;
    }

    .coffeeno-header-cart{
        --coffeeno-header-cart-size:42px;
        padding:7px 9px;
    }

    .coffeeno-empty-cart{
        margin:18px auto 28px;
        padding:0 10px;
    }

    .coffeeno-empty-cart__inner{
        gap:10px;
        padding:26px 18px;
        border-radius:18px;
    }

    .coffeeno-empty-cart p{
        font-size:14px;
    }

    .coffeeno-empty-cart__cta{
        width:100%;
        box-sizing:border-box;
    }
}


/* Demo UX follow-up — cart containment, menu anchor, modal ergonomics, thank-you mobile. */
@media(max-width:900px){
    .coffeeno-native-menu{scroll-margin-top:96px}
}

@media(max-width:767px){
    body.woocommerce-cart{overflow-x:clip!important}
    body.woocommerce-cart #page,
    body.woocommerce-cart .site,
    body.woocommerce-cart .site-content,
    body.woocommerce-cart .content-area,
    body.woocommerce-cart .site-main,
    body.woocommerce-cart article.page,
    body.woocommerce-cart .entry-content,
    body.woocommerce-cart .page-content,
    body.woocommerce-cart .woocommerce,
    body.woocommerce-cart .wp-block-woocommerce-cart,
    body.woocommerce-cart .wc-block-cart,
    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .cart-collaterals{
        max-width:100%!important;
        min-width:0!important;
        box-sizing:border-box!important;
    }

    body.woocommerce-cart .entry-content,
    body.woocommerce-cart .page-content,
    body.woocommerce-cart .woocommerce,
    body.woocommerce-cart .wp-block-woocommerce-cart,
    body.woocommerce-cart .wc-block-cart,
    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .cart-collaterals{
        width:100%!important;
        margin-inline:0!important;
    }

    body.woocommerce-cart .entry-content,
    body.woocommerce-cart .page-content,
    body.woocommerce-cart .woocommerce{
        overflow-x:clip!important;
    }

    body.woocommerce-cart .wc-block-cart{
        grid-template-columns:minmax(0,1fr)!important;
    }

    body.woocommerce-cart .wc-block-cart__main,
    body.woocommerce-cart .wc-block-cart__sidebar,
    body.woocommerce-cart .wc-block-cart-items,
    body.woocommerce-cart .wc-block-components-sidebar-layout__main,
    body.woocommerce-cart .wc-block-components-sidebar-layout__sidebar,
    body.woocommerce-cart table.shop_table{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        box-sizing:border-box!important;
    }

    body.woocommerce-cart .wc-block-cart-item__wrap,
    body.woocommerce-cart .wc-block-components-product-name,
    body.woocommerce-cart .product-name,
    body.woocommerce-cart .product-name a,
    body.woocommerce-cart .wc-block-components-notice-banner__content{
        min-width:0!important;
        max-width:100%!important;
        white-space:normal!important;
        overflow-wrap:anywhere!important;
        word-break:break-word!important;
    }

    .coffeeno-product-modal{
        display:flex;
        align-items:center;
        justify-content:center;
        padding:clamp(10px,3vw,16px);
        box-sizing:border-box;
    }
    .coffeeno-product-modal[hidden]{display:none!important}
    .coffeeno-product-modal .coffeeno-modal-dialog{
        position:relative!important;
        inset:auto!important;
        left:auto!important;
        right:auto!important;
        top:auto!important;
        bottom:auto!important;
        transform:none!important;
        z-index:1;
        width:min(100%,620px)!important;
        max-height:min(88dvh,860px)!important;
        margin:auto!important;
        padding:14px 12px calc(12px + env(safe-area-inset-bottom))!important;
        border-radius:22px!important;
        overflow:auto!important;
        overscroll-behavior:contain;
    }
    .coffeeno-product-modal .coffeeno-modal-actions{bottom:0!important}

    body.woocommerce-order-received .woocommerce-order-overview{
        display:grid!important;
        grid-template-columns:minmax(0,1fr)!important;
        gap:10px!important;
        width:100%!important;
        max-width:100%!important;
        margin:0 0 18px!important;
        padding:12px!important;
        box-sizing:border-box!important;
    }
    body.woocommerce-order-received .woocommerce-order-overview li{
        float:none!important;
        display:block!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        margin:0!important;
        padding:12px 14px!important;
        border:1px solid var(--coffeeno-ui-border,#dadada)!important;
        border-radius:12px!important;
        box-sizing:border-box!important;
        white-space:normal!important;
        overflow-wrap:anywhere!important;
        word-break:break-word!important;
    }
    body.woocommerce-order-received .woocommerce-order-overview li strong{
        display:block!important;
        max-width:100%!important;
        margin-top:4px!important;
        white-space:normal!important;
        overflow-wrap:anywhere!important;
        word-break:break-word!important;
    }
}

@media(prefers-reduced-motion:reduce){
    .coffeeno-empty-cart__cta{
        transition:none!important;
    }
}
