.es-profile {
    display: flex;
    flex-wrap: wrap;
    font-size: 10px;

    .avatar {
        border-radius: 50%;
    }

    .es-delete-photo {
        font-size: 1.2em;
    }

    &.es-profile--tablet, &.es-profile--mobile {
        .es-profile__nav-bar {
            display: flex;
            flex: 1 0 100%;
            flex-wrap: wrap;
            justify-content: space-between;

            .es-user__name {
                a {
                    color: #263238;
                }
            }
        }

        .es-profile__sidebar {
            display: none;
        }

        .es-profile__nav-bar__user, form {
            margin: 8px 0;
        }
    }

    &.es-profile--mobile {
        .es-profile__nav-bar__user, form {
            flex: 1 0 100%;
        }

        .es-profile__nav-bar__user {
            margin: 1.2em 0 1em;
        }

        form {
            margin: 1em 0 1.6em;
        }
    }

    &__nav-bar {
        display: none;
        background: #EFF3F5;
        padding: 0 3em;

        form {
            display: inline-flex;
            align-items: center;

            .es-field {
                margin-right: 1rem;
            }

            .profile-logout {
                font-size: 1.1rem;
            }
        }

        &__user {
            display: inline-flex;
            align-items: center;

            .es-profile__image {
                width: 3.2em;
                height: 3.2em;
                margin-right: 1.6em;

                .avatar {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }
            }
        }
    }

    &__flashes {
        flex: 1 0 100%;
    }

    &__sidebar {
        background: #EFF3F5;
        width: 100%;
        min-width: 220px;
        padding: 2.5em 1.5em 2.5em 3em;
        flex: 1;

        &__user {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            border-bottom: 2px solid #fff;
            padding: 1.5em 0;
            margin-bottom: 1.5em;

            .es-profile__image {
                margin-right: 1.5em;
                width: 6.4em;
                height: 6.4em;

                .avatar {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }
            }

            .es-user__name {
                margin: 1em 0;
                color: #263238;
            }
        }
    }

    .es-profile__main {
        flex: 3;
        padding: 3.5em 3em;
        width: 100%;

        .es-field {
            padding-bottom: 30px;
        }

        p:not(.es-field__description) {
            color: #263238;
            font-size: 1.4em;
            line-height: 1.71em;
            margin-bottom: 16px;

            &.es-subtitle {
              font-weight: bold;
              font-size: 1.6em;
              line-height: 1.5em;
                margin-top: 0;
            }
        }

        p + .es-btn {
            margin-top: 15px;
        }

        h2 {
            font-size: 2.6em;
            line-height: 1.69em;
            color: #263238;
            margin: 0 0 1em;
        }

        h3.es-profile-heading {
            font-weight: bold;
            font-size: 2.2em;
            line-height: 1.55em;
            color: #4e5a6a;
            position: relative;
            overflow: hidden;
            margin: 2.4em 0 1em;

            &:after {
                content: '';
                position: absolute;
                background: #EFF3F5;
                display: inline-block;
                width: 100%;
                height: 2px;
                margin-left: 25px;
                top: 49%;
            }
        }
    }
}

.es-saved-searches {
    display: grid;
    font-size: 10px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    grid-column-gap: 2.5em;
    grid-row-gap: 2.5em;

    .es-saved-search {
        padding: 2.5em;
        box-shadow: 0 1px 4px rgba(38, 50, 56, 0.2);
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;

        & > * {
            flex: 1 0 100%;
        }

        .es-saved-search__query {
            &, b {
                font-weight: normal;
                font-size: 1.2em;
                line-height: 20px;
                color: #4C5A67;
            }
        }

        .es-address {
            font-weight: bold;
            display: block;
            font-size: 1.2em;
            line-height: 1.67em;
            color: #4C5A67;
            margin-bottom: 8px;
        }

        h4 {
            font-weight: bold;
            font-size: 1.4em;
            line-height: 1.6em;
            color: #263238;
            margin: 0 0 1em;
            text-transform: initial;
            letter-spacing: initial;
        }

        .es-saved-search__buttons {
            display: flex;
            flex-wrap: wrap;
            margin: 12px -12px -6px;
        }

        .es-btn {
            margin: 12px 12px 6px;
        }
    }
}

.es-photo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    .es-photo__image {
        margin-right: 2.5em;
    }

    img {
        object-fit: cover;
        border-radius: 50%;
        width: 112px;
        height: 112px;
    }

    .es-btn--upload-photo {
        margin: 15px 30px 15px 0;
    }
}

.es-profile__menu {
    &, li {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    li {
        padding: 0.8em 0;

        &.active {
            a {
                color: #263238;
            }
        }

        a {
            font-weight: bold;
            font-size: 1.4em;
            line-height: 1.71em;
            color: #4e5a6a;
            text-decoration: none !important;

            .es-icon {
                font-size: 1.7em;
                vertical-align: middle;
                margin-right: 0.7em;
            }
        }
    }
}
