/**
 * Frontend styly pro Bobanek - Free Delivery
 */

.bobanek-free-delivery-box {
    background-color: var(--bfd-box-bg, #fff8f9);
    border: 2px solid var(--bfd-box-border, #fe4172);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0 0 20px 0;
    color: var(--bfd-text, #2b2d42);
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.bobanek-free-delivery-box.bfd-is-reached {
    border-color: var(--bfd-progress-reached, #38a169);
    background-color: #f6fcf8;
}

/* Header a text */
.bobanek-free-delivery-box .bfd-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bobanek-free-delivery-box .bfd-icon-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(254, 65, 114, 0.12);
    color: var(--bfd-box-border, #fe4172);
}

.bobanek-free-delivery-box.bfd-is-reached .bfd-icon-wrap {
    background-color: rgba(56, 161, 105, 0.15);
    color: var(--bfd-progress-reached, #38a169);
}

.bobanek-free-delivery-box .bfd-icon {
    width: 18px;
    height: 18px;
}

.bobanek-free-delivery-box .bfd-text-wrap {
    flex-grow: 1;
}

.bobanek-free-delivery-box .bfd-message {
    font-size: 14px;
    line-height: 1.45;
    display: block;
    color: inherit;
    word-break: normal;
    overflow-wrap: normal;
}

.bobanek-free-delivery-box .bfd-amount-remaining {
    color: var(--bfd-box-border, #fe4172);
    font-weight: 800 !important;
    font-size: 1.12em;
    white-space: nowrap !important;
    display: inline-block;
    vertical-align: baseline;
    letter-spacing: -0.2px;
}

.bobanek-free-delivery-box .bfd-amount-remaining * {
    color: inherit !important;
    font-weight: inherit !important;
    font-size: inherit !important;
    white-space: nowrap !important;
}

.bobanek-free-delivery-box .bfd-amount-threshold,
.bobanek-free-delivery-box .bfd-amount-current {
    font-weight: 700;
    white-space: nowrap !important;
    display: inline-block;
}

.bobanek-free-delivery-box .bfd-amount-threshold *,
.bobanek-free-delivery-box .bfd-amount-current * {
    white-space: nowrap !important;
}

.bobanek-free-delivery-box.bfd-is-reached .bfd-amount-remaining {
    color: var(--bfd-progress-reached, #38a169);
}

/* Ukazatel postupu (Progress bar) */
.bobanek-free-delivery-box .bfd-progress-wrap {
    margin-top: 10px;
}

.bobanek-free-delivery-box .bfd-progress-bar {
    width: 100%;
    height: 9px;
    background-color: var(--bfd-progress-bg, #f1f1f1);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.bobanek-free-delivery-box .bfd-progress-fill {
    height: 100%;
    background-color: var(--bfd-progress-fill, #fe4172);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bobanek-free-delivery-box.bfd-animate-progress .bfd-progress-fill {
    transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.bobanek-free-delivery-box.bfd-is-reached .bfd-progress-fill {
    background-color: var(--bfd-progress-reached, #38a169);
}

/* Umístění uvnitř WooCommerce košíku na pravé straně (.cart_totals) */
.cart-collaterals .cart_totals .bobanek-free-delivery-box {
    margin-bottom: 20px;
}

/* Umístění v pokladně (Checkout) */
.woocommerce-checkout #order_review .bobanek-free-delivery-box {
    width: 100%;
    margin: 0 0 20px 0;
    box-sizing: border-box;
    clear: both;
}

.woocommerce-checkout .bobanek-free-delivery-box.bfd-context-checkout {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}

@media only screen and (min-width: 992px) {
    /* Pokud je box umístěn v pravém sloupci vně #order_review */
    .woocommerce-checkout form.checkout > .bobanek-free-delivery-box.bfd-context-checkout {
        width: 460px;
        float: right;
        clear: right;
        margin-bottom: 20px;
    }
}

/* Mini-košík v postranním panelu / dropdownu */
.ts-tiny-cart-wrapper .bobanek-free-delivery-box,
#ts-shopping-cart-sidebar .bobanek-free-delivery-box,
.cart-dropdown-form .bobanek-free-delivery-box {
    margin: 12px 18px 16px 18px;
    padding: 10px 14px;
    border-radius: 8px;
    border-width: 1.5px;
    box-sizing: border-box;
}

.ts-tiny-cart-wrapper .bobanek-free-delivery-box .bfd-message,
#ts-shopping-cart-sidebar .bobanek-free-delivery-box .bfd-message,
.cart-dropdown-form .bobanek-free-delivery-box .bfd-message {
    font-size: 13px;
    line-height: 1.35;
}

.ts-tiny-cart-wrapper .bobanek-free-delivery-box .bfd-icon-wrap,
#ts-shopping-cart-sidebar .bobanek-free-delivery-box .bfd-icon-wrap,
.cart-dropdown-form .bobanek-free-delivery-box .bfd-icon-wrap {
    width: 26px;
    height: 26px;
}

.ts-tiny-cart-wrapper .bobanek-free-delivery-box .bfd-icon,
#ts-shopping-cart-sidebar .bobanek-free-delivery-box .bfd-icon,
.cart-dropdown-form .bobanek-free-delivery-box .bfd-icon {
    width: 15px;
    height: 15px;
}

.ts-tiny-cart-wrapper .bobanek-free-delivery-box .bfd-progress-wrap,
#ts-shopping-cart-sidebar .bobanek-free-delivery-box .bfd-progress-wrap,
.cart-dropdown-form .bobanek-free-delivery-box .bfd-progress-wrap {
    margin-top: 8px;
}

.ts-tiny-cart-wrapper .bobanek-free-delivery-box .bfd-progress-bar,
#ts-shopping-cart-sidebar .bobanek-free-delivery-box .bfd-progress-bar,
.cart-dropdown-form .bobanek-free-delivery-box .bfd-progress-bar {
    height: 7px;
}

/* Popup okno po přidání zboží do košíku */
#ts-add-to-cart-popup-modal .bobanek-free-delivery-box {
    margin: 12px 0 16px 0;
    padding: 10px 14px;
    border-radius: 8px;
    border-width: 1.5px;
    width: 100%;
    box-sizing: border-box;
}

#ts-add-to-cart-popup-modal .bobanek-free-delivery-box .bfd-message {
    font-size: 13px;
    line-height: 1.35;
}

#ts-add-to-cart-popup-modal .bobanek-free-delivery-box .bfd-icon-wrap {
    width: 26px;
    height: 26px;
}

#ts-add-to-cart-popup-modal .bobanek-free-delivery-box .bfd-icon {
    width: 15px;
    height: 15px;
}

#ts-add-to-cart-popup-modal .bobanek-free-delivery-box .bfd-progress-wrap {
    margin-top: 8px;
}

#ts-add-to-cart-popup-modal .bobanek-free-delivery-box .bfd-progress-bar {
    height: 7px;
}

.bobanek-free-delivery-box .bfd-coupon-note {
    font-size: 0.9em;
    color: #4a5568;
    display: inline;
}

.bobanek-free-delivery-box .bfd-coupon-tag strong {
    color: var(--bfd-box-border, #fe4172);
    font-weight: 700;
}

@media (max-width: 768px) {
    .bobanek-free-delivery-box {
        padding: 12px 14px;
        margin-bottom: 16px;
    }
    .bobanek-free-delivery-box .bfd-message {
        font-size: 13px;
    }
}
