/* Общий контейнер */
.wpc-popup-overlay {
    position: fixed;
    z-index: 999999;
    box-sizing: border-box;
}

/* 1. Позиция: Центр экрана */
.wpc-popup-overlay.wpc-pos-center {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    bottom: 0 !important; /* Для центра сбрасываем отступ снизу */
}

/* 2. Позиция: Снизу слева */
.wpc-popup-overlay.wpc-pos-bottom-left {
    left: 20px;
}

/* 3. Позиция: Снизу по центру (Новое положение) */
.wpc-popup-overlay.wpc-pos-bottom-center {
    left: 50%;
    transform: translateX(-50%);
}

/* 4. Позиция: Снизу справа */
.wpc-popup-overlay.wpc-pos-bottom-right {
    right: 20px;
}

/* Окно контента */
.wpc-popup-content {
    position: relative;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    animation: wpcFadeIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-sizing: border-box;
}

/* Иконка закрытия (крестик) */
.wpc-popup-close-icon {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 32px;
    cursor: pointer;
    line-height: 0.7;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
    user-select: none;
}
.wpc-popup-close-icon:hover {
    opacity: 0.9;
    transform: scale(1.1);
}

.wpc-popup-body {
    width: 100%;
    box-sizing: border-box;
}

.wpc-popup-body .wpforms-container {
    margin: 0 !important;
    width: 100% !important;
}

/* Нижняя кнопка закрытия */
.wpc-popup-actions {
    margin-top: 15px;
    text-align: right;
}
.wpc-popup-close-btn {
    padding: 8px 16px;
    cursor: pointer;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
}

/* --- АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ --- */
@media (max-width: 768px) {
    .wpc-popup-overlay.wpc-pos-bottom-left,
    .wpc-popup-overlay.wpc-pos-bottom-center,
    .wpc-popup-overlay.wpc-pos-bottom-right {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        width: calc(100% - 20px) !important;
        transform: none !important; /* Убираем центрирование через transform на мобильных */
    }
    
    .wpc-popup-content {
        width: 100% !important;
        padding: 25px 15px 15px 15px !important;
    }

    .wpc-popup-close-icon {
        top: 10px;
        right: 10px;
        font-size: 36px;
    }
}

/* Анимация плавного всплытия */
@keyframes wpcFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}