/*
Theme Name: Silver110 Bakala Child
Description: Silver110 magazine customizations for Bakala.
Template: bakala
Version: 1.0.0
Text Domain: silver110-bakala-child
*/

/*
 * Floating product/cart tab (parent theme: inc/integrations/floating-cart/frontend/css/modern.css)
 * is positioned with LTR coordinates (left:0) and ships no RTL rule, so on this
 * RTL site it sticks to the left edge of the viewport and floats over the page
 * content. Mirror it to the right edge, where the rest of the RTL chrome lives.
 */
body.rtl.bk-fc-modern .ar-smartphone-icon.bk-fc-tab {
    left: auto;
    right: 0;
    padding: 0 4px 0 0;
    border-radius: 18px 0 0 18px;
}

body.rtl.bk-fc-modern .ar-smartphone-icon.bk-fc-tab span.ar-spender {
    right: auto;
    left: 5px;
}

body.rtl.bk-fc-modern.ar-panel-expanded .ar-smartphone-icon.bk-fc-tab {
    transform: translate(110%, -50%);
}

/*
 * Buy card on the single product page: price, warranty, shipping, stock and
 * the buy button in one card at the top of the features column. Colours and
 * spacing follow the approved design: #e7004a accent, 16px radius, dotted
 * separators between the info rows.
 */
.silver110-buy-card {
    --s110-accent: #e7004a;
    --s110-accent-soft: #fdeef3;
    --s110-line: #ececf1;
    --s110-muted: #6b7280;
    background: #fff;
    border: 1px solid var(--s110-line);
    border-radius: 18px;
    padding: 16px 18px 18px;
    margin: 0 0 22px;
    box-shadow: 0 10px 30px -22px rgb(17 20 28 / .45);
}

.silver110-buy-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.silver110-buy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #1f2430;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.8;
}

.silver110-buy-row + .silver110-buy-row {
    border-top: 1px dashed var(--s110-line);
}

.silver110-buy-label {
    color: #1f2430;
}

.silver110-buy-value {
    color: #1f2430;
    font-weight: 700;
}

.silver110-buy-icon {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--s110-accent-soft);
    color: var(--s110-accent);
}

.silver110-buy-icon::before {
    content: "";
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--s110-icon) center / contain no-repeat;
    mask: var(--s110-icon) center / contain no-repeat;
}

.silver110-buy-icon--warranty {
    --s110-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5.5c0 4.2-2.9 7.6-7 8.5-4.1-.9-7-4.3-7-8.5V6l7-3z'/%3E%3Cpath d='m9 11.5 2 2 4-4'/%3E%3C/svg%3E");
}

.silver110-buy-icon--shipping {
    --s110-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h9v8H4z'/%3E%3Cpath d='M13 11h4l3 3v2h-7z'/%3E%3Ccircle cx='7.5' cy='17.5' r='1.4'/%3E%3Ccircle cx='16.5' cy='17.5' r='1.4'/%3E%3C/svg%3E");
}

.silver110-buy-price {
    margin: 14px 0 6px;
    color: #111318;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.4;
    text-align: start;
}

.silver110-buy-price .price,
.silver110-buy-price .woocommerce-Price-amount {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.silver110-buy-price del {
    display: none;
}

.silver110-buy-price .woocommerce-Price-currencySymbol {
    font-size: 13px;
    font-weight: 700;
    opacity: .7;
}

.silver110-buy-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: #1aa06d;
    font-size: 13px;
    font-weight: 800;
}

.silver110-buy-stock-icon {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #e9f8f1;
    color: #1aa06d;
}

.silver110-buy-stock-icon::before {
    content: "";
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7l9-4 9 4-9 4-9-4z'/%3E%3Cpath d='M3 7v10l9 4 9-4V7'/%3E%3Cpath d='M12 11v10'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7l9-4 9 4-9 4-9-4z'/%3E%3Cpath d='M3 7v10l9 4 9-4V7'/%3E%3Cpath d='M12 11v10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.silver110-buy-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 4px 0 0;
}

