/* === АДАПТИВНЫЙ ПОПАП БЕЗ СКРОЛЛИНГА === */

.modern-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    backdrop-filter: blur(5px);
    padding: 20px;
    box-sizing: border-box;
}

.modern-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    border-radius: 20px;
    padding: 25px;
    max-width: 480px;
    width: 100%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(51, 128, 141, 0.1);
    
    /* УБИРАЕМ СКРОЛЛ И ОГРАНИЧЕНИЯ ПО ВЫСОТЕ */
    max-height: none !important;
    overflow: visible !important;
    height: auto;
    
    /* Убираем margin и делаем адаптивным */
    margin: 0;
    box-sizing: border-box;
}

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

/* === КОМПАКТНЫЙ HEADER === */
.modern-popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.modern-popup-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.2;
}

.modern-popup-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* === КОМПАКТНАЯ ФОРМА === */
.modern-popup-form {
    margin-bottom: 15px;
}

.modern-form-group {
    margin-bottom: 15px;
}

.modern-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.modern-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.modern-form-input:focus {
    border-color: #33808d;
    box-shadow: 0 0 0 2px rgba(51, 128, 141, 0.1);
}

/* === КОМПАКТНЫЕ ГАЛОЧКИ === */
.checkbox-group {
    margin-bottom: 12px;
    position: relative;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
    color: #555;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 1px;
    flex-shrink: 0;
}

.checkbox-group a {
    color: #33808d;
    text-decoration: underline;
}

/* === КОМПАКТНАЯ КНОПКА === */
.modern-form-button {
    width: 100%;
    background: linear-gradient(135deg, #33808d 0%, #29747f 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    text-align: center;
    box-sizing: border-box;
    margin-top: 20px;
}

.modern-form-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(51, 128, 141, 0.3);
}

/* === КОМПАКТНЫЕ БОНУСЫ === */
.modern-popup-benefits {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.modern-benefits-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

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

.modern-benefits-item {
    display: flex;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.modern-benefits-item::before {
    content: "✓";
    color: #33808d;
    font-weight: bold;
    margin-right: 8px;
    background: rgba(51, 128, 141, 0.1);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

/* === КНОПКА ЗАКРЫТИЯ === */
.modern-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.modern-popup-close:hover {
    background: rgba(216, 46, 77, 0.1);
    color: #d82e4d;
    transform: rotate(90deg);
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    .modern-popup-overlay {
        padding: 15px;
    }
    
    .modern-popup-content {
        max-width: none;
        width: 100%;
        padding: 20px;
        border-radius: 15px;
    }
    
    .modern-popup-title {
        font-size: 20px;
    }
    
    .modern-popup-subtitle {
        font-size: 13px;
    }
    
    .modern-form-button {
        font-size: 15px;
        padding: 12px 18px;
    }
}

@media (max-width: 480px) {
    .modern-popup-overlay {
        padding: 10px;
    }
    
    .modern-popup-content {
        padding: 18px;
        border-radius: 12px;
    }
    
    .modern-popup-title {
        font-size: 18px;
    }
    
    .modern-form-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .modern-form-button {
        font-size: 14px;
        padding: 11px 16px;
    }
    
    .checkbox-group label {
        font-size: 12px;
    }
}

@media (max-height: 700px) {
    .modern-popup-content {
        padding: 20px;
    }
    
    .modern-popup-header {
        margin-bottom: 15px;
    }
    
    .modern-popup-benefits {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .modern-benefits-item {
        padding: 3px 0;
    }
}

/* === СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ КОМПОЗИЦИИ === */
#compositionPopup .modern-form-button {
    background: linear-gradient(135deg, #d82e4d 0%, #c71e42 100%);
}

#compositionPopup .modern-form-button:hover {
    box-shadow: 0 6px 20px rgba(216, 46, 77, 0.3);
}

#compositionPopup .checkbox-group a {
    color: #d82e4d;
}

#compositionPopup .modern-benefits-item::before {
    color: #d82e4d;
    background: rgba(216, 46, 77, 0.1);
}
