.modal P {
    margin: 1em 0;
}
.modal .small {
    font-size: 12px;
}
.modal .head {
    font-size: 24px;
    text-transform: uppercase;
}
.modal .inner {
    margin: 1em 0 0 0;
}
.modal .inner.flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.modal .inner DIV {
    margin-bottom: 15px;
}
.modal .inner DIV.stay {
    width: calc(50% - 10px);
    position: relative;
    line-height: 30px;
    font-size: 14px;
}
.modal .inner DIV.dependent {
    width: 100%;
    position: relative;
}
.modal .inner DIV.short {
    width: calc(50% - 10px);
    position: relative;
}
.modal .inner INPUT[type="text"], .modal .inner INPUT[type="password"], .modal .inner BUTTON {
    width: 100%;
    line-height: 30px;
    height: 30px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid silver;
    padding: 0 5px;
}
.modal .inner TEXTAREA {
    width: 100%;
    line-height: 1.25em;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid silver;
    padding: 5px;
}
.modal .inner blockquote {
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    background-color: #f4f4f4;
    padding: 5px;
    margin: 0 0 3px 0;
    font-size: 13px;
    margin-bottom: 15px;
    display: block;
    position: relative;
}

.modal .inner blockquote A {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 9px;
    height: 9px;
    cursor: pointer;
    background-color: white;
    border: 1px solid gray;
    border-radius: 3px;
    opacity: 0.5;
}
.modal .inner blockquote A:hover {
    opacity: 1;
}
.modal .inner blockquote A:before, .modal .inner blockquote A:after {
    position: absolute;
    left: 4px;
    content: ' ';
    height: 9px;
    width: 1px;
    background-color: #333;
}
.modal .inner blockquote A:before {
    transform: rotate(45deg);
}
.modal .inner blockquote A:after {
    transform: rotate(-45deg);
}




.modal .attach-block {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 10px;
}
.modal .attach-block DIV {
    line-height: 30px;
    font-size: 14px;
    display: block;
    position: relative;
}
.modal .attach-block DIV::before {
    display: block;
    position: absolute;
    float: left;
    content: '';
    width: 32px;
    height: 32px;
    left: 3px;
    white-space: nowrap;
}
.modal .attach-block .image {
    cursor: pointer;
    width: 35px;
    margin-right: 15px;
}
.modal .attach-block .image::before {
    background-image: url(/templates/4.0/img/file_extension_jpg.png);
}
.modal .attach-block .youtube {
    padding-left: 40px;
}
.modal .attach-block .youtube INPUT {
    width: 100%;
    max-width: 200px;
    line-height: 32px;
    height: 32px;
    border: 1px solid silver;
    border-radius: 5px;
    padding: 0 3px;
}
.modal .attach-block .youtube::before {
    background-image: url(/templates/4.0/img/youtube.png);
}



.modal .inner BUTTON {
    background-color: silver;
}
.modal .inner SELECT {
    width: 100%;
    line-height: 26px;
    height: 30px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid silver;
    padding: 0 5px;
    -webkit-appearance: none;/* Chrome */
    -moz-appearance: none;/* Firefox */
    appearance: none;/* убираем дефолнтные стрелочки */
    font-family: inherit;/* наследует от родителя */

}
.modal .inner SELECT OPTION {
    padding: 0 5px;
}
.modal .inner DIV.select {
    position: relative;
}
.modal .inner DIV.select::after {
    content: "";
    display: block;
    border-style: solid;
    border-width: 6px 5px 0 5px;
    border-color: #000 transparent transparent transparent;
    pointer-events: none;
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 300;
    margin-top: -3px;
}

.modal .inner .birthday {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin: 0;
}
.modal .inner .birthday DIV:nth-child(1) {
    width: calc(20%);
}
.modal .inner .birthday DIV:nth-child(2) {
    width: calc(30% - 10px);
}
.modal .inner .birthday DIV:nth-child(3) {
    width: calc(50% - 10px);
}
.modal .inner .birthday SELECT {
    font-size: 12px;
}

.modal .replenish-body {
    display: none;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin: 0;
}
.modal .replenish-body DIV {
    width: calc(50% - 5px);
    margin: 0;
}

.modal .inner .phone-number {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin: 0;
}
.modal .inner .phone-number DIV:nth-child(1) {
    line-height: 30px;
    flex-basis: 10%;
}
.modal .inner .phone-number DIV:nth-child(2) {
    flex-basis: calc(20%);
}
.modal .inner .phone-number DIV:nth-child(3) {
    flex-basis: calc(70% - 10px);
    margin-left: 10px;
}
.modal .inner .phone-number DIV INPUT {
    font-size: 13px;
}

