/*
 Theme Name: Gravity Child
 Template: gravity_tcd111
*/


/* =========================================
   パスワード保護物件のカード高さを最小に
   =======================================*/
.p-property-cards-item[style*="min-height:auto"] {
  padding-bottom: 0 !important;
}

.p-property-cards-item[style*="min-height:auto"] .p-property-cards-item-content {
  display: none !important;
}


/* =========================================
   非公開物件 パスワード入力画面のレイアウト
   =======================================*/
.p-single-property--protected {
  padding: 80px 20px 120px;
}

.p-single-property-protected-inner {
  max-width: 880px;
  margin: 0 auto;
}

/* 見出し */
.p-single-property-protected-inner h1,
.p-single-property-protected-inner h2 {
  font-size: 24px;
  line-height: 1.4;
  margin-bottom: 16px;
}

/* 説明文 */
.p-single-property-protected-inner p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 10px;
}

/* エラーメッセージ */
.p-single-property-protected-inner p[style*="color:red"],
.p-single-property-protected-inner .password-protected-error {
  margin-top: 6px;
  margin-bottom: 24px;
}

/* フォーム余白 */
.p-single-property-protected-inner .post-password-form {
  margin-top: 32px;
}

/* スマホ調整 */
@media (max-width: 767px) {
  .p-single-property--protected {
    padding: 40px 15px 80px;
  }

  .p-single-property-protected-inner h1,
  .p-single-property-protected-inner h2 {
    font-size: 20px;
  }

  .p-single-property-protected-inner p {
    font-size: 14px;
  }
}


/* =========================================
   物件カード：新着ラベル
   =======================================*/
.p-property-cards-item-image .mo-property-new-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 30;
}

.p-property-cards-item-image .mo-property-new-label > * {
  position: static !important;
  margin: 0;
}


/* =========================================
   非公開物件（個別案内）CTA
   ※ ここは「最小構成」
   =======================================*/

/* CTAエリア全体 */
.p-single-property-protected-cta {
  margin-top: 40px;
  text-align: center;
}

/* 左の「お問い合わせ」ボタンを非表示 */
.p-single-property--protected .p-single-property-cta-action > a:first-child {
  display: none;
}

/* 説明文CTAを非表示 */
.p-single-property--protected .p-single-property-cta-desc {
  display: none;
}

/* LINEボタン（最終安定版） */
.p-single-property--protected .c-realty-submit {
  display: inline-block;
  min-height: 56px;
  line-height: 1.2;
  white-space: nowrap;
}


/* =========================================
   物件カードの「物件サポート」ボタン
   =======================================*/
.p-property-cards-item-link a {
  display: inline-block;
  background-color: #008e75;
  color: #fff !important;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  border-radius: 4px;
  border: none;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
}

.p-property-cards-item-link a:hover {
  opacity: 0.85;
}

@media (max-width: 767px) {
  .p-property-cards-item-link a {
    display: block;
    width: 100%;
    padding: 16px 0;
    font-size: 16px;
  }
}


/* =========================================
   テーブル（スマホ折返し）
   =======================================*/
@media (max-width: 767px) {
  .post table,
  .page table {
    width: 100%;
    table-layout: fixed;
  }

  .post table th,
  .post table td,
  .page table th,
  .page table td {
    white-space: normal;
    word-break: break-all;
  }
}


/* =========================================
   LP：ケース3枚並び
   =======================================*/
.lp-case-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 40px auto;
  max-width: 1100px;
}

.lp-case {
  flex: 1 1 280px;
  max-width: 340px;
  margin: 0;
}

.lp-case img {
  display: block;
  width: 100%;
  height: auto;
}


/* =========================================
   お問い合わせページ
   =======================================*/
.contact-page {
  max-width: 900px;
  margin: 0 auto 80px;
}

.contact-heading {
  text-align: center;
  font-size: 22px;
  margin: 0 0 30px;
}

