/* Modal Modern Styles - заглушка *//* Модальное окно - современный дизайн */

.modal-modern {

    /* Стили для современных модальных окон *//* Базовые стили для сокрытия модального окна */

}.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1055;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal.show {
    display: block;
}

.modal.fade {
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

.modal.fade.show {
    opacity: 1;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0 auto;
    pointer-events: none;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px 0;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 90vh;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
}

.modal-title-text {
    flex: 1;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.3;
}

.modal-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 6px 0 0 0;
    line-height: 1.4;
    opacity: 0.85;
}

.btn-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: absolute;
    right: 20px;
    top: 20px;
    opacity: 0.7;
}

.btn-close:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    opacity: 1;
    transform: scale(1.05);
}

.modal-body {
    padding: 20px 24px;
    background: white;
    overflow-y: auto;
    max-height: 60vh;
}

/* Специфичные стили для полей формы в модальном окне */
#callbackModal .form-group {
    margin-bottom: 16px !important;
}

#callbackModal .form-label,
#callbackModal label.form-label {
    display: block !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 10px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

#callbackModal .form-input,
#callbackModal input.form-input,
#callbackModal input[type="text"],
#callbackModal input[type="tel"],
#callbackModal textarea.form-input,
#callbackModal textarea {
    width: 100% !important;
    padding: 14px 18px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    color: #1a202c !important;
    background: #fafbfc !important;
    transition: all 0.3s ease !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    box-sizing: border-box !important;
    outline: none !important;
}

#callbackModal .form-input:focus,
#callbackModal input.form-input:focus,
#callbackModal input[type="text"]:focus,
#callbackModal input[type="tel"]:focus,
#callbackModal textarea.form-input:focus,
#callbackModal textarea:focus {
    outline: none !important;
    border-color: #6366f1 !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08) !important;
    transform: translateY(-1px) !important;
}

#callbackModal .form-input::placeholder,
#callbackModal input.form-input::placeholder,
#callbackModal input[type="text"]::placeholder,
#callbackModal input[type="tel"]::placeholder,
#callbackModal textarea.form-input::placeholder,
#callbackModal textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 0.8 !important;
}

#callbackModal .form-textarea,
#callbackModal textarea.form-textarea,
#callbackModal textarea {
    resize: vertical !important;
    min-height: 90px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.form-textarea,
textarea.form-textarea {
    resize: vertical !important;
    min-height: 90px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.privacy-notice {
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border-left: 4px solid #6366f1;
}

.privacy-notice p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.privacy-notice a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

.privacy-notice a:hover {
    text-decoration: underline;
}

.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #f1f5f9;
    background: white;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 12px 28px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 120px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.modal-footer .btn-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.modal-footer .btn-secondary:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Анимация загрузки для кнопки */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Анимация появления модального окна */
.modal.fade .modal-dialog {
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Адаптивность */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0 12px;
        max-width: none;
    }
    
    .modal-dialog-centered {
        padding: 10px 0;
        min-height: 100vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .modal-header {
        padding-top: 24px;
        padding-bottom: 16px;
    }
    
    .modal-header-content {
        gap: 14px;
    }
    
    .modal-icon {
        width: 44px;
        height: 44px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-subtitle {
        font-size: 14px;
    }
    
    .modal-footer {
        flex-direction: column;
        padding-top: 16px;
        padding-bottom: 24px;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .btn-close {
        width: 32px;
        height: 32px;
        right: 16px;
        top: 16px;
    }
}

/* Дополнительные стили для исправления кликабельности */
.modal-footer .btn {
    z-index: 10 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
}

.btn-close {
    z-index: 10 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Исправление для Bootstrap переопределения */
.modal .btn {
    pointer-events: auto !important;
}

.modal button {
    pointer-events: auto !important;
}