/**
 * WESTELECOM Sticky CTA Button (03.12.2025)
 * 4 варіанти для A/B тестування
 * Параметр: ?btn=1,2,3,4
 */

/* ═══════════════════════════════════════════════════════════════
   STICKY BUTTON - Основні стилі
   ═══════════════════════════════════════════════════════════════ */

.sticky-cta {
    position: fixed;
    bottom: 180px;
    right: 20px;
    z-index: 9997;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Кнопка */
.sticky-cta__button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    animation: stickyPulse 4s ease-in-out infinite;
    white-space: nowrap;
    max-width: 320px;
}

.sticky-cta__button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.sticky-cta__button:active {
    transform: translateY(-1px) scale(0.98);
}

/* Іконка в кнопці */
.sticky-cta__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Пульсуюча анімація */
@keyframes stickyPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    }
}

/* ═══════════════════════════════════════════════════════════════
   ВАРІАНТИ КОЛЬОРІВ
   ═══════════════════════════════════════════════════════════════ */

/* Варіант 1: Оранжевий - Безкоштовне підключення */
.sticky-cta__button--orange {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
}

.sticky-cta__button--orange:hover {
    background: linear-gradient(135deg, #FF5500 0%, #FF7700 100%);
}

/* Варіант 2: Зелений - Перевірити адресу */
.sticky-cta__button--green {
    background: linear-gradient(135deg, #00C853 0%, #00E676 100%);
}

.sticky-cta__button--green:hover {
    background: linear-gradient(135deg, #00B848 0%, #00D866 100%);
}

/* Варіант 3: Синій - 1 Гбіт/с */
.sticky-cta__button--blue {
    background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
}

.sticky-cta__button--blue:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #3D9EE8 100%);
}

/* Варіант 4: Червоний - Передзвоніть */
.sticky-cta__button--red {
    background: linear-gradient(135deg, #F44336 0%, #EF5350 100%);
}

.sticky-cta__button--red:hover {
    background: linear-gradient(135deg, #E53935 0%, #E84A4A 100%);
}

/* ═══════════════════════════════════════════════════════════════
   БЕЙДЖ "АКЦІЯ"
   ═══════════════════════════════════════════════════════════════ */

.sticky-cta__badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #E91E63;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ═══════════════════════════════════════════════════════════════
   МІКРО-КОПІРАЙТИНГ ПІД КНОПКОЮ
   ═══════════════════════════════════════════════════════════════ */

.sticky-cta__microcopy {
    font-size: 11px;
    color: #666;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 220px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   POPUP ФОРМА
   ═══════════════════════════════════════════════════════════════ */

.sticky-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sticky-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sticky-popup {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    position: relative;
}

.sticky-popup-overlay.active .sticky-popup {
    transform: translateY(0) scale(1);
}

.sticky-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transition: all 0.2s ease;
}

.sticky-popup__close:hover {
    background: #e0e0e0;
    color: #333;
}

.sticky-popup__title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    padding-right: 40px;
}

.sticky-popup__subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px;
}

.sticky-popup__gift {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.sticky-popup__gift-icon {
    font-size: 28px;
}

.sticky-popup__gift-text {
    font-size: 14px;
    font-weight: 600;
    color: #E65100;
}

/* Форма */
.sticky-popup__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sticky-popup__step {
    display: none;
}

.sticky-popup__step.active {
    display: block;
}

.sticky-popup__input-group {
    position: relative;
}

.sticky-popup__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.sticky-popup__input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background-color: #fff !important;
    color: #1a1a1a !important;
}

.sticky-popup__input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
    background-color: #fff !important;
    color: #1a1a1a !important;
}

.sticky-popup__input::placeholder {
    color: #999 !important;
}

/* Автозаповнення браузера */
.sticky-popup__input:-webkit-autofill,
.sticky-popup__input:-webkit-autofill:hover,
.sticky-popup__input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1a1a1a !important;
    -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
    background-color: #fff !important;
}

.sticky-popup__submit {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sticky-popup__submit:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.sticky-popup__submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Успішне повідомлення */
.sticky-popup__success {
    text-align: center;
    padding: 20px 0;
}

.sticky-popup__success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.sticky-popup__success-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.sticky-popup__success-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   МОБІЛЬНА АДАПТАЦІЯ
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sticky-cta {
        bottom: 160px;
        right: 12px;
    }
    
    .sticky-cta__button {
        padding: 12px 18px;
        font-size: 13px;
        max-width: 280px;
    }
    
    .sticky-cta__icon {
        width: 20px;
        height: 20px;
    }
    
    .sticky-cta__microcopy {
        font-size: 10px;
        padding: 5px 10px;
        max-width: 180px;
    }
    
    .sticky-popup {
        padding: 24px;
        margin: 16px;
    }
    
    .sticky-popup__title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .sticky-cta {
        bottom: 140px;
        right: 10px;
    }
    
    .sticky-cta__button {
        padding: 10px 14px;
        font-size: 12px;
        max-width: 240px;
        gap: 8px;
    }
    
    .sticky-cta__badge {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .sticky-cta__microcopy {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ПРИХОВАННЯ НА БІЗНЕС СТОРІНКАХ (через JS)
   ═══════════════════════════════════════════════════════════════ */

body.page-business .sticky-cta {
    display: none !important;
}

