@charset "UTF-8";
/* Стили для плашки баллов на странице товара */
.bonus-badge {
    display: block;
    width: fit-content;
    margin-top: 15px;
    padding: 5px 20px;
    background: #dbefdf;
    color: #2e9743;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: opacity 0.3s ease;
}

.bonus-badge:hover {
    opacity: 0.85;
}

/* Стили для баллов в каталоге */
.catalog-bonus-badge {
    display: block;
    width: fit-content;
    margin: 8px 0 0;
    padding: 4px 12px;
    background: #dbefdf;
    color: #2e9743;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.catalog-bonus-badge:hover {
    opacity: 0.85;
}

/* Стили для popup */
.bonus-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

.bonus-popup-overlay.active {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bonus-popup-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
    pointer-events: none;
}

.bonus-popup {
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px 24px 24px 24px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideUpMobile 0.3s ease;
    position: relative;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.bonus-popup-overlay.closing .bonus-popup {
    animation: slideDownMobile 0.3s ease;
}

.bonus-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #999;
    padding: 0;
}

.bonus-popup-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    margin-top: 0;
    color: #000;
    padding-right: 30px;
}

.bonus-popup-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.bonus-levels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.bonus-level {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: 16px;
    background: #F6F9FC;
    transition: all 0.2s ease;
}

.bonus-level-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bonus-level-right {
    text-align: right;
}

.bonus-level-icon {
    width: 10px;
    height: 10px;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
}

.bonus-level-name {
    font-size: 18px;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.bonus-level-percent {
    font-size: 16px;
    font-weight: 500;
}

.bonus-level-amount {
    font-size: 20px;
    font-weight: 700;
}

.bonus-level-requirement {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
}

.bonus-levels-info {
    display: none;
}

.bonus-table {
    display: none;
}

.bonus-join-button {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 16px 32px;
    background: #000;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.bonus-join-button:hover {
    background: #222;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUpMobile {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDownMobile {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

/* Десктоп версия */
@media (min-width: 769px) {
    .bonus-popup-overlay.active {
        align-items: center;
    }

    .bonus-popup {
        border-radius: 20px;
        max-width: 600px;
        width: 90%;
        animation: slideUp 0.3s ease;
        padding: 24px;
    }

    .bonus-levels {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        margin-bottom: 16px;
        justify-content: space-between;
    }

    .bonus-level {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        text-align: center;
        border-radius: 12px;
        padding: 16px 8px;
    }

    .bonus-level-left {
        align-items: center;
        width: 100%;
    }

    .bonus-level-right {
        text-align: center;
        margin-top: 8px;
    }

    .bonus-level-name {
        font-size: 16px;
        justify-content: center;
    }

    .bonus-level-icon {
        width: 12px;
        height: 12px;
        margin-right: 6px;
    }

    .bonus-level-percent {
        display: none;
    }

    .bonus-level-amount {
        font-size: 22px;
        font-weight: 700;
        margin-top: 12px;
    }

    .bonus-level-requirement {
        display: none;
    }

    .bonus-levels-info {
        display: block;
        background: #f6f9fc;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 20px;
        font-size: 13px;
        line-height: 1.6;
        color: #666;
    }

    .bonus-levels-info-row {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
    }

    .bonus-levels-info-row:last-child {
        margin-bottom: 0;
    }

    .bonus-levels-info-label {
        font-weight: 600;
        color: #000;
        margin-right: 8px;
        min-width: 80px;
    }

    .bonus-popup-title {
        font-size: 24px;
    }

    .bonus-popup-subtitle {
        font-size: 14px;
    }

    .bonus-join-button {
        background: #000;
    }

    .bonus-join-button:hover {
        background: #222;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .bonus-badge {
        display: block;
        width: fit-content;
        margin-top: 10px;
        padding: 5px 20px;
        font-size: 13px;
    }

    .bonus-popup {
        padding: 20px 20px 30px 20px;
    }

    .catalog-bonus-badge {
        font-size: 12px;
        padding: 3px 10px;
    }
}
