@use "sass:map";
@use "../global/acms-common" as acms;
@use "../global/common" as global;

/* ------------------------------
　　物件情報
------------------------------ */

/* 検索ボックス
----------------------------- */
.search-panel {
  padding: 2rem 1rem;
  margin-bottom: 2rem;
  background: var(--color-gray10);
  border-radius: var(--border-radius-xl);

  .form-checkbox {
    width: 50%;
  }

  .form-input-wrap {
    padding-bottom: 1.5rem;
  }
}

.search-panel-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-panel-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.search-panel-label {
  display: inline-block;
  min-width: 8rem;
  font-weight: bold;
}

.search-panel-input {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 0;
  align-items: center;

  &.price {
    flex-direction: column;
    width: 100%;
  }
}

.search-panel-keyword {
  width: 100%;
}

.search-panel-footer {
  text-align: center;
}

@include acms.media-breakpoint-up(md) {
  .search-panel {
    padding: 3rem;
    margin-bottom: 3rem;
    border-radius: var(--border-radius-xxl);

    .form-checkbox {
      width: calc(100% / 3 - 2rem);
    }

    .search-panel-group {
      display: flex;
      flex-flow: row wrap;
    }

    .search-panel-item {
      flex-direction: row;
      gap: var(--col-gutter);
      align-items: center;
    }

    .search-panel-input {
      flex: 1;
      gap: 1rem;

      &.price {
        flex-direction: row;

        select {
          flex: 1;
        }
      }
    }
  }
}

/* 検索結果
----------------------------- */
.search-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 0 2rem;

  &:not(:has(*)) {
    display: none;
  }
}

.search-amount {
  margin: 0;
  font-size: map.get(global.$font-scales, body-m);
  font-weight: bold;
  line-height: var(--line-height-base);
}

.search-conditions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  margin: 0;
  background: var(--color-gray10);
  border-radius: var(--border-radius-lg);

  dt {
    font-weight: bold;
  }

  dd {
    margin: 0;
  }

  @include acms.media-breakpoint-up(md) {
    flex-direction: row;
    gap: var(--col-gutter);
  }
}

/* 物件詳細
----------------------------- */
.realestate-map-entry {
  position: relative;
  z-index: 0;
  margin: 0 0 var(--entry-el-margin-md);
  overflow: hidden;
  border-radius: var(--border-radius-lg);

  .js-open-street-map {
    height: 320px;
  }
}

.realestate-images {
  img {
    border-radius: var(--border-radius-lg);
  }
}
