﻿/* 3カラムレイアウト用 基本CSS */
.properties-listing {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3つの均等なカラムを作成 */
    gap: 20px; /* カラム間の隙間 */
    margin-bottom: 30px; /* ページネーションとの間隔 */
}
.property-item {
    border: 1px solid #eee;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex; /* Flexboxを使って内容を縦に配置 */
    flex-direction: column;
    background-color: #fff; /* 背景色を追加 */
}
.property-item .property-thumbnail img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    aspect-ratio: 4 / 3; /* 画像のアスペクト比を固定 (任意) */
    object-fit: cover; /* アスペクト比を保ちつつコンテナに合わせる */
}
.property-item .entry-header {
     margin-bottom: 10px;
}
.property-item .entry-title {
    font-size: 1.2em;
    margin: 0; /* デフォルトのマージンをリセット */
    line-height: 1.3;
}
.property-item .entry-title a {
    text-decoration: none;
    color: inherit; /* 親要素の色を継承 */
}

.property-item .entry-summary,
.property-item .entry-meta {
    font-size: 0.9em;
    margin-bottom: 10px;
    flex-grow: 1; /* コンテンツ部分を伸ばしてフッターを下に配置 */
    line-height: 1.5;
}
 .property-item .entry-meta p {
    margin-bottom: 5px; /* メタ情報内の段落間隔 */
    margin-top: 0;
}
.property-item .entry-meta p strong {
    margin-right: 5px; /* ラベルと値の間隔 */
}
.property-item .entry-footer {
    margin-top: auto; /* フッターをアイテムの下端に配置 */
    padding-top: 10px; /* フッター上部のスペース */
}
.property-item .read-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: #0073aa; /* ボタンの色 (テーマに合わせて変更) */
    color: #fff !important; /* 重要度を上げて文字色を白に */
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s ease; /* ホバー効果を滑らかに */
}
.property-item .read-more:hover,
.property-item .read-more:focus {
    background-color: #005a87; /* ホバー/フォーカス時の色 */
    color: #fff !important;
}

/* レスポンシブ対応 (例: 画面幅が狭い場合) */
@media (max-width: 991px) { /* Bootstrapのmdブレークポイント付近 */
    .properties-listing {
        grid-template-columns: repeat(2, 1fr); /* タブレットでは2カラム */
    }
}
@media (max-width: 575px) { /* Bootstrapのsmブレークポイント付近 */
    .properties-listing {
        grid-template-columns: 1fr; /* モバイルでは1カラム */
    }
}

/* ページネーションのスタイル (テーマのものを優先する場合が多い) */
.pagination {
    margin-top: 30px;
    clear: both; /* フロート解除 (必要であれば) */
    text-align: center; /* 中央揃え */
}
.nav-links .page-numbers {
    display: inline-block; /* 横並びにする */
    padding: 8px 12px; /* パディング調整 */
    border: 1px solid #ccc;
    margin: 0 3px; /* ボタン間のマージン */
    text-decoration: none;
    color: #0073aa; /* リンク色 */
    border-radius: 4px; /* 角丸 */
    transition: background-color 0.3s ease, color 0.3s ease;
}
.nav-links .page-numbers:hover,
.nav-links .page-numbers:focus {
    background-color: #f0f0f0; /* ホバー時の背景色 */
    color: #005a87;
}
.nav-links .page-numbers.current {
    background-color: #0073aa; /* 現在のページ */
    color: #fff;
    border-color: #0073aa;
    cursor: default;
}
.nav-links .dots {
    padding: 8px 5px;
    border: none;
}

/* フロントエンド地図 */
.sre-property-map {
    /* height はショートコード属性で設定されるため、ここでは指定しない */
    width: 100%;
    border: 1px solid #ccc;
    margin-bottom: 1em;
}

/* === 管理画面の地図表示スタイル (セレクタ強化 + max-height) === */
/* メタボックス(#sre_property_details) の中の #sre_map_canvas を指定 */
#sre_property_details #sre_map_canvas {
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    box-sizing: border-box !important; /* 念のためbox-sizingを指定 */
    width: 100% !important;
    height: 250px !important; /* 希望の高さを指定 */
    max-height: 250px !important; /* 最大の高さを指定 */
    border: 1px solid #ccc;
    background-color: #eee;
    margin-top: 10px;
    overflow: hidden !important;
}
/* ============================================ */

/* 管理画面のメタボックステーブル */
.sre-meta-box-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.sre-meta-box-table th,
.sre-meta-box-table td {
    text-align: left;
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: top;
}
/* 地図を含む可能性のあるtdのスタイルを調整 */
#sre_property_details .sre-meta-box-table td {
     /* もし親がFlexboxなら、アイテムが伸びないように設定 */
     /* align-self: flex-start; */ /* 必要に応じてコメント解除 */
}

.sre-meta-box-table th {
    width: 120px;
    background-color: #f9f9f9;
}
.sre-meta-box-table input[type="text"],
.sre-meta-box-table input[type="number"],
.sre-meta-box-table input[type="month"] {
    width: 95%;
    max-width: 300px;
}
.sre-meta-box-table span {
    font-size: 0.9em;
    color: #666;
    display: block;
    margin-top: 4px;
}
.sre-map-controls {
    margin-top: 5px;
}
