/*
 * ヴォクシー見積もり診断一覧：専用CSS
 * 既存CSSを流用し、新規指定は一覧ページ固有のUIだけに限定。
 */

.voxy-estimate-list-page {
  --judge-a: #16794f;
  --judge-a-bg: #ecfdf5;
  --judge-b: #9a6200;
  --judge-b-bg: #fff8e6;
  --judge-c: #c62828;
  --judge-c-bg: #fff1f2;
}

/* 00. コンパクトな一覧ヒーロー */
.voxy-estimate-list-page .estimate-list-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
}

.voxy-estimate-list-page .estimate-list-hero__copy {
  grid-column: 1;
  grid-row: 1;
}

.voxy-estimate-list-page .estimate-list-hero h1 {
  max-width: 680px;
}

.voxy-estimate-list-page .estimate-list-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.voxy-estimate-list-page .estimate-list-hero__meta .badge {
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
}

.voxy-estimate-list-page .estimate-list-hero__meta b {
  margin-right: 2px;
  font-size: 15px;
}

.voxy-estimate-list-page .estimate-list-hero__visual {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 440px;
  justify-self: end;
}

.voxy-estimate-list-page .estimate-list-hero__visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.voxy-estimate-list-page .estimate-list-supervisor {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: none;
  margin: 0;
  background: #fff;
}
/* 01. 判定の見方 */
.voxy-estimate-list-page .estimate-judge-guide {
  margin-bottom: 18px;
}

.voxy-estimate-list-page .estimate-judge-guide__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.voxy-estimate-list-page .estimate-judge-guide__item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.voxy-estimate-list-page .estimate-judge-guide__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-judge-guide__item strong,
.voxy-estimate-list-page .estimate-judge-guide__item small {
  display: block;
}

.voxy-estimate-list-page .estimate-judge-guide__item strong {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-judge-guide__item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  font-weight: 700;
}

.voxy-estimate-list-page .estimate-judge-guide__item.is-a .estimate-judge-guide__mark { background: var(--judge-a); }
.voxy-estimate-list-page .estimate-judge-guide__item.is-b .estimate-judge-guide__mark { background: var(--judge-b); }
.voxy-estimate-list-page .estimate-judge-guide__item.is-c .estimate-judge-guide__mark { background: var(--judge-c); }

.voxy-estimate-list-page .estimate-date-note {
  margin: 10px 0 0 !important;
  padding-top: 9px !important;
  border-top: 1px dashed #b8dde6;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  font-weight: 600;
}

.voxy-estimate-list-page .estimate-date-note strong { color: var(--navy); }

/* 02. 絞り込み */
.voxy-estimate-list-page .estimate-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #b8dde6;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, var(--db-light) 100%);
}

