﻿/*
 * ISC License
 *
 * Copyright (c) 2026 idnovate.com
 * idnovate is a Registered Trademark & Property of idnovate.com, innovación y desarrollo SCP
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
 *
 * @author    idnovate
 * @copyright 2026 idnovate.com
 * @license   https://www.isc.org/licenses/ https://opensource.org/licenses/ISC ISC License
 */

 /* Bootstrap compatibility */
.hidden-xs-up {
    display: none!important
}

@media (max-width: 575px) {
    .hidden-xs-down {
        display:none!important
    }
}

@media (min-width: 576px) {
    .hidden-sm-up {
        display:none!important
    }
}

@media (max-width: 767px) {
    .hidden-sm-down {
        display:none!important
    }
}

@media (min-width: 768px) {
    .hidden-md-up {
        display:none!important
    }
}

@media (max-width: 991px) {
    .hidden-md-down {
        display:none!important
    }
}

@media (min-width: 992px) {
    .hidden-lg-up {
        display:none!important
    }
}

@media (max-width: 1199px) {
    .hidden-lg-down {
        display:none!important
    }
}

@media (min-width: 1200px) {
    .hidden-xl-up {
        display:none!important
    }
}

.hidden-xl-down {
    display: none!important
}



.loyalty-block img {
    width: auto !important;
    margin-right: .625rem;
    vertical-align: middle;
    display: inline-block;
    background: transparent;
    box-shadow: none;
}

.alert-loyalty span,
#blockcart-modal .modal-body .divide-right span {
    vertical-align: middle;
    display: inline;
}

.alert.alert-loyalty.alert-warning::before {
    content: none;
}

/* Customer account */

/* Hummingbird theme sets --bs-card-border-width:0 globally; restore borders on the loyalty page */
#module-loyaltyeditpoints-points .card {
    --bs-card-border-width: 1px;
}

.loyalty-block-redeem-btn {
    text-align: center;
    margin-bottom: 2rem;
}

/* Points redemption slider */
.lep-slider-value-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.lep-slider-points,
.lep-slider-voucher {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.lep-slider-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #007bff;
    line-height: 1;
}

.lep-slider-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6c757d;
    margin-top: 0.2rem;
    letter-spacing: 0.05em;
}

.lep-slider-arrow {
    font-size: 1.25rem;
    color: #adb5bd;
}

.lep-slider-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.lep-slider-wrap .custom-range {
    flex: 1;
}

.lep-slider-bound {
    color: #6c757d;
    white-space: nowrap;
    min-width: 1.5rem;
    text-align: center;
}

.lep-slider-submit {
    text-align: center;
}

.lep-range-slider::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #007bff 0%, #007bff var(--lep-fill, 100%), #dee2e6 var(--lep-fill, 100%), #dee2e6 100%) !important;
}

.lep-range-slider::-moz-range-track {
    background-color: #dee2e6;
    height: 0.5rem;
    border-radius: 1rem;
}

.lep-range-slider::-moz-range-progress {
    background-color: #007bff;
    height: 0.5rem;
    border-radius: 1rem 0 0 1rem;
}

/* Compact slider (cart / checkout) */
.lep-compact-alert {
    margin-top: 0.75rem;
}

.lep-compact-title {
    margin-bottom: 0.5rem;
}

.lep-compact-form {
    margin-bottom: 0;
}

.lep-compact-summary {
    text-align: center;
    margin: 1rem;
    color: #495057;
}

.lep-compact-summary .lep-display-points {
    font-weight: 700;
    color: #007bff;
}

.lep-compact-summary .lep-display-voucher {
    color: #007bff;
}

.loyalty-block-redeem-btn .btn {
    white-space: normal;
}

/* Product page */
.loyalty-block-product .alert-loyalty {
    margin-top: .625rem;

}

.loyalty-block-product-free .alert-loyalty {
    background-color: #d9edf7;
    border-color: #bcdff1;
    color: #31708f;
    margin-top: .625rem;
    display: inline-block;
}

.loyalty-block-product-free .alert-loyalty img {
    display: none;
}

/* Product list page */
.loyalty-block-productlist {
    clear: both;
}


.owl-carousel .owl-item .loyalty-block-productlist .alert-loyalty img,
.loyalty-block-productlist .alert-loyalty img {
    width: 20px !important;
    display: inline-block !important;
}


.loyalty-block-shopping-cart-detail .alert-loyalty {
    padding: 0;
    margin: 0;
    background: inherit;
    width: 24px;
    text-align: center;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.loyalty-block-shopping-cart-detail img,
.cart-grid .product-image.media-middle .loyalty-block-shopping-cart-detail img {
    width: 20px;
    min-width: auto;
    margin: 0;
}

/* Shopping cart page */
.loyalty-block-checkout .alert-loyalty {
}

.loyalty-block-checkout .loyalty-block-redeem-btn .btn {
    white-space: normal;
}

.loyalty-block-checkout .loyalty-block-redeem-btn .btn:hover {
    color: white !important;
}

/* Order confirmation page */
.loyalty-block-order-confirmation .alert-loyalty {
}

/* Product added modal */
.loyalty-block-shopping-cart-modal .alert-loyalty {
}

/* Product image */
.loyalty-block-product-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #fff6ca;
    color: #777777;
    border: 1px solid #f8d100;
    padding: .2rem;
    z-index: 1;
}

.loyalty-block-product-image span {
    vertical-align: middle;
}

.loyalty-block-product-image img,
.main-product-details .product-cover .loyalty-block-product-image img {
    margin-right: 0;
    display: inline-block;
}

/* Type column: no line breaks */
#loyaltypoints-list .lep-col-type {
    white-space: nowrap;
}

/* Points / Validity / Expiry date columns: centered */
#loyaltypoints-list td:nth-child(4),
#loyaltypoints-list td:nth-child(5),
#loyaltypoints-list td:nth-child(6),
#loyaltypoints-list th:nth-child(4),
#loyaltypoints-list th:nth-child(5),
#loyaltypoints-list th:nth-child(6) {
    text-align: center;
}

/* ── Status badges ─────────────────────────────────────────────── */
.lep-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.78em;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 0.25rem;
}

/* Points history states */
.lep-badge-state-1 { background: #fff3cd; color: #856404; }
.lep-badge-state-2 { background: #d1e7dd; color: #0a5c36; }
.lep-badge-state-3,
.lep-badge-state-4,
.lep-badge-state-6 { background: #f8d7da; color: #842029; }
.lep-badge-state-5 { background: #cff4fc; color: #055160; }
.lep-badge-state-7 { background: #cff4fc; color: #055160; }

/* Voucher statuses */
.lep-badge-available { background: #d1e7dd; color: #0a5c36; }
.lep-badge-used      { background: #e2e3e5; color: #41464b; }
.lep-badge-expired   { background: #f8d7da; color: #842029; }