.silver110-buy-actions .bakala-update-price {
    flex: 0 0 100%;
    order: 0;
}

/*
 * Buy button and gift-credit notice each get their own line: the button (and
 * the quantity stepper, when the product has one) in the first row, the credit
 * notice full width underneath.
 */
.silver110-buy-actions form.cart {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
}

.silver110-buy-actions .add-to-cart-holder {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.silver110-buy-actions .single_quantity {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    flex: none;
}

.silver110-buy-actions form.cart > .bakala-product-cashback-box {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
}

.silver110-buy-actions .add-to-cart-button {
    width: 100%;
    margin: 0;
}

.silver110-buy-actions .single_add_to_cart_button {
    position: relative;
    inset: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    background: var(--s110-accent);
    box-shadow: 0 12px 24px -14px var(--s110-accent);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
}

.silver110-buy-actions .single_add_to_cart_button:hover {
    filter: brightness(1.05);
}

.silver110-buy-actions .single_add_to_cart_button .dk-button-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    font-size: inherit;
}

.silver110-buy-actions .single_add_to_cart_button .dk-button-container {
    flex-direction: row-reverse;
}

.silver110-buy-actions .single_add_to_cart_button .dk-button-container::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.2 10.5a1.5 1.5 0 0 0 1.5 1.2h8.1a1.5 1.5 0 0 0 1.5-1.1L20 8H6.2'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.3'/%3E%3Ccircle cx='16.5' cy='19.5' r='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.2 10.5a1.5 1.5 0 0 0 1.5 1.2h8.1a1.5 1.5 0 0 0 1.5-1.1L20 8H6.2'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.3'/%3E%3Ccircle cx='16.5' cy='19.5' r='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.silver110-buy-actions .single_add_to_cart_button:after {
    content: none;
}

.silver110-buy-actions .quantity {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    width: 106px;
    height: 52px;
    margin: 0;
    padding: 0 6px;
    border: 1px solid var(--s110-line);
    border-radius: 14px;
    background: #fff;
    box-sizing: border-box;
}

/* Single-unit products have no stepper; the buy button takes the full width. */
.silver110-buy-actions .quantity.hidden,
.silver110-buy-actions .single_quantity:has(.quantity.hidden) {
    display: none;
}

.silver110-buy-actions .quantity input.qty {
    width: 34px;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2430;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.silver110-buy-actions .quantity .bakala-minus,
.silver110-buy-actions .quantity .bakala-plus {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #f3f4f7;
    color: #1f2430;
    cursor: pointer;
}

.silver110-buy-actions .bk-qty-solo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 52px;
    color: #1f2430;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
}

.silver110-buy-card .bakala-product-cashback-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--s110-accent-soft);
    color: #7a1035;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.8;
}

.silver110-buy-card .bakala-cashback-icon {
    flex: none;
    color: var(--s110-accent);
}

.silver110-buy-card .bakala-update-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--s110-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.8;
}

.silver110-buy-card .bakala-update-price::before {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #18a05f;
}

.silver110-buy-card .bakala-update-price-date {
    color: #1f2430;
    font-weight: 700;
}

/* The price now lives in the card, so drop the copy left in the summary column. */
.main-content.silver110-has-buy-card .col-md-9 .price-section {
    display: none;
}

/*
 * Product page columns: the summary column goes from 9/3 to 60/39 so the buy
 * card in the features column has room for the price, the info rows and the
 * buy button without wrapping. Scoped to the product row so archive and other
 * .col-md-9/.col-md-3 grids keep their default widths.
 */
@media (min-width: 768px) {
    .single-product .main-content.bakala-style > .col-md-9 {
        flex: 0 0 auto;
        width: 60% !important;
    }

    .single-product .main-content.bakala-style > .col-md-3 {
        flex: 0 0 auto;
        width: 39% !important;
    }
}
