div.faqForm.popup {
	position: fixed;
    top: calc(50% - 210px);
    left: calc(50% - 240px);
    z-index: 100;
    width: 480px;
    height: 420px;
    background: #fff;
    border-radius: 4px;
}
div.faqForm.popup:before {
    content: "";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    background: rgba(0,0,0,0.9);
    width: 100%;
    height: 100vh;
}
div.faqForm.popup .header {
    position: fixed;
    top: calc(50vh - 255px);
    z-index: 100;
    width: 100%;
    max-width: 500px;
    height: 48px;
    margin: 0;
    padding: 0;
    background: #465798;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    color: #fff;
}
div.faqForm.popup .header h3 {
    display: inline-block;
    width: fit-content;
    margin: 0;
    padding: 14px 0 12px 20px;
    font-size: 17px;
    font-weight: normal;
}
a.closeDialog {
    float: right;
    display: inline-block;
    width: 25px;
    height: 25px;
    margin: 12px;
    background-image: url('https://realty2c.ru/img/close-white.svg');
    background-size: 25px;
    background-repeat: no-repeat;
    background-position: center center;
}
input#searchInFAQ {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 50px 0 20px;
    border: 1px solid #f2f2f2;
    background-color: #f2f2f2;
    font-size: 16px;
    background-image: url('https://realty2c.ru/img/search-gray.png');
    background-size: 22px 22px;
    background-position: 98% 14px;
    background-repeat: no-repeat;
}
div.popup .dialog {
    display: block;
    width: 100%;
    height: 300px;
    border: none;
}
div.dialog {
    position: fixed;
    z-index: 100;
    max-width: 500px;
    background: #fff;
}
ul#quickSearchResults {
    display: block;
    width: calc(100% - 40px);
    height: 255px;
    margin: 0;
    padding: 15px 20px 30px 20px;
    background: #fff;
    list-style: none;
    overflow-x: hidden;
    overflow-y: scroll;
}
ul#quickSearchResults::-webkit-scrollbar {
    width: 4px;
}
ul#quickSearchResults::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,0.3); 
}
ul#quickSearchResults::-webkit-scrollbar-thumb {
    -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,0.5); 
}
ul#quickSearchResults li {
    padding-bottom: 10px;
}
ul#quickSearchResults li a {
    font-size: 15px;
    font-weight: normal;
    line-height: 1.45em;
    color: #111;
    text-decoration: none;
}
ul#quickSearchResults li a:hover,ul#quickSearchResults li a:target {
    color:#465798;
}
div.faqForm.popup .buttons {
    position: fixed;
    top: calc(50vh + 135px);
    z-index: 10;
    width: 100%;
    max-width: 480px;
    height: 62px;
    margin-top: 3px;
    padding: 20px 0 0 20px;
    border: none;
    border-top: 1px solid #dadada;
    background-color: #fff;
    border-radius: 0 0 4px 4px;
}
a.askQuestion {
    display: inline-block;
    width: 140px;
    padding: 8px 12px;
    border: 1px solid #4f733c;
    background: linear-gradient(to top, #5d8c44 0, #7eb760 100%);
    border-radius: 3px;
    font-size: 15px;
    text-align: center;
    color: #fff;
    text-decoration: none;
}
a.allQuestions {
    display: inline-block;
    margin-left: 20px;
    padding: 7px 12px;
    border: 1px solid #b6b6b6;
    background-color: #eeeeee;
    border-radius: 4px;
    background: #eeeeee;
    background: -moz-linear-gradient(top, #eeeeee 0%, #dddddd 100%);
    background: -webkit-linear-gradient(top, #eeeeee 0%,#dddddd 100%);
    background: linear-gradient(to bottom, #eeeeee 0%,#dddddd 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#dddddd',GradientType=0 );
    color: #666;
    text-align: center;
    text-decoration: none;
}
a.askQuestion:hover,a.askQuestion:target,
a.allQuestions:hover,a.allQuestions:target {
    background:green;
    border:1px solid green;
    color:#fff;
    text-decoration: none;    
}
.hiddenPopup {
    display:none;
}

@media (max-width:510px) {
	div.faqForm.popup {
		position: fixed;
		top: 60px;
		left: 20px;
		right: 20px;
		z-index: 100;
		width: calc(100% - 40px);
		height: 420px;
		background: #fff;
		border-radius: 4px;
	}	
    div.faqForm.popup .header {
        position: fixed;
        top: 20px;
        z-index: 100;
        width: calc(100% - 40px);
        max-width: 500px;
        height: 55px;
        margin: 0;
        padding: 0;
        background: #465798;
        border-radius: 4px 4px 0 0;
        overflow: hidden;
        color: #fff;
    }
	div.faqForm.popup .header h3 span.hidden {
		display:none;
	}
	div.popup .dialog {
        position: fixed;
        top: 70px;
        display: block;
        width: calc(100% - 40px);
        height: 300px;
        border: none;
	}
    div.faqForm.popup .buttons {
        position: fixed;
        top: auto;
        bottom: 111px;
        z-index: 10;
        width: calc(100% - 80px);
        max-width: calc(100% - 80px);
        height: 45px;
        margin-top: 3px;
        padding: 15px 20px;
        border: none;
        border-top: 1px solid #dadada;
        background-color: #fff;
        border-radius: 0 0 4px 4px;
    }
	ul#quickSearchResults {
        display: block;
        width: calc(100% - 40px);
        height: calc(100vh - 350px);
        margin: 0;
        padding: 15px 20px 30px 20px;
        list-style: none;
        overflow-x: hidden;
        overflow-y: scroll;
        background: #fff;
        border-bottom: 1px solid #ddd;
	}
	ul#quickSearchResults li {
		padding-bottom: 12px;
	}
	a.allQuestions span.hidden {
		display: none;
	}
}