/* =====================================================================
 * La Bodeteka Delivery — WooCommerce Cart Drawer (slide-in side panel)
 * ---------------------------------------------------------------------
 * Layout (top to bottom):
 *   .lbdwcd-head        title + close button
 *   .lbdwcd-delivery    estimated delivery day
 *   .lbdwcd-freeship    free shipping progress bar
 *   .lbdwcd-items       the line items
 *   .lbdwcd-foot        totals + buttons + payment logos
 * ===================================================================== */

/* Safety net: while the drawer is on the page the layout can never scroll
   sideways (the off-canvas panel stays clipped inside the drawer). */
html:has(.lbdwcd-root) {
    overflow-x: clip;
}

.lbdwcd-root {
    --lbdwcd-accent: #b08a56;
    --lbdwcd-text: #171717;
    --lbdwcd-muted: rgba(17, 17, 17, 0.55);
    --lbdwcd-line: rgba(17, 17, 17, 0.1);
    /* Width of the panel (used to move the floating cart button out of its
       way). Overridden inline by the "Panel Width" control. */
    --lbdwcd-panel-w: 420px;
    position: fixed;
    inset: 0;
    z-index: 999999;
    visibility: hidden;
    pointer-events: none;
    /* The off-canvas panel must never scroll the page: clip it inside the
       (fixed) root instead of letting the transform extend the document. */
    overflow: hidden;
    overflow: clip;
}

.lbdwcd-root.is-open {
    visibility: visible;
    pointer-events: auto;
}

/* The floating button is always visible (and clickable), even while the
   drawer is closed (the root is hidden so the panel cannot be seen). */
.lbdwcd-fab {
    visibility: visible;
    pointer-events: auto;
}

.lbdwcd-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(17, 17, 17, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lbdwcd-root.is-open .lbdwcd-overlay {
    opacity: 1;
}

/* ---------------------------------------------------------------------
 * Floating cart button
 * ------------------------------------------------------------------ */
.lbdwcd-fab {
    --lbdwcd-fab-x: 24px;
    --lbdwcd-fab-y: 24px;
    position: fixed;
    z-index: 99999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    /* Animate opacity ONLY. A transform in this entrance animation (with
       `both` fill-mode) would permanently lock `transform` and stop the
       button from sliding with the panel when the drawer opens. */
    animation: lbdwcd-fab-in 0.4s ease both;
}

@keyframes lbdwcd-fab-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lbdwcd-fab.is-bottom-right {
    right: var(--lbdwcd-fab-x);
    bottom: var(--lbdwcd-fab-y);
}

.lbdwcd-fab.is-bottom-left {
    left: var(--lbdwcd-fab-x);
    bottom: var(--lbdwcd-fab-y);
}

.lbdwcd-fab.is-top-right {
    right: var(--lbdwcd-fab-x);
    top: var(--lbdwcd-fab-y);
}

.lbdwcd-fab.is-top-left {
    left: var(--lbdwcd-fab-x);
    top: var(--lbdwcd-fab-y);
}

.lbdwcd-fab.is-bottom-center {
    left: 50%;
    bottom: var(--lbdwcd-fab-y);
    transform: translateX(-50%);
}

.lbdwcd-fab-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    /* The background is always painted (the inline style from the settings
       overrides it): the button can never become invisible. */
    background-color: var(--lbdwcd-accent, #b08a56);
    background-image: none;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(17, 17, 17, 0.22);
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.lbdwcd-fab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: var(--lbdwcd-fab-icon-size, 52%);
    height: var(--lbdwcd-fab-icon-size, 52%);
    color: inherit;
}

/* The icon must never be broken by the theme's own SVG rules, and it must
   always fill the space reserved for it. */
.lbdwcd-fab-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lbdwcd-fab-count {
    position: absolute;
    top: -2px;
    right: -2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: #171717;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 6px rgba(17, 17, 17, 0.25);
}

.lbdwcd-fab-count[hidden] {
    display: none;
}

.lbdwcd-fab-total {
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.94);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(17, 17, 17, 0.2);
}