.voxy-estimate-list-page .estimate-filter__field label,
.voxy-estimate-list-page .estimate-sort label {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-filter select,
.voxy-estimate-list-page .estimate-sort select {
  width: 100%;
  min-height: 42px;
  padding: 8px 34px 8px 10px;
  border: 1px solid #c8d7e8;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.voxy-estimate-list-page .estimate-filter select:focus,
.voxy-estimate-list-page .estimate-sort select:focus {
  outline: 3px solid rgba(40, 75, 131, .16);
  border-color: var(--blue);
}

.voxy-estimate-list-page .estimate-filter__reset,
.voxy-estimate-list-page .estimate-empty button {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #9fb5ce;
  border-radius: 9px;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.voxy-estimate-list-page .estimate-filter__reset:hover,
.voxy-estimate-list-page .estimate-empty button:hover {
  border-color: var(--blue);
  background: #f4f8fc;
}

.voxy-estimate-list-page .estimate-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 15px 0 12px;
}

.voxy-estimate-list-page .estimate-list-toolbar p {
  margin: 0 !important;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.voxy-estimate-list-page .estimate-list-toolbar p strong {
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-sort {
  width: 210px;
}

.voxy-estimate-list-page .estimate-sort select {
  min-height: 38px;
}

/* 03. 一覧カード */
.voxy-estimate-list-page .estimate-card-list {
  display: grid;
  gap: 14px;
}

.voxy-estimate-list-page .estimate-list-card {
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(19, 43, 85, .06);
}

.voxy-estimate-list-page .estimate-list-card.is-a { border-color: #a7dcc8; }
.voxy-estimate-list-page .estimate-list-card.is-b { border-color: #ead9a2; }
.voxy-estimate-list-page .estimate-list-card.is-c { border-color: #f3b2b7; }

.voxy-estimate-list-page .estimate-list-card[hidden] { display: none; }

.voxy-estimate-list-page .estimate-list-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.voxy-estimate-list-page .estimate-list-card.is-a .estimate-list-card__top { background: var(--judge-a-bg); }
.voxy-estimate-list-page .estimate-list-card.is-b .estimate-list-card__top { background: var(--judge-b-bg); }
.voxy-estimate-list-page .estimate-list-card.is-c .estimate-list-card__top { background: var(--judge-c-bg); }

.voxy-estimate-list-page .estimate-list-card__judge {
  display: flex;
  align-items: center;
  gap: 9px;
}

.voxy-estimate-list-page .estimate-list-card__judge-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-list-card.is-a .estimate-list-card__judge-mark { background: var(--judge-a); }
.voxy-estimate-list-page .estimate-list-card.is-b .estimate-list-card__judge-mark { background: var(--judge-b); }
.voxy-estimate-list-page .estimate-list-card.is-c .estimate-list-card__judge-mark { background: var(--judge-c); }

.voxy-estimate-list-page .estimate-list-card__judge small,
.voxy-estimate-list-page .estimate-list-card__judge strong,
.voxy-estimate-list-page .estimate-list-card__date span,
.voxy-estimate-list-page .estimate-list-card__date time {
  display: block;
}

.voxy-estimate-list-page .estimate-list-card__judge small,
.voxy-estimate-list-page .estimate-list-card__date span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.voxy-estimate-list-page .estimate-list-card__judge strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-list-card__date {
  min-width: 150px;
  padding: 7px 10px;
  border: 1px solid rgba(19, 43, 85, .12);
  border-radius: 9px;
  background: rgba(255, 255, 255, .86);
  text-align: right;
}

.voxy-estimate-list-page .estimate-list-card__date time {
  margin-top: 2px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-list-card__main {
  display: grid;
  grid-template-columns: minmax(210px, .85fr) minmax(340px, 1.4fr);
  grid-template-areas:
    "heading values"
    "diagnosis diagnosis"
    "tags tags";
  gap: 12px 18px;
  padding: 16px;
}

.voxy-estimate-list-page .estimate-list-card__heading { grid-area: heading; }
.voxy-estimate-list-page .estimate-list-card__values { grid-area: values; }
.voxy-estimate-list-page .estimate-list-card__diagnosis { grid-area: diagnosis; }
.voxy-estimate-list-page .estimate-list-card__tags { grid-area: tags; }

.voxy-estimate-list-page .estimate-list-card__case-no {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--db-light);
  color: var(--db);
  font-size: 9px;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-list-card__heading h3 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-list-card__heading p {
  margin: 0 !important;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.voxy-estimate-list-page .estimate-list-card__values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.voxy-estimate-list-page .estimate-list-card__values div {
  padding: 9px 7px;
  border: 1px solid #e4eaf1;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
}

.voxy-estimate-list-page .estimate-list-card__values div.is-total {
  border-color: #fecaca;
  background: #fff5f5;
}

.voxy-estimate-list-page .estimate-list-card__values dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.voxy-estimate-list-page .estimate-list-card__values dd {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-list-card__values .is-total dd { color: var(--red); }

.voxy-estimate-list-page .estimate-list-card__diagnosis {
  padding: 11px 13px;
  border-left: 4px solid var(--blue);
  border-radius: 0 9px 9px 0;
  background: #f7faff;
}

.voxy-estimate-list-page .estimate-list-card.is-a .estimate-list-card__diagnosis { border-left-color: var(--judge-a); }
.voxy-estimate-list-page .estimate-list-card.is-b .estimate-list-card__diagnosis { border-left-color: var(--judge-b); }
.voxy-estimate-list-page .estimate-list-card.is-c .estimate-list-card__diagnosis { border-left-color: var(--judge-c); }

.voxy-estimate-list-page .estimate-list-card__diagnosis strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-list-card__diagnosis p {
  margin: 4px 0 0 !important;
  color: #475569;
  font-size: 11px;
  line-height: 1.65;
  font-weight: 600;
}

.voxy-estimate-list-page .estimate-list-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.voxy-estimate-list-page .estimate-list-card__tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf3fa;
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
}

.voxy-estimate-list-page .estimate-list-card__link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  justify-self: end;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 9px;
  background: var(--navy);
  color: #fff !important;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  transition: transform .15s ease, box-shadow .15s ease;
}

.voxy-estimate-list-page .estimate-list-card__link:hover,
.voxy-estimate-list-page .estimate-list-card__link:focus {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(19, 43, 85, .2);
}

/* 初期表示6件＋残りを一括表示 */
.voxy-estimate-list-page .estimate-load-more {
  display: flex;
  justify-content: center;
  margin: 18px 0 2px;
}

.voxy-estimate-list-page .estimate-load-more[hidden] {
  display: none;
}

.voxy-estimate-list-page .estimate-load-more__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 360px);
  min-height: 46px;
  padding: 11px 20px;
  border: 2px solid #284b83;
  border-radius: 999px;
  background: #fff;
  color: #284b83;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(19, 43, 85, .08);
  transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.voxy-estimate-list-page .estimate-load-more__button:hover,
.voxy-estimate-list-page .estimate-load-more__button:focus {
  background: #284b83;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(19, 43, 85, .18);
}

.voxy-estimate-list-page .estimate-empty {
  padding: 28px 16px;
  border: 1px dashed #b9c8da;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.voxy-estimate-list-page .estimate-empty strong {
  display: block;
  color: var(--navy);
  font-size: 15px;
}

.voxy-estimate-list-page .estimate-empty p {
  margin: 5px 0 12px !important;
  color: var(--muted);
  font-size: 11px;
}

.voxy-estimate-list-page .estimate-list-disclaimer {
  margin: 14px 0 0 !important;
  padding: 10px 12px !important;
  border-radius: 9px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  font-weight: 600;
}

.voxy-estimate-list-page .estimate-detail-status {
  margin: 18px 0 0 !important;
  padding: 12px 14px !important;
  border: 1px solid #d8e3f1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.7;
  font-weight: 700;
  text-align: center;
}

/* 関連ページはchapter外でも既存のfinal-next-navを利用 */
.voxy-estimate-list-page .estimate-related {
  margin-top: 22px;
}

@media (max-width: 900px) {
  .voxy-estimate-list-page .estimate-list-hero {
    grid-template-columns: 1fr;
  }

  .voxy-estimate-list-page .estimate-list-hero__copy {
    grid-column: 1;
    grid-row: 1;
  }

  .voxy-estimate-list-page .estimate-list-hero__visual {
    grid-column: 1;
    grid-row: 2;
    max-width: 520px;
    justify-self: center;
  }

  .voxy-estimate-list-page .estimate-list-supervisor {
    grid-column: 1;
    grid-row: 3;
  }

  .voxy-estimate-list-page .estimate-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voxy-estimate-list-page .estimate-list-card__main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "values"
      "diagnosis"
      "tags";
  }
}

@media (max-width: 640px) {
  .voxy-estimate-list-page .estimate-list-hero {
    padding: 18px;
  }

  .voxy-estimate-list-page .estimate-list-hero__copy {
  grid-column: 1;
  grid-row: 1;
}

.voxy-estimate-list-page .estimate-list-hero h1 {
    font-size: 23px;
    line-height: 1.4;
  }

  .voxy-estimate-list-page .estimate-judge-guide__grid,
  .voxy-estimate-list-page .estimate-filter {
    grid-template-columns: 1fr;
  }

  .voxy-estimate-list-page .estimate-filter__reset {
    width: 100%;
  }

  .voxy-estimate-list-page .estimate-list-toolbar {
    display: block;
  }

  .voxy-estimate-list-page .estimate-sort {
    width: 100%;
    margin-top: 10px;
  }

  .voxy-estimate-list-page .estimate-list-card__top {
    align-items: stretch;
  }

  .voxy-estimate-list-page .estimate-list-card__date {
    min-width: 128px;
    padding: 6px 8px;
  }

  .voxy-estimate-list-page .estimate-list-card__date time {
    font-size: 11px;
  }

  .voxy-estimate-list-page .estimate-list-card__main {
    padding: 13px;
  }

  .voxy-estimate-list-page .estimate-list-card__values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voxy-estimate-list-page .estimate-list-card__heading h3 {
    font-size: 16px;
  }
}
