/* F-Tech Gift Tiers — front widget (elegancki, jasny styl nagllar.com) */

.ngl-gifts,
.ngl-gifts *,
.ngl-gifts *::before,
.ngl-gifts *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ngl-gifts {
    --ngl-accent: #E10600;
    position: relative;
    overflow: hidden;
    margin: 0 0 1.5rem;
    padding: 1.5rem 1.5rem;
    border: 1px solid #ECECEC;
    border-radius: 10px;
    background: #FFFFFF;
    color: #121212;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(18, 18, 18, 0.03), 0 8px 28px rgba(18, 18, 18, 0.05);
}

/* ----- Naglowek: identyczna typografia co PRODUKT / PODSUMOWANIE KOSZYKA ----- */

.ngl-gifts__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ECECEC;
}

.ngl-gifts__title {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.4;
    color: #8C8784;
}

.ngl-gifts__amount {
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.ngl-gifts__amount-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8C8784;
}

.ngl-gifts__amount-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #121212;
    font-variant-numeric: tabular-nums;
}

/* ----- Pasek postępu ----- */

.ngl-gifts__bar {
    position: relative;
    padding: 6px 0 28px;
}

.ngl-gifts__track {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: #F1EEED;
}

.ngl-gifts__fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: 999px;
    background: var(--ngl-accent);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.ngl-gifts__shine {
    display: none;
}

.ngl-gifts__node {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.ngl-gifts__node-diamond {
    display: block;
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    border-radius: 1.5px;
    background: #FFFFFF;
    border: 1.5px solid #D9D4D2;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.ngl-gifts__node.is-unlocked .ngl-gifts__node-diamond {
    background: var(--ngl-accent);
    border-color: var(--ngl-accent);
}

.ngl-gifts__legend {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 16px;
}

.ngl-gifts__legend-item {
    position: absolute;
    transform: translateX(-50%);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.05em;
    white-space: nowrap;
    color: #A6A19E;
    transition: color 0.3s ease;
}

.ngl-gifts__legend-item.is-unlocked {
    color: var(--ngl-accent);
    font-weight: 600;
}

.ngl-gifts__legend-item:last-child {
    transform: translateX(-88%);
}

/* ----- Karty gratisów ----- */

.ngl-gifts__cards {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 14px;
    align-items: start;
}

.ngl-gifts__unlocked {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ngl-gifts__unlocked-kicker {
    margin-bottom: 1px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #A6A19E;
}

.ngl-gifts__unlocked-kicker em {
    font-style: normal;
    color: var(--ngl-accent);
}

.ngl-gifts__card {
    display: none;
    gap: 13px;
    align-items: center;
    padding: 11px 14px;
    border: 1px solid #EFECEB;
    border-radius: 10px;
    background: #FBFAF9;
}

.ngl-gifts__card.is-active {
    display: flex;
}

.ngl-gifts__card-media {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #ECE9E8;
    background: #FFFFFF;
}

.ngl-gifts__card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ngl-gifts__check {
    display: inline-grid;
    place-items: center;
    width: 15px;
    height: 15px;
    margin-right: 4px;
    border-radius: 50%;
    background: var(--ngl-accent);
    color: #FFFFFF;
    vertical-align: -2px;
}

.ngl-gifts__card-title {
    display: flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #121212;
}

.ngl-gifts__card-desc {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.5;
    color: #6F6A68;
}

.ngl-gifts__none {
    padding: 14px 16px;
    border: 1px dashed #DDD8D6;
    border-radius: 10px;
    font-size: 12.5px;
    color: #8C8784;
}

.ngl-gifts__pool {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
}

.ngl-gifts__pool-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ECE9E8;
    background: #FFFFFF;
}

.ngl-gifts__pool-chip {
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px dashed #D9D4D2;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8C8784;
}

/* ----- Następny prezent / max ----- */

.ngl-gifts__next,
.ngl-gifts__max {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 18px;
    border: 1px dashed #DDD8D6;
    border-radius: 10px;
    background: #FFFFFF;
}

.ngl-gifts__next-kicker {
    margin-bottom: 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #A6A19E;
}

.ngl-gifts__next-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ngl-gifts__next-row img {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #ECE9E8;
    background: #FFFFFF;
}

.ngl-gifts__next-copy strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #121212;
}

.ngl-gifts__next-copy p {
    margin-top: 2px;
    font-size: 12px;
    color: #8C8784;
}

.ngl-gifts__next-copy b {
    font-weight: 600;
    color: var(--ngl-accent);
    font-variant-numeric: tabular-nums;
}

.ngl-gifts__max {
    flex-direction: row;
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(225, 6, 0, 0.22);
    background: rgba(225, 6, 0, 0.03);
}

.ngl-gifts__max-crown {
    font-size: 18px;
    line-height: 1;
    color: var(--ngl-accent);
}

.ngl-gifts__max strong {
    font-size: 13px;
    font-weight: 600;
    color: #121212;
}

/* ----- Notka o uwagach ----- */

.ngl-gifts__note {
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(225, 6, 0, 0.16);
    border-radius: 8px;
    background: #FDF7F6;
    font-size: 12px;
    line-height: 1.6;
    color: #8A4B44;
}

.is-hidden {
    display: none !important;
}

/* ----- Konfetti ----- */

.ngl-confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 5;
}

.ngl-confetti span {
    position: absolute;
    top: -14px;
    width: 7px;
    height: 11px;
    border-radius: 2px;
    opacity: 0.9;
    animation: ngl-fall var(--d, 1.1s) ease-in forwards;
}

@keyframes ngl-fall {
    to {
        transform: translateY(380px) rotate(var(--r, 540deg));
        opacity: 0;
    }
}

/* ----- Pigułka GRATIS w klasycznym koszyku ----- */

.ngl-gift-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(225, 6, 0, 0.35);
    background: rgba(225, 6, 0, 0.05);
    color: #E10600 !important;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ngl-gift-qty {
    font-weight: 600;
}

/* ----- RWD (mobile-first tuning; 90% ruchu z telefonów) ----- */

@media (max-width: 720px) {
    /* Padding i odstep identyczne z kartami koszyka na mobile */
    .ngl-gifts {
        padding: 1.25rem 1rem;
        margin-bottom: 0.875rem;
    }

    .ngl-gifts__cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .ngl-gifts__bar {
        padding: 6px 0 30px;
    }

    /* Legenda progów bez nachodzenia na wąskim ekranie */
    .ngl-gifts__legend-item {
        font-size: 9px;
        letter-spacing: 0.02em;
    }

    .ngl-gifts__card {
        padding: 10px 12px;
        gap: 11px;
    }

    .ngl-gifts__card-media {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .ngl-gifts__next,
    .ngl-gifts__max {
        padding: 13px 14px;
    }
}

@media (max-width: 360px) {
    /* Na bardzo wąskich ekranach etykiety kwot pośrednich mogłyby się zlewać:
       zostawiamy tylko diamentowe znaczniki, kwoty czyta legenda paska. */
    .ngl-gifts__legend-item {
        font-size: 8.5px;
    }

    /* Wartosc koszyka zostaje, sama etykieta ustepuje miejsca tytulowi */
    .ngl-gifts__amount-label {
        display: none;
    }
}

/* ----- Dostępność: ograniczony ruch ----- */

@media (prefers-reduced-motion: reduce) {
    .ngl-gifts__fill,
    .ngl-gifts__node-diamond,
    .ngl-gifts__legend-item,
    .ngl-gifts__card {
        transition: none;
        animation: none;
    }

    .ngl-confetti {
        display: none;
    }
}