/* Hover effects (the value comes from the widget control). */
.lbdwcd-fab[data-lbdwcd-fab-hover="none"] .lbdwcd-fab-btn:hover {
    transform: none;
}

.lbdwcd-fab[data-lbdwcd-fab-hover="lift"] .lbdwcd-fab-btn:hover {
    background-color: var(--lbdwcd-fab-hover-bg, #171717);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(17, 17, 17, 0.28);
}

.lbdwcd-fab[data-lbdwcd-fab-hover="scale"] .lbdwcd-fab-btn:hover {
    background-color: var(--lbdwcd-fab-hover-bg, #171717);
    color: #ffffff;
    transform: scale(1.08);
}

.lbdwcd-fab[data-lbdwcd-fab-hover="glow"] .lbdwcd-fab-btn:hover {
    background-color: var(--lbdwcd-fab-hover-bg, #171717);
    color: #ffffff;
    box-shadow: 0 0 0 6px rgba(176, 138, 86, 0.22), 0 14px 34px rgba(17, 17, 17, 0.26);
}

.lbdwcd-fab[data-lbdwcd-fab-hover="pulse"] .lbdwcd-fab-btn:hover {
    animation: lbdwcd-fab-pulse 1.1s ease-in-out infinite;
}

@keyframes lbdwcd-fab-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.lbdwcd-fab:focus-visible .lbdwcd-fab-btn {
    outline: 2px solid var(--lbdwcd-accent);
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .lbdwcd-fab.is-mobile-hidden {
        display: none;
    }
}

/* ---------------------------------------------------------------------
 * Open animation (slide / fade / zoom / none)
 * ------------------------------------------------------------------ */
.lbdwcd-root {
    --lbdwcd-anim-dur: 350ms;
}

.lbdwcd-root.lbdwcd-anim-slide .lbdwcd-panel {
    transition: opacity var(--lbdwcd-anim-dur) ease;
}

/* The slide is an animation: the panel travels from the edge into view
   without ever sitting outside the viewport while the drawer is closed. */
@keyframes lbdwcd-slide-in-right {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes lbdwcd-slide-in-left {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.lbdwcd-root.lbdwcd-anim-slide.lbdwcd-side-right.is-open .lbdwcd-panel {
    animation: lbdwcd-slide-in-right var(--lbdwcd-anim-dur) cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

.lbdwcd-root.lbdwcd-anim-slide.lbdwcd-side-left.is-open .lbdwcd-panel {
    animation: lbdwcd-slide-in-left var(--lbdwcd-anim-dur) cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

.lbdwcd-root.lbdwcd-anim-fade .lbdwcd-panel {
    opacity: 0;
    transform: none;
    transition: opacity var(--lbdwcd-anim-dur) ease;
}

.lbdwcd-root.lbdwcd-anim-fade.is-open .lbdwcd-panel {
    opacity: 1;
    transform: none;
}

.lbdwcd-root.lbdwcd-anim-zoom .lbdwcd-panel {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity var(--lbdwcd-anim-dur) ease, transform var(--lbdwcd-anim-dur) cubic-bezier(0.22, 0.8, 0.28, 1);
}

.lbdwcd-root.lbdwcd-anim-zoom.is-open .lbdwcd-panel {
    opacity: 1;
    transform: scale(1);
}

.lbdwcd-root.lbdwcd-anim-none .lbdwcd-panel {
    transition: none;
}

/* The overlay always fades. */
.lbdwcd-overlay {
    transition: opacity var(--lbdwcd-anim-dur) ease;
}

/* ---------------------------------------------------------------------
 * Panel
 * ------------------------------------------------------------------ */
.lbdwcd-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 420px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: 0 0 48px rgba(17, 17, 17, 0.22);
    overscroll-behavior: contain;
    /* Closed: the panel stays INSIDE the viewport (hidden, but never
       translated outside) so the page can never scroll horizontally. */
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--lbdwcd-anim-dur, 350ms) ease,
        transform var(--lbdwcd-anim-dur, 350ms) cubic-bezier(0.22, 0.8, 0.28, 1);
}

.lbdwcd-side-right .lbdwcd-panel {
    right: 0;
}

.lbdwcd-side-left .lbdwcd-panel {
    left: 0;
}

.lbdwcd-root.is-open .lbdwcd-panel {
    opacity: 1;
    visibility: visible;
}

/* ---------------------------------------------------------------------
 * The floating cart button follows the panel
 * ------------------------------------------------------------------
 * When the side panel slides in it covers the button, so the button moves
 * along with the panel edge (it stays fully visible and clickable instead
 * of sitting on top of the drawer). The distance is the exact panel width
 * printed by the "Panel Width" control. */
.lbdwcd-fab {
    transition: transform var(--lbdwcd-anim-dur, 350ms) cubic-bezier(0.22, 0.8, 0.28, 1),
        left var(--lbdwcd-anim-dur, 350ms) cubic-bezier(0.22, 0.8, 0.28, 1),
        right var(--lbdwcd-anim-dur, 350ms) cubic-bezier(0.22, 0.8, 0.28, 1);
}

.lbdwcd-root.lbdwcd-side-right.is-open .lbdwcd-fab.is-bottom-right,
.lbdwcd-root.lbdwcd-side-right.is-open .lbdwcd-fab.is-top-right {
    transform: translateX(calc(-1 * var(--lbdwcd-panel-w, 420px)));
}

.lbdwcd-root.lbdwcd-side-left.is-open .lbdwcd-fab.is-bottom-left,
.lbdwcd-root.lbdwcd-side-left.is-open .lbdwcd-fab.is-top-left {
    transform: translateX(var(--lbdwcd-panel-w, 420px));
}

/* A centred button keeps its own centering and slides until it sits just
   beside the panel edge. */
.lbdwcd-root.lbdwcd-side-right.is-open .lbdwcd-fab.is-bottom-center {
    transform: translateX(calc(50vw - var(--lbdwcd-panel-w, 420px) - 76px));
}

.lbdwcd-root.lbdwcd-side-left.is-open .lbdwcd-fab.is-bottom-center {
    transform: translateX(calc(var(--lbdwcd-panel-w, 420px) - 50vw + 76px));
}

/* ---------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------ */
.lbdwcd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--lbdwcd-line);
    flex: 0 0 auto;
}

.lbdwcd-head-text {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lbdwcd-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--lbdwcd-text);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lbdwcd-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--lbdwcd-accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.lbdwcd-count[hidden] {
    display: none;
}

.lbdwcd-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--lbdwcd-text);
    cursor: pointer;
    flex: 0 0 auto;
    transition: background-color 0.22s ease, color 0.22s ease;
}

.lbdwcd-close svg {
    width: 18px;
    height: 18px;
}

.lbdwcd-close:hover {
    background: rgba(17, 17, 17, 0.07);
}

/* ---------------------------------------------------------------------
 * Delivery estimate
 * ------------------------------------------------------------------ */
.lbdwcd-delivery {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(176, 138, 86, 0.08);
    color: var(--lbdwcd-text);
    border-bottom: 1px solid var(--lbdwcd-line);
    flex: 0 0 auto;
}

.lbdwcd-delivery-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: var(--lbdwcd-accent);
}

