/* 基本的なリセットとフォント設定 */
body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f4f7f6;
}

/* 全体のコンテナ */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ヘッダー */
.site-header {
    background-color: #333;
    color: white;
    padding: 10px 20px;
}
.site-header h1 a {
    color: white;
    text-decoration: none;
}

/* メインエリアのラッパー（サイドバーとコンテンツを囲む） */
.main-wrapper {
    display: flex;
    gap: 20px;
    padding: 20px;
}

/* サイドバー */
.sidebar {
    flex: 0 0 250px; /* 幅を250pxで固定 */
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
}

/* メインコンテンツ */
.main-content {
    flex-grow: 1; /* 残りの幅をすべて使用 */
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
}

/* フッター */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    font-size: 0.9em;
    color: #777;
}

        /* 抽出フォームとメッセージ表示用の簡易スタイルを追加 */
        .submission-section { margin-bottom: 2em; }
        .submission-section form { display: flex; gap: 10px; }
        .submission-section input[type="text"] { flex-grow: 1; padding: 8px; font-size: 1em; }
        .submission-section button { padding: 8px 15px; }
        .message-area { margin-top: 1em; padding: 1em; border-radius: 5px; }
        .message-area .success { background-color: #e6ffed; border: 1px solid #b7e1cd; color: #00642e; }
        .message-area .error { background-color: #fff0f0; border: 1px solid #f6b6b6; color: #c80000; }
        
        /* お知らせ欄のスタイル */
        .notification-section { margin-bottom: 2em; }
        .notification-columns { display: flex; gap: 20px; }
        .notification-column { flex: 1; }
        .notification-column ul { list-style-type: none; padding-left: 0; }
        
        /* 物件一覧のスタイル */
        .property-item { border: 1px solid #ddd; border-radius: 5px; margin-bottom: 1em; overflow: hidden; }
        .property-header { background-color: #f7f7f7; padding: 0.5em 1em; font-weight: bold; display: flex; justify-content: space-between; }
        .property-body { padding: 1em; }
        .property-body p { margin: 0.5em 0; }
        .property-footer { background-color: #f7f7f7; padding: 0.5em 1em; text-align: right; }
        .details-link, .source-link { text-decoration: none; padding: 5px 10px; border-radius: 3px; }
        .details-link { background-color: #007bff; color: white; }
        .source-link { background-color: #6c757d; color: white; }


/* 詳細ページ用の簡易スタイル */
    .detail-table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
    .detail-table th, .detail-table td { border: 1px solid #ddd; padding: 0.8em; text-align: left; }
    .detail-table th { background-color: #f7f7f7; width: 25%; }
    .detail-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #333; margin-bottom: 1em; padding-bottom: 0.5em; }
    .detail-section { margin-bottom: 2em; }
    .image-gallery { display: flex; flex-wrap: wrap; gap: 10px; }
    .image-gallery img { width: 150px; height: 150px; object-fit: cover; border: 1px solid #ccc; border-radius: 4px; }
    .pdf-link a { text-decoration: none; color: #d33; font-weight: bold; }
    .inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form input[type="text"] { flex-grow: 1; padding: 5px; }
.memo-display { white-space: pre-wrap; background-color: #f9f9f9; border: 1px solid #eee; padding: 1em; margin-bottom: 1em; min-height: 50px; }
.memo-form textarea { width: 100%; padding: 0.5em; margin-bottom: 0.5em; box-sizing: border-box; }


/* Dropzoneと削除ボタンのスタイル */
.dropzone { border: 2px dashed #0087F7; border-radius: 5px; background: white; }
.file-item { position: relative; display: inline-block; margin: 5px; }
.file-item button {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 25px;
    height: 25px;
    font-weight: bold;
    line-height: 25px;
    text-align: center;
    padding:0;
    opacity: 0;
    transition: opacity 0.2s;
}
.file-item:hover button { opacity: 1; }


/* --- 物件一覧レイアウト（最終修正版） --- */
.property-list {
    font-size: 14px;
}

.property-item {
    display: flex;
    align-items: flex-start; /* 子要素を上揃えに */
    gap: 15px; /* 要素間のスペース */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 1em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0; /* 縮まないようにする */
}
.thumbnail.no-image {
    background-color: #f0f0f0;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.property-info {
    flex-grow: 1; /* 横幅の残りスペースを全て埋める */
    min-width: 0; /* テキストがはみ出すのを防ぐ */
}

.info-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.info-body p {
    margin: 4px 0;
    color: #555;
    line-height: 1.5;
}
.info-body p strong {
    color: #111;
}
.info-body p b {
    color: red;
    font-size:1.15em;
}

.item-actions {
    margin-left: auto; /* これがボタンを右端に配置するキーポイント */
    flex-shrink: 0; /* ボタンが縮まないようにする */
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-actions a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    border: 1px solid transparent;
    font-size: 13px;
    white-space: nowrap; /* ボタン内の文字が改行しないように */
}

.item-actions .details-link {
    background-color: #007bff;
    color: white;
}
.item-actions .source-link {
    background-color: #6c757d;
    color: white;
}

/* --- 抽出サイトリンカーモーダル用のスタイル --- */
.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
}
.action-btn { /* ボタンの共通スタイル */
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}
.modal-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.linker-controls { display: flex; gap: 10px; margin-bottom: 10px; }
.linker-controls select { padding: 8px; flex-grow: 1; border: 1px solid #ccc; border-radius: 4px; }
.linker-status { padding: 8px; background: #f0f8ff; border: 1px solid #d1eaff; border-radius: 4px; margin-bottom: 10px; font-size: 14px; text-align: center; }
.linker-iframe-wrapper { flex-grow: 1; border: 1px solid #ccc; }
#siteIframe { width: 100%; height: 100%; border: none; }
.linker-transfer { margin-top: 15px; display: flex; gap: 10px; align-items: center; }
.linker-transfer p { margin: 0; font-size: 12px; color: #555; flex-shrink: 0; }
.linker-transfer input { flex-grow: 1; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
.linker-transfer button { white-space: nowrap; }


.item-actions .delete-link {
    background-color: #dc3545; color: white; width: 100%;
    padding: 8px 16px; text-decoration: none; border-radius: 4px;
    text-align: center; border: 1px solid transparent; font-size: 13px;
    cursor: pointer;
}


.detail-header { display: flex; justify-content: space-between; align-items: center; }
.header-actions { display: flex; gap: 15px; align-items: center; }
.header-actions .delete-link { background-color: #dc3545; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; }


.search-form .form-group { margin-bottom: 12px; }
.search-form label { font-weight: bold; font-size: 13px; display: block; margin-bottom: 4px; }
.search-form input, .search-form select { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.search-form .date-range, .search-form .price-range { display: flex; align-items: center; gap: 5px; }
.search-form .search-btn { width: 100%; padding: 10px; background-color: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 10px; }
.search-form .search-btn:hover { background-color: #0056b3; }

.notification-columns.three-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.notification-column h3 { font-size: 1em; border-bottom: 2px solid #eee; padding-bottom: 8px; margin-top: 0;}
.notification-column ul { list-style-type: none; padding: 0; margin: 0; }
.notification-column li { margin-bottom: 8px; font-size: 14px; }
.notification-columns.four-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }


.bid-status { margin-top: 8px; font-size: 13px; }
.winning-price .price-val { color: #dc3545; font-size: 1.25em; }
.winning-price .diff { font-size: 0.9em; }
.winning-price .diff.plus { color: #28a745; }
.winning-price .diff.minus { color: #dc3545; }


.filter-group .checkbox-group { display: flex; gap: 15px; border-left: 1px solid #ddd; padding-left: 15px; }


.featured-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.featured-toggle .toggle-switch { width: 40px; height: 20px; background-color: #ccc; border-radius: 10px; position: relative; transition: background-color 0.2s; }
.featured-toggle .toggle-switch::before { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background-color: white; border-radius: 50%; transition: transform 0.2s; }
.featured-toggle.featured .toggle-switch { background-color: #007bff; }
.featured-toggle.featured .toggle-switch::before { transform: translateX(20px); }

.submission-form-multi { display: flex; gap: 10px; }
.submission-form-multi .input-group { display: flex; flex-direction: column; gap: 5px; flex-grow: 1; }

.linker-transfer.multi { flex-direction: column; align-items: stretch; }
.linker-transfer.multi .modal-input-group { display: flex; flex-direction: column; gap: 5px; margin: 5px 0; }