.modal .inner INPUT:not([type='checkbox']):not([type='radio']) {
    width: 100%;
    line-height: 26px;
    height: 30px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid silver;
    padding: 0 5px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
}
.modal .submit {
    margin: 0 0;
}
.modal .submit DIV P {
    color: red;
    font-size: 14px;
    margin-top: 13px;
    margin-bottom: 0;
}
.modal .submit DIV INPUT {
    width: 100%;
    line-height: 40px;
    height: 40px;
    font-size: 18px;
    border-radius: 5px;
    padding: 0 5px;
    background-color: gray;
    border: none;
    color: white;
    cursor: pointer;
}

.modal .moderate {
    margin: 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.modal .moderate DIV {
    flex-grow: 1;
    margin: 3px;
    width: calc(100% / 3);
}
.modal .moderate INPUT {
    width: 100%;
    line-height: 25px;
    height: 25px;
    font-size: 16px;
    border-radius: 5px;
    padding: 0 5px;
    background-color: gray;
    border: none;
    color: white;
    cursor: pointer;
    margin-top: 3px;
}
.modal .inner DIV.clear {
    flex-basis: 100%;
    margin: 0;
    padding: 0;
}
.modal .inner DIV.jpg, .modal .inner DIV.jpg-delete {
    cursor: pointer;
    height: 28px;
    border-radius: 5px;
    border: 1px solid silver;
}
.modal .inner DIV.jpg-loading {
    height: 30px;
}
.modal .inner DIV.jpg::before, .modal .inner DIV.jpg-delete::before, .modal .inner DIV.jpg-loading::before {
    background-position: left center;
    background-repeat: no-repeat;
    display: block;
    position: absolute;
    float: left;
    content: '';
    left: 5px;
    white-space: nowrap;
    height: 28px;
    line-height: 28px;
    padding-left: 20px;
    font-size: 14px;
}
.modal .inner DIV.jpg::before {
    background-image: url(/templates/4.0/img/file_extension_jpg_s.png);
    content: 'Фотография JPG';
}
.modal .inner DIV.jpg-loading::before {
    content: 'Загрузка...';
    color: white;
}
.modal .inner DIV.jpg-loading PROGRESS {
    width: 100%;
    height: 29px;
    margin: 0;
    border: 0;
    display: block;
}
.modal .inner DIV.jpg-delete::before {
    background-image: url(/templates/4.0/img/image_delete.png);
    content: 'Удалить изображение';
}
.modal .inner .avatara {
    flex-basis: 100%;
}
.modal .inner .avatara IMG {
    max-width: 100%;
    max-height: 250px;
    margin: 0 auto;
    display: block;
}



#phone_get_pin_button_id::after {
    content: 'Получить код';
}

@media screen and (min-width:501px)
{
    .modal .inner DIV.dependent {
        width: calc(50% - 10px);
    }
    .modal .inner DIV.short {
        width: calc(25% - 15px);
        position: relative;
        margin-bottom: 15px;
    }
    .modal .inner .birthday DIV.select::after {
        display: none;
    }
    .modal .submit {
        margin: 0 0;
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    .modal .submit DIV:nth-child(1) {
        flex-basis: calc(20%);
        margin-right: 10px;
    }
    .modal .submit DIV:nth-child(2) {
        flex-basis: calc(80%);
    }
    #phone_get_pin_button_id::after {
        content: 'Получить код по СМС';
    }
}


.modal .table {
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}
.modal .table DIV {
    margin-bottom: 5px;
}
.modal .table DIV:nth-child(1) {
    flex-basis: 30%;
}
.modal .table DIV:nth-child(2) {
    flex-basis: 25%;
}
.modal .table DIV:last-child {
    flex-basis: 14px;
}

.modal .table DIV:last-child A {
    width: 14px;
    height: 14px;
    cursor: pointer;
    background-color: gray;
    border: 1px solid gray;
    border-radius: 5px;
    position: relative;
    display: block;
}
.modal .table DIV:last-child A:before, .modal .table DIV:last-child A:after {
    position: absolute;
    left: 6px;
    top: 1px;
    content: ' ';
    height: 11px;
    width: 2px;
    background-color: white;
}
.modal .table DIV:last-child A:before {
    transform: rotate(45deg);
}
.modal .table DIV:last-child A:after {
    transform: rotate(-45deg);
} 