.lbdwcd-delivery-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

/* ---------------------------------------------------------------------
 * Free shipping progress
 * ------------------------------------------------------------------ */
.lbdwcd-freeship {
    padding: 12px 20px 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--lbdwcd-line);
    flex: 0 0 auto;
}

.lbdwcd-freeship-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.lbdwcd-freeship-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--lbdwcd-accent);
}

.lbdwcd-freeship-text {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--lbdwcd-text);
}

.lbdwcd-freeship-track {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.1);
    overflow: hidden;
}

.lbdwcd-freeship-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0;
    border-radius: 999px;
    background: var(--lbdwcd-accent);
    transition: width 0.4s ease;
}

/* ---------------------------------------------------------------------
 * Items
 * ------------------------------------------------------------------ */
.lbdwcd-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 20px 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
}

.lbdwcd-items:empty {
    display: none;
}

.lbdwcd-item {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 16px 0;
    background: transparent;
    border-bottom: 1px solid var(--lbdwcd-line);
}

.lbdwcd-item:last-child {
    border-bottom: 0;
}

.lbdwcd-thumb {
    display: block;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f4f1;
}

.lbdwcd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lbdwcd-item-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.lbdwcd-item-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--lbdwcd-text);
    text-decoration: none;
}

.lbdwcd-item-name:hover {
    color: var(--lbdwcd-accent);
}

