*,
::after,
::before {
  box-sizing: border-box;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(255, 255, 255, 0.5);
  font-family: "Roboto", sans-serif;
  z-index: 9999999;
}

.modal-content {
  -webkit-transform: translate3d(0, 20px, 0);
  background-color: #fff;
  -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
  padding: 20px;
  width: 70%;
  position: relative;
  height: 90%;
}

.modal-content h2 {
  margin: 0;
}

.modal form {
  margin-bottom: 20px;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0 24px 0 24px;
}

.modal form input[type="text"] {
  width: 91%;
  height: 32px;
  font-size: 13px;
  padding: 5px;
  border: 1px solid;
}

.modal form button {
  height: 32px;
  display: block;
  background: #587f9f;
  color: white;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 15px;
}

.modal form > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 44%;
}

.modal form > div:last-child {
  width: 20%;
}

.modal form label {
  font-size: 12px;
  margin-bottom: 5px;
  color: #587f9f;
  font-weight: bold;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 18px;
  top: 5px;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#modal-search-list .search-post {
  position: relative;
  margin-top: 20px;
  display: flex;
  border: 1px solid #c1c1c1;
  padding: 16px 8px 0 8px;
}

#modal-search-list .search-post .search-post-thumb {
  width: 80px;
  height: 68px;
  overflow: hidden;
  position: relative;
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 70px;
}

#modal-search-list .search-post .search-post-thumb img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

#modal-search-list .search-post .search-post-detail {
  min-height: 60px;
  padding-top: 2px;
  margin: 0 16px 10px 16px;
}

#modal-search-list .search-post:last-child .search-post-detail {
  margin-bottom: 0;
}

#modal-search-list .search-post .search-post-detail h3 {
  font-weight: 500;
  line-height: 18px;
  margin: 0 0 5px 0;
  -webkit-box-orient: vertical;
  font-size: 16px;
}

#modal-search-list .search-post .search-post-detail h3 a {
  text-decoration: none;
  color: #587f9f;
}

#modal-search-list .search-post .search-post-detail h3 a:hover {
  text-decoration: underline;
}

#modal-search-list .search-post .search-post-detail div:last-child {
  font-size: 12px;
}

#modal-search-list .search-post .search-post-detail .search-post-category {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  background-color: #587f9f;
  color: #fff;
  margin-right: 5px;
  padding: 3px 6px 4px;
  display: block;
  transition: all 0.2s ease;
  -webkit-transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
}

#modal-search-list .search-post .search-post-detail span {
  color: #767676;
  display: inline-block;
  position: relative;
  top: 2px;
  font-size: 11px;
  margin-bottom: 7px;
  line-height: 1;
  min-height: 17px;
}

.location-icon {
  box-sizing: border-box;
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 3px solid #929292;
  border-radius: 100%;
}

.location-icon::after {
  position: absolute;
  top: 100%;
  left: 50%;
  margin: 0 0 0 -4px;
  display: block;
  content: '';
  border: 4px solid transparent;
  border-top: 8px solid #929292;
  border-bottom: none;
}

#modal-search-list .search-post .search-post-detail .search-post-location {
  color: #767676;
  display: inline-block;
  position: relative;
  top: 0;
  font-size: 11px;
  margin-bottom: 7px;
  line-height: 1;
  /* min-height: 17px; */
  margin-left: 8px;
}

#modal-search-list .search-post .search-post-detail .search-post-location-text {
  margin-left: 4px !important;
}

#modal-search-list .search-post .search-post-detail p {
  margin: 0;
  font-size: 13px;
  color: #767676;
  -webkit-box-orient: vertical;
}

#modal-search-list {
  height: calc(100vh - 220px);
  overflow: auto;
}

#modal-search-list h4 {
  margin: 7px 0;
  font-size: 21px;
  font-weight: 500;
}

@media only screen and (max-width: 600px) {
  .modal {
    height: auto;
  }

  .modal-content {
    width: 100%;
  }

  .modal form {
    flex-direction: column;
    padding: 16px 0 0 0;
  }

  #form-search-modal > div {
    width: 100%;
  }

  .modal form input[type="text"] {
    width: 100% !important;
  }

  .modal form label {
    margin-top: 8px;
  }
  
  .modal form button {
    margin-top: 12px;
  }

  #modal-search-list .search-post .search-post-detail p {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}