/**
 * Leo Theme Adaptation for AbsFrequentlyBoughtTogether Module
 * Custom CSS to match Leo theme style
 */

/* Import Gabarito font to match Leo theme */
@import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@300;400;500;600;700&display=swap');

/* Override module styles to match Leo theme */
#abs_usually_bought_together {
    font-family: 'Gabarito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #033D50;
    font-size: 14px;
    line-height: 1.5;
    padding: 5px 0;
}

/* Title styling to match Leo theme */
h3.abs_usually_bought_together {
    font-family: 'Gabarito', sans-serif;
    color: #222222;
    font-weight: 600;
    font-size: 22px;
    line-height: 1.2;
    padding: 0;
    margin: 25px 0 15px;
    position: relative;
}

/* Main container styling */
.block_abs_usually_bought {
    margin-top: 20px;
    margin-bottom: 20px;
    background-color: #fff;
    overflow: auto;
    padding: 20px 0 15px 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Product list styling */
ul.products_abs_u_b_together,
ul.list_products_abs_u_b_together {
    display: block;
    margin-left: 0;
    float: left;
    margin: 0 25px 0 0;
    padding: 20px;
    margin-bottom: 20px;
    padding-top: 0;
}

ul.list_products_abs_u_b_together {
    margin-left: 18px;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Product items styling */
ul.products_abs_u_b_together li {
    display: inline-block;
    margin: 0 10px 0 0;
    list-style: none;
    word-wrap: break-word;
    vertical-align: middle;
}

ul.list_products_abs_u_b_together li {
    display: block;
    list-style: none;
    word-wrap: break-word;
    vertical-align: top;
    text-align: left;
    font-family: 'Gabarito', sans-serif;
}

/* Plus sign styling */
ul.products_abs_u_b_together li .abs_u_b_t_plus {
    text-rendering: optimizeLegibility;
    font-size: 24px !important;
    line-height: 32px !important;
    color: #FF1C6A;
    font-weight: 600;
}

/* Price styling to match Leo theme */
ul.products_abs_u_b_together li .price-abs-u-b-tog,
ul.list_products_abs_u_b_together li .price-abs-u-b-tog {
    display: inline-block;
    margin-left: 5px !important;
    font-family: 'Gabarito', sans-serif;
    font-weight: 600;
}

ul.list_products_abs_u_b_together li .price-abs-u-b-tog.abs-old-price {
    font-size: 13px;
    text-decoration: line-through;
    color: #999;
}

ul.products_abs_u_b_together li .price-abs-u-b-tog.abs-currency,
ul.list_products_abs_u_b_together li .price-abs-u-b-tog.abs-currency {
    display: inline-block;
    color: #FF1C6A !important;
    margin: 0;
    font-weight: 700;
}

/* Checkbox styling */
ul.list_products_abs_u_b_together li input[type="checkbox"] {
    height: 18px;
    width: 18px;
    vertical-align: top;
    position: relative;
    bottom: -2px;
    margin-right: 8px;
    cursor: pointer;
    margin-top: 0;
    accent-color: #FF1C6A;
}

ul.list_products_abs_u_b_together li input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Label styling */
ul.list_products_abs_u_b_together li label {
    position: relative;
    font-weight: 500;
    color: #033D50;
    padding-left: 15px;
    text-indent: -15px;
    margin-left: 3px;
    top: -2px;
    padding-bottom: 0;
    margin-bottom: 8px;
    font-family: 'Gabarito', sans-serif;
}

ul.list_products_abs_u_b_together li .txt-abs-u-b {
    font-weight: 500;
    color: #033D50;
    text-indent: -15px;
    font-family: 'Gabarito', sans-serif;
}

ul.list_products_abs_u_b_together li .txt-abs-u-b a,
.abs-size-mini a {
    color: #FF1C6A;
    text-decoration: none;
    font-weight: 500;
}

ul.list_products_abs_u_b_together li .txt-abs-u-b a:hover,
.abs-size-mini a:hover {
    color: #F02801 !important;
    text-decoration: underline;
}

/* Button styling to match Leo theme */
.bt-abs-fbt-modal {
    background: #222;
    background: linear-gradient(to bottom, #333, #222);
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-block;
    padding: 0;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bt-abs-fbt-modal.abs-fbt-bt2 {
    background: #FF1C6A;
    background: linear-gradient(to bottom, #FF1C6A, #F02801);
    color: #fff;
    border: none;
}

.bt-abs-fbt-modal button {
    height: 40px;
    color: #fff;
    background-color: transparent;
    border: 0;
    font-size: 14px;
    font-weight: 600;
    padding: 0 20px;
    text-align: center;
    cursor: pointer;
    font-family: 'Gabarito', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bt-abs-fbt-modal:hover {
    background: #FF1C6A;
    background: linear-gradient(to bottom, #FF1C6A, #F02801);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 28, 106, 0.3);
}

.bt-abs-fbt-modal.abs-fbt-bt2:hover {
    background: #F02801;
    background: linear-gradient(to bottom, #F02801, #D4001A);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(240, 40, 1, 0.3);
}

/* Error message styling */
.abs-freq-b-t-error {
    font-size: 13px;
    color: #d00000;
    font-family: 'Gabarito', sans-serif;
    font-weight: 500;
}

.abs-freq-b-t-error i {
    position: relative;
    top: 5px;
}

/* Discount badge styling */
.abs-has-discount {
    width: fit-content;
    min-width: 50px;
    padding: 4px 8px;
    margin-left: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    pointer-events: auto;
    background-color: #f39d72;
    border-radius: 4px;
    font-family: 'Gabarito', sans-serif;
}

/* Product image styling */
.block_abs_usually_bought li[class^='absimgfbt'] .img {
    max-width: 130px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Text styling */
.block_abs_usually_bought .txt-abs-s-b,
.block_abs_usually_bought [id^='abs-min-quantity-txt'] {
    font-size: 12px !important;
    color: #565959 !important;
    padding-left: 5px;
    font-family: 'Gabarito', sans-serif;
}

.block_abs_usually_bought [id^='abs-min-quantity-txt'] {
    font-weight: 700;
}

/* Details section styling */
.block_abs_usually_bought .abs-f-b-t-details {
    display: none;
    margin-top: 8px;
    clear: both;
}

.block_abs_usually_bought .abs-f-b-t-details span {
    display: inline-block;
    padding-right: 5px;
    width: auto;
    font-size: 12px;
    padding-bottom: 5px;
    font-family: 'Gabarito', sans-serif;
}

/* Stock status styling */
.abs_freq_stock {
    clear: both;
}

.abs_freq_stock span {
    display: block !important;
    font-size: 14px !important;
    font-family: 'Gabarito', sans-serif;
    font-weight: 500;
}

.abs_sred {
    color: #d00000;
}

.abs_sgreen {
    color: #008a00;
}

/* Responsive design for mobile */
@media (max-width: 576px) {
    h3.abs_usually_bought_together {
        margin: 15px 0 0;
        line-height: 1.3;
        font-size: 20px;
    }
    
    .block_abs_usually_bought {
        margin-top: 8px;
        padding: 15px 0 8px;
    }
    
    ul.products_abs_u_b_together,
    ul.list_products_abs_u_b_together {
        margin: 0;
        text-align: center;
        width: 100%;
        padding: 15px;
    }
    
    .block_abs_usually_bought li[class^="absimgfbt"] .img {
        max-width: 80px;
        height: auto;
    }
    
    .bt-abs-fbt-modal button {
        height: 36px;
        font-size: 13px;
        padding: 0 15px;
    }
}

/* Loading and success states */
#addcartabsfbt .fa-spinner {
    display: none;
}

#addcartabsfbt .fa-check {
    display: none;
}

#addcartabsfbt:disabled .fa-spinner {
    display: inline-block;
    margin-right: 5px;
}

#addcartabsfbt.added .fa-check {
    display: inline-block;
    margin-right: 5px;
    color: #008a00;
}

/* Small container adjustments */
.abs-small-fqb-container h3.abs_usually_bought_together {
    margin: 15px 0 0;
    line-height: 1.3;
}

.abs-small-fqb-container .block_abs_usually_bought {
    margin-top: 8px;
    padding: 15px 0 8px;
}

.abs-small-fqb-container ul.products_abs_u_b_together,
.abs-small-fqb-container ul.list_products_abs_u_b_together {
    margin: 0;
    text-align: center;
    width: 100%;
}

.abs-small-fqb-container .block_abs_usually_bought li[class^="absimgfbt"] .img {
    max-width: 80px;
    height: auto;
}

.abs-small-fqb-container .bt-abs-fbt-modal.abs-fbt-bt2 {
    margin-right: 14px;
}