.lbdwcd-variation {
    font-size: 12px;
    line-height: 1.4;
    color: var(--lbdwcd-muted);
}

.lbdwcd-variation dl {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    font-size: inherit;
}

.lbdwcd-variation dt,
.lbdwcd-variation dd {
    margin: 0;
    font-size: inherit;
}

.lbdwcd-item-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}

.lbdwcd-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(17, 17, 17, 0.4);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lbdwcd-remove svg {
    width: 15px;
    height: 15px;
}

.lbdwcd-remove:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.lbdwcd-item-price {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--lbdwcd-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lbdwcd-item-price-old {
    font-size: 12.5px;
    color: var(--lbdwcd-muted);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------
 * Quantity stepper
 * ------------------------------------------------------------------ */
.lbdwcd-qty {
    display: inline-flex;
    align-items: center;
    height: 32px;
    width: 104px;
    border: 1px solid rgba(17, 17, 17, 0.14);
    border-radius: 999px;
    background: #ffffff;
    overflow: hidden;
    color: var(--lbdwcd-text);
}

.lbdwcd-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.lbdwcd-qty-btn:hover {
    background: rgba(176, 138, 86, 0.14);
    color: var(--lbdwcd-accent);
}

.lbdwcd-qty-btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.lbdwcd-qty-input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
}

.lbdwcd-qty-input::-webkit-outer-spin-button,
.lbdwcd-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.lbdwcd-qty.is-busy {
    opacity: 0.55;
    pointer-events: none;
}

/* ---------------------------------------------------------------------
 * Empty state
 * ------------------------------------------------------------------ */
.lbdwcd-empty {
    margin: 0;
    padding: 40px 24px;
    text-align: center;
    font-size: 14.5px;
    color: var(--lbdwcd-muted);
}

.lbdwcd-empty[hidden] {
    display: none;
}

/* ---------------------------------------------------------------------
 * Footer: totals, buttons and payment logos
 * ------------------------------------------------------------------ */
.lbdwcd-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px 22px;
    border-top: 1px solid var(--lbdwcd-line);
    flex: 0 0 auto;
    background: #ffffff;
}

.lbdwcd-summary {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 14px 0 12px;
    margin: 0 0 2px;
    border-top: 1px dashed rgba(17, 17, 17, 0.16);
}

.lbdwcd-summary[hidden] {
    display: none;
}

.lbdwcd-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.lbdwcd-row-label {
    font-size: 13.5px;
    color: var(--lbdwcd-muted);
}

.lbdwcd-row-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--lbdwcd-text);
    font-variant-numeric: tabular-nums;
}

.lbdwcd-row.is-total {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--lbdwcd-line);
}

.lbdwcd-row.is-total .lbdwcd-row-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--lbdwcd-text);
}

.lbdwcd-row.is-total .lbdwcd-row-value {
    font-size: 20px;
    font-weight: 800;
}

.lbdwcd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.22s ease, color 0.22s ease,
        border-color 0.22s ease, transform 0.22s ease;
}

.lbdwcd-btn:hover {
    transform: translateY(-1px);
}

.lbdwcd-btn:active {
    transform: translateY(0);
}

.lbdwcd-btn-view {
    background: transparent;
    border-color: rgba(17, 17, 17, 0.18);
    color: var(--lbdwcd-text);
}