.checkbox {
	position: absolute;
	z-index: -1;
	opacity: 0;
	margin: 10px 0 0 20px;
    width: auto;
}
label {
    line-height: 30px;
    height: 30px;
    font-size: 14px;
}
.checkbox + label {
	position: relative;
	padding: 0 0 0 60px;
	cursor: pointer;
}
.checkbox + label:before {
	content: '';
	position: absolute;
	top: -4px;
	left: 0;
	width: 50px;
	height: 26px;
	border-radius: 13px;
	background: #CDD1DA;
	box-shadow: inset 0 2px 3px rgba(0,0,0,.2);
	transition: .2s;
}
.checkbox + label:after {
	content: '';
	position: absolute;
	top: -2px;
	left: 2px;
	width: 22px;
	height: 22px;
	border-radius: 10px;
	background: #FFF;
	box-shadow: 0 2px 5px rgba(0,0,0,.3);
	transition: .2s;
}
.checkbox:checked + label:before {
	background: #ba2c2c;
}
.checkbox:checked + label:after {
	left: 26px;
}
.checkbox:focus + label:before {
	/*box-shadow: inset 0 2px 3px rgba(0,0,0,.2), 0 0 0 3px rgba(216,119,119,.7);*/
}

.checkbox {
	vertical-align: top;
	width: 17px;
	height: 17px;
	margin: 0 3px 0 0;
}
.checkbox + label {
	cursor: pointer;
}
.checkbox:not(checked) {
	position: absolute;
	z-index: -1;
	opacity: 0;
	margin: 10px 0 0 20px;
}
.checkbox:not(checked) + label {
	position: relative;
	padding: 0 0 0 60px;
}
.checkbox:not(checked) + label:before {
	content: '';
	position: absolute;
	top: -4px;
	left: 0;
	width: 50px;
	height: 26px;
	border-radius: 13px;
	background: #CDD1DA;
	/*box-shadow: inset 0 2px 3px rgba(0,0,0,.2);*/
	transition: .2s;
}
.checkbox:not(checked) + label:after {
	content: '';
	position: absolute;
	top: -2px;
	left: 2px;
	width: 22px;
	height: 22px;
	border-radius: 10px;
	background: #FFF;
	/*box-shadow: 0 2px 5px rgba(0,0,0,.3);*/
	transition: .2s;
}
.checkbox:checked + label:before {
	background: #ba2c2c;
}
.checkbox:checked + label:after {
	left: 26px;
}
.checkbox:focus + label:before {
	/*box-shadow: inset 0 2px 3px rgba(0,0,0,.2), 0 0 0 3px rgba(216,119,119,.7);*/
}




.radio {
	position: absolute;
	z-index: -1;
	opacity: 0;
	margin: 10px 0 0 7px;
}
.radio + label {
	position: relative;
	padding: 0 0 0 35px;
	cursor: pointer;
}
.radio + label:before {
	content: '';
	position: absolute;
	top: -3px;
	left: 0;
	width: 22px;
	height: 22px;
	border: 1px solid #CDD1DA;
	border-radius: 50%;
	background: #FFF;
}
.radio + label:after {
	content: '';
	position: absolute;
	top: 1px;
	left: 4px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #ba2c2c;
	/*box-shadow: inset 0 1px 1px rgba(216,119,119,.5);*/
	opacity: 0;
	transition: .2s;
}
.radio:checked + label:after {
	opacity: 1;
}
.radio:focus + label:before {
	/*box-shadow: 0 0 0 3px rgba(216,119,119,.7);*/
}
.radio {
	vertical-align: top;
	width: 17px;
	height: 17px;
	margin: 0 3px 0 0;
}
.radio + label {
	cursor: pointer;
}
.radio:not(checked) {
	position: absolute;
	z-index: -1;
	opacity: 0;
	margin: 10px 0 0 7px;
}
.radio:not(checked) + label {
	position: relative;
	padding: 0 0 0 35px;
}
.radio:not(checked) + label:before {
	content: '';
	position: absolute;
	top: -3px;
	left: 0;
	width: 22px;
	height: 22px;
	border: 1px solid #CDD1DA;
	border-radius: 50%;
	background: #FFF;
}
.radio:not(checked) + label:after {
	content: '';
	position: absolute;
	top: 1px;
	left: 4px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #ba2c2c;
	/*box-shadow: inset 0 1px 1px rgba(0,0,0,.5);*/
	opacity: 0;
	transition: .2s;
}
.radio:checked + label:after {
	opacity: 1;
}
.radio:focus + label:before {
	/*box-shadow: 0 0 0 3px rgba(216,119,119,.7);*/
}