#crm-btn-write {
    width: 220px;
    margin: 20px auto 0 auto;
    padding: 7px 15px;
    background: #4caf50;
    border-radius: 4px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    transition: 200ms;
    user-select: none;
}

#crm-btn-write:hover {
    background: #507299;
}

#crm-schedule {
    padding: 0;
}

#crm-schedule .city {
    font-size: 24px;
    line-height: 1;
    color: #2a5885;
    padding: 5px;
    background: #f3f3f3;
    margin: 0 0 10px;
    text-align: center;
}

#crm-schedule .group {
    border-bottom: 1px solid #ddd;
    margin: 0 0 20px;
}

#crm-schedule .group .head {
    display: flex;
    /*justify-content: space-between;*/
    font-size: 18px;
}

#crm-schedule .group .head .name {
    font-weight: bold;
}

#crm-schedule .group .head .period {
    margin: 0 15px;
    color: #507299;
}

#crm-schedule .group .head .btn-write {
    margin-left: auto;
    padding: 3px 10px;
    background: #4caf50;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: 200ms;
    user-select: none;
}

#crm-schedule .group.is_full .head .btn-write {
    background: #fdab31;
    text-shadow: 0 1px 1px #000;
}

#crm-schedule .group .head .btn-write:hover {
    background: #507299;
}

#crm-schedule .group .lessons {
    display: flex;
    padding: 10px 0;
    /*font-size: 12px;*/
}

#crm-schedule .group .lessons .month {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    max-width: 300px;
    margin: 0 10px 0 0;
    padding: 10px;
    background: #eaffe2;
}

#crm-schedule .group.is_full .lessons .month {
    background: #f9f9f9;
}

#crm-schedule .group .lessons .month p:first-child {
    width: 100%;
    padding: 0;
    font-weight: bold;
    font-size: 16px;
}

#crm-schedule .group .lessons .month p {
    width: 50%;
    font-size: 10px;
    padding: 3px 0 0;
    margin: 0;
}

#crm-schedule .group .lessons .month p span {
    color: #666;
}

#crm-schedule .group .lessons p.no {
    color: #666;
    font-size: 12px;
}

#crm-write-form {
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0,0,0,.5);
    z-index: 100;
}

#crm-write-form.showed {
    display: flex;
    /*overflow: auto;*/
}

#crm-write-form > div {
    position: relative;
    width: 80%;
    max-width: 500px;
    height: auto;
    padding: 20px 30px 30px 30px;
    background: #fff;
    box-sizing: border-box;
}

#crm-write-form .close {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 30px;
    padding: 7px;
    color: #888;
    cursor: pointer;
}

#crm-write-form .close:hover {
    color: #000;
}

#crm-write-form .title {
    padding: 0 0 10px;
    font-size: 18px;
    font-weight: bold;
    color: #507299;
}

#crm-write-form select[name="gid"] {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 15px;
    padding: 7px 5px;
    border: 1px solid #c5c5c5;
    border-radius: 4px;
    outline: none;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}

#crm-write-form select[name="gid"] option[disabled] {
    background: #eee;
}

#crm-write-form .no-groups {
    padding: 7px 0;
}

#crm-write-form input[type="text"], #crm-write-form select, #crm-write-form textarea {
    display: block;
    width: 100%;
    margin: 15px 0;
    padding: 7px 10px;
    font-size: 15px;
    border: 1px solid #c5c5c5;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}
#crm-write-form textarea {
    height: 70px;
    font-size: 13px;
}

#crm-write-form input[type="text"].error {
    border: 1px solid #e3594b;
}

#crm-write-form .price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 10px;
    border-bottom: 1px solid #ddd;
}

#crm-write-form .priceValue {
    font-size: 16px;
}

#crm-write-form .priceValue p:first-child {
    font-size: 18px;
}

#crm-write-form .priceValue b {
    font-size: 18px;
    color: #507299;
}

#crm-write-form .btn-pay {
    /*display: none;*/
    padding: 3px 10px;
    background: #4caf50;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: 200ms;
    user-select: none;
}
#crm-write-form .btn-pay.pre {
    margin: 5px 0 0;
    font-size: 13px;
    background: #8bc34a;
}
#crm-write-form .btn-pay:hover {
    background: #507299;
}

#crm-write-form .btn-write {
    width: 200px;
    margin: 30px auto 0 auto;
    padding: 7px 15px;
    background: #507299;
    border-radius: 4px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    transition: 200ms;
    user-select: none;
}
#crm-write-form .btn-write:hover {
    background: #4caf50;
}
#crm-write-form .result {
    display: none;
    margin: 15px 0 0;
    font-size: 20px;
    text-align: center;
    color: #4caf50;
}
#mobile-phone-field {
	display: flex;
	align-items: center;
	margin: 15px 0;
}
#mobile-phone-field input {
    margin: 0!important;
}
#mobile-phone-field span {
    padding: 0 10px;
}

@media screen and (max-width: 500px) {

    #crm-write-form > div {
        width: 100%;
    }
}

@media screen and (max-height: 500px) {

    #crm-write-form > div {
        height: 330px;
        margin-top: 50px;
        overflow-y: auto;
    }
}