.lbdwcd-btn-view:hover {
    background: rgba(17, 17, 17, 0.05);
}

.lbdwcd-btn-checkout {
    background: var(--lbdwcd-accent);
    color: #ffffff;
}

.lbdwcd-btn-checkout:hover {
    filter: brightness(0.94);
}

.lbdwcd-btn-continue {
    background: transparent;
    border-color: rgba(17, 17, 17, 0.18);
    color: var(--lbdwcd-text);
}

.lbdwcd-btn-continue:hover {
    background: rgba(17, 17, 17, 0.05);
}

.lbdwcd-btn-extra {
    background: rgba(176, 138, 86, 0.12);
    color: #8a6a3f;
}

.lbdwcd-btn-extra:hover {
    background: rgba(176, 138, 86, 0.2);
}

/* Payment logos below the checkout button. */
.lbdwcd-payments {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.lbdwcd-payment-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.lbdwcd-payments img {
    display: block;
    height: 30px;
    width: auto;
    max-width: 74px;
    object-fit: contain;
}

/* ---------------------------------------------------------------------
 * Body scroll lock while the drawer is open
 * ------------------------------------------------------------------ */
body.lbdwcd-lock {
    overflow: hidden !important;
    padding-right: var(--lbdwcd-sbw, 0px);
}

/* ---------------------------------------------------------------------
 * Elementor editor
 * ------------------------------------------------------------------
 * The editor behaves exactly like the live site: the floating button is fixed
 * over the whole canvas and the drawer slides in from the edge. The panel is
 * never rendered inside the widget column (it would be squeezed there).
 *
 * Because the whole widget is fixed/off-canvas it has NO in-flow content, so
 * Elementor would otherwise reserve a big empty box for it ("Drag widget
 * here"). Collapse the wrapper to zero and show only a tiny, selectable badge.
 */

/* Collapse the widget's Elementor wrapper so it never takes layout space. */
.elementor-editor-active .elementor-element.elementor-widget-bodeteka_woo_cart_drawer,
.elementor-editor-active .elementor-element.elementor-widget-bodeteka_woo_cart_drawer > .elementor-widget-container {
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Compact editor-only placeholder: just enough to be able to select the
   widget. It disappears completely on the live site (it is not rendered). */
.lbdwcd-editor-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px dashed rgba(17, 17, 17, 0.35);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.85);
    color: #171717;
    font-family: sans-serif;
    font-size: 11px;
    line-height: 1.3;
    pointer-events: none;
    user-select: none;
}

/* "Icon + drawer open" preview: the panel is visible from the start. */
.lbdwcd-root.is-editor-open .lbdwcd-panel {
    opacity: 1 !important;
    visibility: visible !important;
}

/* In the editor the page must not be dimmed by the overlay. */
.lbdwcd-root[data-lbdwcd-editor="1"] .lbdwcd-overlay {
    display: none;
}
/* ---------------------------------------------------------------------
 * Motion preferences
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .lbdwcd-panel,
    .lbdwcd-overlay,
    .lbdwcd-fab,
    .lbdwcd-close,
    .lbdwcd-btn,
    .lbdwcd-qty-btn,
    .lbdwcd-remove,
    .lbdwcd-freeship-fill {
        transition: none !important;
        animation: none !important;
    }

    .lbdwcd-btn:hover {
        transform: none;
    }
}

/* ---------------------------------------------------------------------
 * Small screens
 * ------------------------------------------------------------------ */
