/* MPD Storefront Enhancements — delivery estimate + free-delivery bar.
   Display-only; namespaced .mpd-sf-* to avoid clashing with theme/Woo styles. */

/* --- Estimated delivery (cart/checkout rows reuse Woo table styling) ------ */
.mpd-sf-estimate {
    margin: 12px 0;
    padding: 10px 14px;
    border-left: 4px solid #c8a951;
    background: #f9f9f9;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}
.mpd-sf-estimate__icon { margin-right: 4px; }
.mpd-sf-estimate__value { color: #b8860b; }

tr.mpd-sf-delivery-time th,
tr.mpd-sf-delivery-time td { font-size: 0.95em; }

/* --- Free-delivery progress bar ------------------------------------------- */
.mpd-sf-freeship {
    margin: 0 0 16px;
    padding: 10px 0;
}
.mpd-sf-freeship__msg {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    text-align: center;
}
.mpd-sf-freeship__msg strong { color: #b8860b; }
.mpd-sf-freeship__track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: #e6e6e6;
    overflow: hidden;
}
.mpd-sf-freeship__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #c8a951, #e0c068);
    transition: width 0.35s ease;
}
.mpd-sf-freeship.is-qualified .mpd-sf-freeship__fill {
    background: linear-gradient(90deg, #2e8b57, #43b97f);
}
.mpd-sf-freeship.is-qualified .mpd-sf-freeship__msg { color: #2e8b57; }
.mpd-sf-freeship.is-qualified .mpd-sf-freeship__msg strong { color: #2e8b57; }

/* Tighter spacing inside the mini-cart popup */
.mpd-sf-freeship--minicart { margin-bottom: 10px; }
.mpd-sf-freeship--minicart .mpd-sf-freeship__msg { font-size: 13px; }

/* Builder note variant sits inline with the configurator controls */
.mpd-sf-freeship--builder { margin: 6px 0 14px; }

/* --- Slim site-wide header bar (sticky + dismissible) --------------------- */
.mpd-sf-freeship-header-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000; /* above the theme's own fixed header */
    background: #1f2024;
    padding: 7px 44px 7px 16px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.mpd-sf-freeship-header-wrap.is-dismissed { display: none; }
.mpd-sf-freeship-header-wrap .mpd-sf-freeship {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.mpd-sf-freeship--header .mpd-sf-freeship__msg {
    margin: 0;
    color: #fff;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
}
.mpd-sf-freeship--header .mpd-sf-freeship__msg strong { color: #e0c068; }
.mpd-sf-freeship--header.is-qualified .mpd-sf-freeship__msg { color: #7fdca4; }
.mpd-sf-freeship--header.is-qualified .mpd-sf-freeship__msg strong { color: #7fdca4; }
.mpd-sf-freeship--header .mpd-sf-freeship__track {
    width: 160px;
    height: 6px;
    margin: 0;
    background: rgba(255, 255, 255, 0.18);
    flex: 0 0 auto;
}
.mpd-sf-freeship-header__close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    padding: 0 4px;
    color: #aaa;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.mpd-sf-freeship-header__close:hover { color: #fff; }

@media (max-width: 600px) {
    .mpd-sf-freeship--header .mpd-sf-freeship__msg { white-space: normal; font-size: 12px; }
    .mpd-sf-freeship--header .mpd-sf-freeship__track { width: 90px; }
}
