/* ============================================
   Promo Discount Banner — Стили
   Модуль: module_block_main_promo_discount
   ============================================ */

/* Overlay (затемнение фона) */
.promo-discount-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
    padding: 1rem;
}

.promo-discount-overlay.active {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Модальное окно */
.promo-discount-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    overflow: hidden;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(102, 126, 234, 0.3);
    transform: scale(0.7) translateY(40px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.promo-discount-overlay.active .promo-discount-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Кнопка закрытия */
.promo-discount-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background 0.3s, transform 0.3s;
    padding: 0;
}

.promo-discount-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Бейдж скидки */
.promo-discount-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 0.8rem 2rem;
    margin-bottom: 1.2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: promo-pulse 2s ease-in-out infinite;
}

.promo-discount-badge-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1;
}

.promo-discount-badge-value {
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Контент */
.promo-discount-content {
    position: relative;
    z-index: 5;
}

.promo-discount-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.promo-discount-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    max-width: 380px;
    margin-inline: auto;
}

/* ========== Таймер обратного отсчета ========== */
.promo-discount-timer-wrapper {
    margin-bottom: 1.5rem;
}

.promo-discount-timer-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.6rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.promo-discount-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.promo-discount-timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 0.5rem 0.8rem;
    min-width: 56px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.promo-discount-timer-item span {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.promo-discount-timer-item small {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.promo-discount-timer-separator {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    animation: promo-blink 1s step-end infinite;
}

/* ========== Кнопка WhatsApp ========== */
.promo-discount-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    width: 100%;
    max-width: 320px;
}

.promo-discount-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.6);
    background: #22c55e;
    color: #fff;
    text-decoration: none;
}

.promo-discount-whatsapp-btn:active {
    transform: translateY(0);
}

.promo-discount-whatsapp-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ========== Декоративные элементы ========== */
.promo-discount-decoration {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.promo-discount-circle-1 {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.06);
    top: -60px;
    right: -60px;
}

.promo-discount-circle-2 {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.04);
    bottom: -40px;
    left: -40px;
}

.promo-discount-sparkle-1,
.promo-discount-sparkle-2 {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    animation: promo-sparkle 3s ease-in-out infinite;
}

.promo-discount-sparkle-1 {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.promo-discount-sparkle-2 {
    bottom: 25%;
    right: 20%;
    animation-delay: 1.5s;
}

/* ========== Кнопка настроек для админа ========== */
.promo-discount-admin-btn {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    z-index: 9999;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.promo-discount-admin-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.7);
}

.promo-discount-admin-btn svg {
    width: 18px;
    height: 18px;
}

/* ========== Анимации ========== */
@keyframes promo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes promo-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes promo-sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

/* ========== Мобильная адаптация ========== */
@media (max-width: 520px) {
    .promo-discount-modal {
        padding: 2rem 1.2rem 1.5rem;
        border-radius: 20px;
    }

    .promo-discount-badge-value {
        font-size: 2.2rem;
    }

    .promo-discount-title {
        font-size: 1.2rem;
    }

    .promo-discount-description {
        font-size: 0.8rem;
    }

    .promo-discount-timer-item {
        min-width: 48px;
        padding: 0.4rem 0.5rem;
    }

    .promo-discount-timer-item span {
        font-size: 1.2rem;
    }

    .promo-discount-whatsapp-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .promo-discount-admin-btn {
        bottom: 4rem;
        right: 1rem;
        width: 38px;
        height: 38px;
    }
}