@media (max-width: 480px) {
    .lbdwcd-panel {
        width: 100%;
    }

    /* On phones the panel covers almost the whole screen, so instead of a
       transform (which would push the button off-screen) move the button to
       the opposite edge: to the LEFT when the panel comes from the right, and
       to the RIGHT when the panel comes from the left. It stays visible and
       clickable in the small strip beside the panel. */
    .lbdwcd-root.lbdwcd-side-right.is-open .lbdwcd-fab,
    .lbdwcd-root.lbdwcd-side-right.is-open .lbdwcd-fab.is-bottom-right,
    .lbdwcd-root.lbdwcd-side-right.is-open .lbdwcd-fab.is-top-right {
        left: 20px !important;
        right: auto !important;
        transform: none !important;
    }

    .lbdwcd-root.lbdwcd-side-left.is-open .lbdwcd-fab,
    .lbdwcd-root.lbdwcd-side-left.is-open .lbdwcd-fab.is-bottom-left,
    .lbdwcd-root.lbdwcd-side-left.is-open .lbdwcd-fab.is-top-left {
        right: 20px !important;
        left: auto !important;
        transform: none !important;
    }

    .lbdwcd-head,
    .lbdwcd-items,
    .lbdwcd-foot,
    .lbdwcd-delivery,
    .lbdwcd-freeship {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* =====================================================================
 * INLINE MODE — button exactly where the widget is placed
 * ===================================================================
 * In inline mode the widget does NOT create a full-screen fixed layer.
 * The root becomes a small in-flow box (just the button), so the cart icon
 * appears exactly where the widget was dropped (e.g. inside the header).
 * Only the overlay and the off-canvas drawer stay fixed to the viewport.
 */

/* The root becomes a compact, in-flow box that hugs the button. */
.lbdwcd-root.lbdwcd-inline {
    position: relative;
    inset: auto;
    display: inline-block;
    vertical-align: middle;
    width: auto;
    height: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    z-index: auto;
    visibility: visible;
    pointer-events: auto;
    overflow: visible;
    background: transparent;
}

/* The button flows inside the root: no fixed position, no offsets, no
   panel-follow transform. High specificity + !important beats both the
   floating rules and the small-screen rules above. */
.lbdwcd-root.lbdwcd-inline .lbdwcd-fab,
.lbdwcd-root.lbdwcd-inline.is-open .lbdwcd-fab,
.lbdwcd-root.lbdwcd-inline.lbdwcd-side-right.is-open .lbdwcd-fab,
.lbdwcd-root.lbdwcd-inline.lbdwcd-side-left.is-open .lbdwcd-fab {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0;
    vertical-align: middle;
    z-index: auto;
}

/* The overlay and the drawer stay fixed to the viewport, independent of the
   small in-flow root. They get their own stacking context here. */
.lbdwcd-root.lbdwcd-inline .lbdwcd-overlay {
    position: fixed;
    z-index: 999998;
    pointer-events: none;
}

.lbdwcd-root.lbdwcd-inline.is-open .lbdwcd-overlay {
    pointer-events: auto;
}

.lbdwcd-root.lbdwcd-inline .lbdwcd-panel {
    position: fixed;
    z-index: 999999;
}

/* The editor must show the real icon at the widget's position as well. */
.lbdwcd-root.lbdwcd-inline[data-lbdwcd-editor="1"],
.lbdwcd-root.lbdwcd-inline[data-lbdwcd-editor="1"] .lbdwcd-fab {
    visibility: visible !important;
}

/* =====================================================================
 * Escape hatch for transformed ancestors (open state only)
 * ===================================================================
 * A transform / filter / perspective / will-change / contain on any
 * ancestor turns that ancestor into the containing block for
 * position:fixed descendants — the drawer panel and overlay would then
 * be trapped inside it (a transformed sticky header, for example: the
 * drawer would open as a strip inside the header instead of over the
 * page). While the drawer is open the JavaScript marks every ancestor
 * up to <body> with .lbdwcd-fx-off and this rule neutralises exactly
 * the properties that create that containing block. Transitions and
 * animations are cut as well so the computed value flips immediately
 * (an animating transform still creates the containing block). The
 * theme gets everything back the moment the drawer closes.
 */
.lbdwcd-fx-off {
    transform: none !important;
    translate: none !important;
    rotate: none !important;
    scale: none !important;
    perspective: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    will-change: auto !important;
    contain: none !important;
    transition: none !important;
    animation: none !important;
}
