/* Основные стили попапа */
#seo-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    transition: all 0.3s ease;
}

.seo-popup-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.seo-popup-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Оверлей */
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(2px);
}

/* Контент попапа */
.popup-content {
    position: relative;
    background: #ffffff;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Кнопка закрытия */
.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background-color: #f1f1f1;
    color: #333;
}

/* Заголовок */
.popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 30px 25px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.popup-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.popup-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.popup-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Форма */
.popup-form {
    padding: 25px 30px 20px;
}

.seo-form-wrapper .form-row {
    margin-bottom: 15px;
}

.seo-form-wrapper .form-input,
.seo-form-wrapper .form-textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #e1e5e9 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    transition: border-color 0.2s ease !important;
    box-sizing: border-box !important;
}

.seo-form-wrapper .form-input:focus,
.seo-form-wrapper .form-textarea:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.seo-form-wrapper .form-textarea {
    min-height: 80px !important;
    resize: vertical !important;
}

.seo-form-wrapper .submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    /*padding: 16px 30px !important;*/
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.seo-form-wrapper .submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
}

.seo-form-wrapper .submit-btn:active {
    transform: translateY(0) !important;
}

/* Преимущества */
.popup-benefits {
    padding: 0 30px;
    margin-bottom: 20px;
}

.popup-benefits h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.popup-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-benefits li {
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.popup-benefits .checkmark {
    margin-right: 10px;
    flex-shrink: 0;
}

/* Гарантия */
.popup-guarantee {
    background: #f8f9fa;
    padding: 15px 30px 25px;
    text-align: center;
    border-radius: 0 0 12px 12px;
}

.popup-guarantee small {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* Блокировка скролла */
body.popup-open {
    overflow: hidden !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        margin: 1% auto;
        max-height: 95vh;
    }
    
    .popup-header {
        padding: 25px 20px 20px;
    }
    
    .popup-header h3 {
        font-size: 20px;
    }
    
    .popup-header p {
        font-size: 14px;
    }
    
    .popup-form,
    .popup-benefits {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .popup-guarantee {
        padding: 15px 20px 20px;
    }
    
    .popup-icon {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        width: 98%;
    }
    
    .popup-header {
        padding: 20px 15px 15px;
    }
    
    .popup-form,
    .popup-benefits {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .popup-guarantee {
        padding: 12px 15px 15px;
    }
}

/* Анимация загрузки формы */
.seo-form-wrapper .ajax-loader {
    display: inline-block;
    margin-left: 10px;
}

/* Стили для сообщений Contact Form 7 */
#seo-popup .wpcf7-response-output {
    margin-top: 15px !important;
    padding: 12px 16px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    text-align: center !important;
}

#seo-popup .wpcf7-mail-sent-ok {
    background-color: #4caf50 !important;
    color: white !important;
    border: none !important;
}

#seo-popup .wpcf7-validation-errors {
    background-color: #f44336 !important;
    color: white !important;
    border: none !important;
}

#seo-popup .wpcf7-not-valid-tip {
    font-size: 12px !important;
    color: #f44336 !important;
    margin-top: 5px !important;
}
