/* =========================================================
   DRIP SHARK - CART REWARDS
   ========================================================= */

.ds-cart-rewards {
    --ds-reward-color: #00a8ff;
    --ds-reward-color-light: #070a0f;
    --ds-reward-border: #173c57;

    width: 100%;
    margin: 20px 0;
    padding: 20px;

    background: var(--ds-reward-color-light);
    border: 1px solid var(--ds-reward-border);
    border-radius: 14px;

    box-sizing: border-box;

    transition:
        background-color .35s ease,
        border-color .35s ease;
}


/* =========================================================
   ZONA CLICKEABLE
   ========================================================= */

.ds-rewards-click-zone {
    cursor: pointer;
    outline: none;
}

.ds-rewards-click-zone:focus-visible {
    outline: 2px solid var(--ds-reward-color);
    outline-offset: 5px;
    border-radius: 8px;
}


/* =========================================================
   MENSAJE
   ========================================================= */

.ds-rewards-message {
    margin-bottom: 14px;

    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;

    color: #ffffff;
}

.ds-rewards-message strong {
    font-weight: 700;
}


/* =========================================================
   BARRA
   ========================================================= */

.ds-rewards-progress {
    width: 100%;
}

.ds-rewards-progress-track {
    position: relative;

    width: 100%;
    height: 12px;

    overflow: visible;

    background: #202630;
    border-radius: 999px;
}

.ds-rewards-progress-fill {
    position: relative;
    width: 0%;
    height: 100%;

    background: linear-gradient(90deg, #006dff, #00c8ff);

    border-radius: 999px;

    transition:
        width .5s ease,
        background-color .35s ease;
}

.ds-rewards-progress-fill::after {
    content: '🦈';
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 2;
    transform: translate(50%, -52%);
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 0 5px rgba(0, 200, 255, .8));
}


/* =========================================================
   INFORMACIÓN
   ========================================================= */

.ds-rewards-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 7px;

    font-size: 12px;
    font-weight: 600;

    color: #a9bad0;
}


/* =========================================================
   HITOS
   ========================================================= */

.ds-rewards-milestones {
    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 8px;

    margin-top: 20px;
}

.ds-reward-milestone {
    position: relative;

    text-align: center;

    opacity: .45;

    transition:
        opacity .3s ease,
        transform .3s ease;
}

.ds-reward-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    margin: 0 auto 5px;

    background: #111823;

    border: 2px solid #445164;
    border-radius: 50%;

    font-size: 16px;

    transition:
        border-color .3s ease,
        background-color .3s ease,
        transform .3s ease;
}

.ds-reward-short-label {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;

    color: #ffffff;
}

.ds-reward-amount {
    margin-top: 2px;

    font-size: 11px;

    color: #9cabc0;
}


/* =========================================================
   HITO ACTUAL
   ========================================================= */

.ds-reward-milestone.is-current {
    opacity: 1;
}

.ds-reward-milestone.is-current
.ds-reward-icon {
    border-color: var(--ds-reward-color);
    transform: scale(1.08);
}


/* =========================================================
   HITO COMPLETADO
   ========================================================= */

.ds-reward-milestone.is-completed {
    opacity: 1;
}

.ds-reward-milestone.is-completed
.ds-reward-icon {
    background: #dcfce7;
    border-color: #22c55e;
}


/* =========================================================
   ETAPAS
   ========================================================= */

.ds-cart-rewards[data-stage="shipping"] { --ds-reward-color: #00a8ff; --ds-reward-color-light: #070a0f; --ds-reward-border: #173c57; }

.ds-cart-rewards[data-stage="discount20"] {
    --ds-reward-color: #00a8ff;
    --ds-reward-color-light: #070a0f;
    --ds-reward-border: #173c57;
}

.ds-cart-rewards[data-stage="discount35"] {
    --ds-reward-color: #00a8ff;
    --ds-reward-color-light: #070a0f;
    --ds-reward-border: #173c57;
}

.ds-cart-rewards[data-stage="discount45"] {
    --ds-reward-color: #00a8ff;
    --ds-reward-color-light: #070a0f;
    --ds-reward-border: #173c57;
}

.ds-cart-rewards[data-stage="gift"] {
    --ds-reward-color: #00a8ff;
    --ds-reward-color-light: #070a0f;
    --ds-reward-border: #173c57;
}

.ds-cart-rewards[data-stage="completed"] {
    --ds-reward-color: #00c8ff;
    --ds-reward-color-light: #070a0f;
    --ds-reward-border: #00a8ff;
}


/* =========================================================
   VER PROMOCIÓN
   ========================================================= */

.ds-rewards-open-info {
    display: block;

    margin: 13px 0 0 auto;
    padding: 0;

    border: 0;
    background: transparent;

    color: #64ccff;

    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;

    cursor: pointer;
}

.ds-rewards-open-info:hover {
    text-decoration: underline;
}


/* =========================================================
   MODAL
   ========================================================= */

body.ds-rewards-modal-open {
    overflow: hidden;
}

.ds-rewards-modal {
    position: fixed;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 999999;
}

.ds-rewards-modal.is-open {
    display: flex;
}

.ds-rewards-modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(17, 24, 39, .58);
}

.ds-rewards-modal-dialog {
    position: relative;
    z-index: 1;

    width: min(100%, 520px);

    padding: 28px;

    background: #ffffff;

    border-radius: 14px;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, .22);

    box-sizing: border-box;
}

.ds-rewards-modal-close {
    position: absolute;

    top: 10px;
    right: 13px;

    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    background: transparent;

    color: #374151;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}

.ds-rewards-modal-title {
    margin: 0 35px 20px 0;

    color: #111827;

    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.ds-rewards-modal-list {
    display: flex;
    flex-direction: column;

    gap: 12px;
}

.ds-rewards-modal-item {
    display: grid;

    grid-template-columns:
        26px auto 14px 1fr;

    gap: 7px;

    align-items: center;

    color: #374151;

    font-size: 14px;
    line-height: 1.4;
}

.ds-rewards-modal-icon {
    font-size: 17px;
}

.ds-rewards-modal-threshold {
    white-space: nowrap;

    color: #111827;

    font-weight: 700;
}

.ds-rewards-modal-separator {
    text-align: center;

    color: #9ca3af;
}

.ds-rewards-modal-benefit strong {
    color: #111827;
}

.ds-rewards-modal-footnote {
    margin: 21px 0 0;

    padding-top: 16px;

    border-top: 1px solid #e5e7eb;

    color: #6b7280;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 600px) {

    .ds-cart-rewards {
        padding: 16px 14px;
    }

    .ds-rewards-message {
        font-size: 14px;
    }

    .ds-rewards-milestones {
        gap: 3px;
    }

    .ds-reward-icon {
        width: 30px;
        height: 30px;

        font-size: 14px;
    }

    .ds-reward-short-label {
        font-size: 9px;
    }

    .ds-reward-amount {
        font-size: 9px;
    }

    .ds-rewards-modal {
        padding: 14px;
    }

    .ds-rewards-modal-dialog {
        padding: 24px 18px;
    }

    .ds-rewards-modal-title {
        font-size: 18px;
    }

    .ds-rewards-modal-item {
        grid-template-columns:
            23px auto 10px 1fr;

        gap: 5px;

        font-size: 12px;
    }
}