.contact-box {
  background: #fafafa;
  padding: 40px 35px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,.03);
}

.tcd-contact-form .contact-row {
  margin-bottom: 20px;
}

.tcd-contact-form .contact-label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.tcd-contact-form .contact-field input,
.tcd-contact-form .contact-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e1e1e1;
  border-radius: 2px;
  background: #fff;
}

.tcd-contact-form .contact-value {
  padding: 10px 0;
  border-bottom: 1px dotted #ddd;
}

.tcd-contact-form .contact-buttons {
  text-align: center;
  margin-top: 30px;
}

.tcd-contact-form .btn {
  padding: 10px 50px;
  border: none;
  cursor: pointer;
}

.contact-errors {
  color: #c00;
  margin: 0 0 20px;
}

.contact-errors li {
  list-style: disc;
  margin-left: 1.4em;
}

.honey {
  display: none;
}

/* ボタン */
.tcd-contact-form .contact-buttons .btn-contact-confirm,
.tcd-contact-form .contact-buttons .btn-contact-submit {
  display: inline-block;
  min-width: 220px;
  padding: 14px 60px;
  background: #008a61;
  color: #fff;
  border: 1px solid #008a61;
  font-weight: 600;
}

.tcd-contact-form .contact-buttons .btn-contact-back {
  display: inline-block;
  min-width: 160px;
  padding: 12px 40px;
  background: #fff;
  color: #008a61;
  border: 1px solid #008a61;
  margin-right: 10px;
}

.tcd-contact-form .contact-buttons .btn-contact-confirm:hover,
.tcd-contact-form .contact-buttons .btn-contact-submit:hover {
  background: #fff;
  color: #008a61;
}

.tcd-contact-form .contact-buttons .btn-contact-back:hover {
  background: #008a61;
  color: #fff;
}

/* 会社概要（ID:28）地図を少し細く・中央寄せ */
body.page-id-28 .company-map{
  max-width: 900px;   /* ← 800〜1000で好み調整 */
  margin: 0 auto 40px;
}

/* 会社概要（ID:28）スマホで表＆地図がはみ出すのを止める */
@media (max-width: 767px){

  /* ページ全体の横はみ出しを止める（このページだけ） */
  body.page-id-28 { overflow-x: hidden; }

  /* --- 表（wp-block-table） --- */
  body.page-id-28 .wp-block-table{
    overflow-x: hidden !important; /* テーマが横スクロール許可してても止める */
  }

  body.page-id-28 .wp-block-table table{
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed;
  }

  /* tdに直書きされている width:225px / 561px を無効化 */
  body.page-id-28 .wp-block-table td,
  body.page-id-28 .wp-block-table th{
    width: auto !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  /* 1列目/2列目の比率（必要なら微調整OK） */
  body.page-id-28 .wp-block-table td:first-child{ width: 34% !important; }
  body.page-id-28 .wp-block-table td:last-child { width: 66% !important; }

  /* --- 地図（company-map内のiframe） --- */
  body.page-id-28 .company-map{
    max-width: 100% !important;    /* PC用のmax-widthをスマホでは解除 */
    margin: 0 auto;
    padding: 0 16px;              /* 端にピッタリ付かないように */
    box-sizing: border-box;
  }

  body.page-id-28 .company-map iframe{
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    height: 320px;                /* 好みで 280〜380くらいで調整OK */
  }
}





/* タイトル行：崩れ防止 */
.p-single-property-header-title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* バッジ行 */
.property-price-badge-row{
  margin: 6px 0 14px;
}

/* バッジ本体（控えめでOK、まず正常化） */
.property-price-badge-row .badge-price-changed{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 10px;
  border-radius: 9999px;
  background: #f2fbf5;
  border: 1px solid #d9efe2;
  color: #145a32;
  white-space: nowrap;
}

.property-price-badge-row .badge-price-changed::before{
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1db954;
  display: inline-block;
}


.c-realty-meta-line small {
  white-space: nowrap;
}
