/* report-home.css — F_073 분석 리포트 홈 · 주소 검색 */

.layout-report-home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: #f9f9f9;
}

.layout-report-home #header,
.layout-report-home .breadcrumb {
  flex: 0 0 auto;
}

.rpt-home-page {
  flex: 1 1 auto;
  box-sizing: border-box;
  width: 100%;
  padding: 4rem var(--layout-pad-x) 8rem;
}

.rpt-home-page__inner {
  max-width: 184rem;
  margin: 0 auto;
}

.rpt-home-page__tit {
  margin: 0 0 4rem;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-align: center;
  color: var(--color-ink, #222);
}

/* ---------- 히어로 ---------- */
.rpt-home-hero {
  box-sizing: border-box;
  margin-bottom: 6rem;
  padding: 4rem 2.4rem 4.8rem;
  border: 1px solid #e5e5e5;
  border-radius: 0.8rem;
  background: #edeff3;
  text-align: center;
  overflow: visible;
}

.rpt-home-hero__catch {
  margin: 0 0 1.2rem;
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
  color: var(--color-ink, #222);
}

.rpt-home-hero__lead {
  margin: 0 0 3.2rem;
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.55;
  color: #757575;
}

.rpt-home-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem 1.2rem;
  max-width: 68rem;
  margin: 0 auto 1.6rem;
}

.rpt-home-search__label {
  flex: 0 0 auto;
  margin: 0 0 1.1rem;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-ink, #222);
}

.rpt-home-search__field-wrap {
  position: relative;
  flex: 1 1 36rem;
  max-width: 36rem;
  min-width: 0;
  overflow: visible;
}

.layout-report-home .map-search--report {
  flex: none;
  width: 100%;
  min-width: 0;
  max-width: none;
  text-align: left;
}

.layout-report-home .map-search--report .map-search__group-tit {
  text-align: left;
}

.layout-report-home .map-search--report .map-search__panel {
  background: #f9f9f9;
}

.layout-report-home .map-search--report:not(.is-open) .map-search__field {
  border: 1px solid #ddd;
  border-radius: 0.8rem;
  background: #f9f9f9;
}

.layout-report-home .map-search--report input[type="search"] {
  font-size: 1.5rem;
  font-weight: 600;
}

.layout-report-home .map-search--report input[type="search"]::placeholder {
  font-weight: 600;
  color: #8c8f9c;
}

.layout-report-home .map-search--report .map-search__item:has(.map-search__item-tag--collective) {
  padding-right: 9.2rem;
}

.layout-report-home .map-search__item-tag--collective {
  right: 1rem;
  padding: 0.5rem 0.8rem;
  border-color: var(--color-primary, #006af4);
  border-radius: 0.8rem;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-primary, #006af4);
}

.rpt-home-search__report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 4rem;
  padding: 0 1.2rem;
  border: none;
  border-radius: 0.8rem;
  background: #61676d;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.rpt-home-search__report-btn:hover {
  background: #4f555a;
}

.rpt-home-search__report-btn:focus-visible {
  outline: 2px solid var(--color-primary, #006af4);
  outline-offset: 2px;
}

.rpt-home-hero__example {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.45;
  color: #757575;
  white-space: pre-wrap;
}

/* ---------- 목록 ---------- */
.rpt-home-history__tit {
  margin: 0 0 2.4rem;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-ink, #222);
}

.rpt-home-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rpt-home-table {
  width: 100%;
  min-width: 72rem;
  border-collapse: collapse;
  table-layout: fixed;
}

.rpt-home-table th,
.rpt-home-table td {
  box-sizing: border-box;
  height: 4.8rem;
  padding: 0 2rem;
  border: 1px solid #e5e5e5;
  background: #fff;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  vertical-align: middle;
}

.rpt-home-table thead th {
  background: #edeff3;
  font-weight: 500;
  color: var(--color-ink, #222);
  text-align: center;
}

.rpt-home-table col.rpt-home-table__col--addr {
  width: 46%;
}

.rpt-home-table col.rpt-home-table__col--status {
  width: 32%;
}

.rpt-home-table col.rpt-home-table__col--action {
  width: 22%;
}

.rpt-home-table__addr {
  padding-left: 3rem;
  font-weight: 400;
  color: #666;
  text-align: left;
  white-space: nowrap;
}

.rpt-home-table thead th:first-child {
  padding-left: 3rem;
  text-align: left;
}

.rpt-home-table__status {
  padding-right: 1.6rem;
  text-align: left;
  white-space: nowrap;
}

.rpt-home-table__action {
  text-align: center;
}

.rpt-home-status {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1.2rem;
  max-width: 100%;
  white-space: nowrap;
}

.rpt-home-status__date {
  flex-shrink: 0;
  color: #666;
  white-space: nowrap;
}

.rpt-home-status__pill {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 10rem;
  background: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.rpt-home-status__pill--ok {
  border-color: var(--color-primary, #006af4);
  color: var(--color-primary, #006af4);
}

.rpt-home-status__pill--no {
  border-color: #e80000;
  color: #e80000;
}

.rpt-home-table__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8rem;
  height: 3.2rem;
  padding: 0 1rem;
  border: none;
  border-radius: 0.8rem;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
}

.rpt-home-table__btn--view {
  background: #61676d;
  color: #f9f9f9;
}

.rpt-home-table__btn--view:hover {
  background: #4f555a;
}

.rpt-home-table__btn--disabled,
.rpt-home-table__btn--disabled:disabled {
  background: #ddd;
  color: #757575;
  cursor: not-allowed;
  pointer-events: none;
}

.rpt-home-table__btn:focus-visible {
  outline: 2px solid var(--color-primary, #006af4);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .rpt-home-page {
    padding-top: 3rem;
    padding-bottom: 6rem;
  }

  .rpt-home-page__tit {
    margin-bottom: 2.4rem;
    font-size: 2.4rem;
  }

  .rpt-home-hero {
    margin-bottom: 4rem;
    padding: 2.4rem 1.6rem 3.2rem;
  }

  .rpt-home-hero__catch {
    font-size: 2.4rem;
  }

  .rpt-home-hero__lead {
    margin-bottom: 2.4rem;
    font-size: 1.6rem;
  }

  .rpt-home-search {
    flex-direction: column;
    align-items: stretch;
    max-width: none;
  }

  .rpt-home-search__label {
    margin-bottom: 0.4rem;
    text-align: left;
  }

  .rpt-home-search__field-wrap {
    flex: 1 1 auto;
    max-width: none;
  }

  .rpt-home-search__report-btn {
    width: 100%;
  }

  /* F_073 — 지도검색(F_005) 모바일 전체화면 오버라이드 · 인풋 하단 드롭다운만 */
  .layout-report-home .map-search--report {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .layout-report-home .map-search--report .map-search__panel {
    border-radius: 0.8rem;
  }

  .layout-report-home .map-search--report:not(.is-open) .map-search__panel {
    border-bottom: 0;
  }

  .layout-report-home .map-search--report .map-search__bar {
    padding: 0;
  }

  .layout-report-home .map-search--report:not(.is-open) .map-search__field {
    height: 4rem;
    padding: 0 1.2rem;
    border: 1px solid #ddd;
    border-radius: 0.8rem;
    background: #f9f9f9;
  }

  .layout-report-home .map-search--report.is-open {
    z-index: 80;
  }

  .layout-report-home .map-search--report.is-open .map-search__panel {
    border: 0;
    border-radius: 0.8rem;
    background: transparent;
    box-shadow: none;
  }

  .layout-report-home .map-search--report.is-open .map-search__bar {
    gap: 0.8rem;
    padding: 0;
    border-bottom: 0;
    background: transparent;
  }

  .layout-report-home .map-search--report.is-open .map-search__back,
  .layout-report-home .map-search--report.is-open .map-search__back[hidden] {
    display: none !important;
  }

  .layout-report-home .map-search--report.is-open .map-search__field {
    height: 4rem;
    padding: 0 1.2rem;
    border: 1px solid var(--color-primary, #006af4);
    border-radius: 0.8rem 0.8rem 0 0;
    border-bottom-color: var(--color-white);
    background: var(--color-white);
  }

  .layout-report-home .map-search--report.is-open .map-search__suggest {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    bottom: auto;
    z-index: 80;
    max-height: min(40rem, 55vh);
    margin-top: -1px;
    padding: 2rem 0;
    border: 1px solid var(--color-primary, #006af4);
    border-top: 1px solid var(--color-line);
    border-radius: 0 0 0.8rem 0.8rem;
    box-shadow: 0 0.3rem 0.3rem rgba(0, 0, 0, 0.18);
    background: var(--color-white);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .layout-report-home .map-search--report.is-open .map-search__suggest .map-search__results {
    padding: 0;
  }

  .layout-report-home .map-search--report.is-open.is-recent .map-search__recent {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    bottom: auto;
    z-index: 80;
    display: block;
    flex-direction: column;
    max-height: min(40rem, 55vh);
    margin-top: -1px;
    padding: 2rem 0 0;
    border: 1px solid var(--color-primary, #006af4);
    border-top: 1px solid var(--color-line);
    border-radius: 0 0 0.8rem 0.8rem;
    box-shadow: 0 0.3rem 0.3rem rgba(0, 0, 0, 0.18);
    background: var(--color-white);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .layout-report-home .map-search--report.is-open.is-recent .map-search__recent-head {
    padding: 0 1.6rem 1.2rem;
  }

  .layout-report-home .map-search--report.is-open.is-recent .map-search__recent-list {
    flex: none;
    overflow: visible;
  }

  .layout-report-home .map-search--report.is-open.is-recent .map-search__recent-list > li {
    min-height: 4rem;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }

  .layout-report-home .map-search--report.is-open.is-recent .map-search__recent-clear-all {
    display: flex;
  }

  .layout-report-home .map-search--report.is-open .map-search__empty {
    padding: 2rem 1.5rem 2.4rem;
  }

  .rpt-home-history__tit {
    font-size: 2.2rem;
  }

  .rpt-home-table__btn {
    font-size: 1.3rem;
  }
}

/* ===== v7.0 개발 연결 (F_073) ===== */
/* 일반건물 배지 — 집합건물 배지와 같은 자리 · 회색 */
.layout-report-home .map-search--report .map-search__item:has(.map-search__item-tag--general) {
  padding-right: 9.2rem;
}

.layout-report-home .map-search__item-tag--general {
  right: 1rem;
  padding: 0.5rem 0.8rem;
  border-color: #c5c9ce;
  border-radius: 0.8rem;
  font-size: 1.4rem;
  font-weight: 500;
  color: #61676d;
}

/* 선택한 주소 행 */
.layout-report-home .map-search__item.is-selected {
  background: #f2f7ff;
}

/* ② 자동완성에서 주소를 고르기 전에는 비활성 */
.rpt-home-search__report-btn:disabled {
  background: #c5c9ce;
  cursor: default;
}

.rpt-home-search__report-btn:disabled:hover {
  background: #c5c9ce;
}

/* 서버 안내 (건축물대장 없음 · 검색 불가) */
.rpt-home-notice {
  margin: 0 0 1.6rem;
  padding: 1.2rem 1.6rem;
  border-radius: 0.8rem;
  background: #fff4e5;
  font-size: 1.4rem;
  line-height: 1.5;
  color: #8a4b00;
}

/* ⑦ 「보유 중」 — 선택한 주소로 이미 받은 리포트 */
.rpt-home-owned {
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  background: var(--color-primary, #006af4);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  vertical-align: middle;
}

.rpt-home-owned[hidden] {
  display: none;
}
