/* ============================================
   Промо-попап (ПриветFS)
   ============================================ */

.promo-popup {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    pointer-events: none;
}

/* display и pointer-events управляются через JS */
.promo-popup--closing {
    display: block;
    pointer-events: none;
}

.promo-popup--visible {
    display: block;
    pointer-events: auto;
}

/* ---------- Оверлей ---------- */
.promo-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.32s ease;
}

.promo-popup--visible .promo-popup-overlay {
    opacity: 1;
}

.promo-popup--closing .promo-popup-overlay {
    opacity: 0;
    transition: opacity 0.22s ease;
}

/* ---------- Контент — Desktop: по центру, spring-анимация ---------- */
.promo-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.82);
    opacity: 0;
    transition:
        opacity  0.32s ease,
        transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
    max-width: min(420px, 90vw);
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.promo-popup--visible .promo-popup-content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.promo-popup--closing .promo-popup-content {
    opacity: 0;
    transform: translate(-50%, -54%) scale(0.88);
    transition:
        opacity  0.2s ease-in,
        transform 0.2s ease-in;
}

.promo-popup-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ---------- Активный клик ---------- */
.promo-popup--visible .promo-popup-content:active {
    transform: translate(-50%, -50%) scale(0.97);
    transition: transform 0.1s ease;
}

/* ============================================
   Тост "Промокод скопирован"
   ============================================ */

.promo-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
    pointer-events: none;
    z-index: 4000;
    background: #1a1a1a;
    color: #fff;
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.promo-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .promo-toast {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
        font-size: 13px;
        padding: 10px 16px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .promo-popup-content {
        max-width: min(340px, 88vw);
    }
}
