/* メンバー詳細ページのスタイル */
.main-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.main-header {
  position: sticky;
  top: 0;
  background-color: #F1EDE7;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.member-detail-main-body {
    padding: 20px;
    background-color: #fff;
    flex: 1;
    overflow-y: auto;
    border-radius: 0 0 20px 20px;
}

.member-info {
    margin-bottom: 20px;
}

.member-info h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333; /* 名前の色 */
}

.member-info p {
    margin: 5px 0;
    font-size: 16px;
}

.button-group {
    display: flex;
    justify-content: space-between; /* ボタンを左右に配置 */
    margin-bottom: 20px; /* ボタンとテーブルの間にスペースを追加 */
    align-items: center; /* ボタンを縦方向中央揃え */
}

.button-group .button:last-child {
    margin-right: 0; /* 最後のボタンの右マージンを削除 */
}

.button {
    background-color: #d9d8d8; /* ボタンの背景色 */
    color: #333333;
    padding: 10px 15px; /* 上下のパディングを設定 */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-right: 10px;
}

.button:hover {
    color: white;
    background-color: #0AA273; /* ホバー時の色 */
}

/* アクティブなボタンのスタイル */
.button.active {
    background-color: #0AA273; /* 緑色 */
    color: white;
    font-weight: bold;
}

/* メンバー詳細ページのテーブルスタイル */
.member-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #fff; /* テーブルの背景色を白に設定 */
    border-top: 2px solid #ddd; /* テーブル全体の上に枠線を追加 */
}

.member-detail-table th, 
.member-detail-table td {
    padding: 16px; /* パディングを広げる */
    text-align: left;
}

.member-detail-table th {
    background-color: #fff; /* ヘッダーの背景色を白に設定 */
    color: #333; /* ヘッダーの文字色 */
    font-weight: bold; /* 太字に設定 */
    width: 180px; /* 幅を170pxに固定 */
    border-bottom: 2px solid #ddd; /* ヘッダーの下に枠線を追加 */
}

.member-detail-table td {
    border: none; /* データの枠線を削除 */
    border-bottom: 2px solid #ddd; /* データの下に枠線を追加 */
}

.member-detail-table input {
    width: 100%;
    padding: 5px;
    box-sizing: border-box; /* パディングを含めた幅の計算 */
    border: 1px solid #ddd; /* フォームの枠線を薄いグレーに設定 */
    border-radius: 4px; /* フォームの角を丸くする */
}

/* PC表示幅での入力フォーム幅制限 */
@media screen and (min-width: 1001px) {
    .member-detail-table input {
        width: 60%;
    }
}

.property-selection select {
    margin-right: 10px;
}

.delete-button-container {
    text-align: right;
}

.delete-button {
    margin-top: 20px;
    padding: 10px 20px; /* 上下のパディングを10px、左右のパディングを20pxに設定 */
    background-color: #d9d8d8; /* ボタンの背景色 */
    color: #333333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

.delete-button:hover {
    background-color: red; /* ホバー時の色 */
    color: white;
}

/* 物件ハイライト用のスタイル */
.highlight-property {
    background-color: rgba(146, 113, 189, 0.2) !important;
    transition: background-color 0.5s ease;
}

/* クリック可能な行 */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clickable-row:hover {
    background-color: #f5f5f5;
}

/* 物件詳細モーダルスタイル */
.property-info {
    margin-bottom: 20px;
}

.property-info-row {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.property-info-label {
    font-weight: bold;
    width: 170px;
    color: #333;
}

.property-info-value {
    flex: 1;
}

.property-image-container {
    margin-top: 20px;
    text-align: center;
}

.property-image-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* モーダル共通スタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal h3 {
    margin-top: 0;
    color: #0AA273;
    border-bottom: 2px solid #0AA273;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal h4 {
    color: #0AA273;
    margin-top: 20px;
    margin-bottom: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    margin-top: -10px;
}

.close:hover {
    color: #333;
}

/* 削除ボタンエリア */
.btn-area.delete {
    text-align: right;
    margin-top: 20px;
}

.delete-btn {
    background-color: #f44336;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

.delete-btn i {
    margin-right: 5px;
}

/* レスポンシブ対応 */
@media screen and (max-width: 1000px) {
    .member-detail-table th,
    .member-detail-table td,
    .button {
        font-size: 14px;
    }

    .button-group {
        flex-wrap: wrap;
        gap: 10px;
    }

    .button {
        margin-right: 0;
    }
}

@media screen and (max-width: 768px) {
    .member-detail-table {
        width: 100%;
        display: block;
    }

    .member-detail-table th,
    .member-detail-table td {
        padding: 10px;
        font-size: 13px;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .member-detail-table th {
        border-bottom: none;
        padding-bottom: 5px;
    }

    .member-detail-table td {
        padding-top: 5px;
        margin-bottom: 15px;
    }

    .member-info h3 {
        font-size: 20px;
    }

    .member-info p {
        font-size: 14px;
    }

    .button-group {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        margin-bottom: 10px;
        text-align: center;
    }

    .delete-button {
        width: 100%;
        box-sizing: border-box;
    }

    .desktop-only {
        display: none;
    }
    
    .properties-table td,
    .properties-table th {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .properties-table th.garden-size,
    .properties-table th.last-service-date {
        width: 80px;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 15px;
        max-width: 90% !important;
        width: 90%;
    }
    
    .property-info-row {
        flex-direction: column;
    }
    
    .property-info-label {
        width: 100%;
        margin-bottom: 5px;
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .property-info-value {
        width: 100%;
        padding-left: 10px;
    }

    /* 会員詳細ページ専用のモバイル表示 */
    #member-detail .main-header .return-button {
        display: none;
    }
    
    #member-detail .mobile-return-button {
        display: block;
    }
    
    #member-detail .button-group {
        display: none;
    }
    
    #member-detail .mobile-menu-container {
        display: block;
    }
}

@media screen and (max-width: 480px) {
    .member-detail-main-body {
        padding: 10px;
    }

    .member-info h3 {
        font-size: 18px;
    }

    .member-info p {
        font-size: 13px;
    }
}

/* リンクスタイル */
.property-link, .member-link, .map-link {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.property-link:hover, .member-link:hover, .map-link:hover {
    color: #003d7a;
    text-decoration: underline;
}

.map-link {
    display: flex;
    align-items: center;
}

.map-link:before {
    content: "📍";
    margin-right: 5px;
    font-size: 14px;
}

/* モバイル用メニュー */
.mobile-menu-container {
    display: none;
    width: 100%;
    margin-bottom: 15px;
}

.mobile-menu-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f5f5f5;
    font-size: 14px;
}

/* 戻るボタン（モバイル用） */
.mobile-return-button {
    display: none;
    margin-bottom: 15px;
    text-align: center;
}

.mobile-return-button a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.mobile-return-button a i {
    margin-right: 5px;
}

/* 会員アイコン関連のスタイル */
.member-icon-container {
    padding: 10px 0;
}

.member-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.member-icon-wrapper:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.member-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 0;
    text-align: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.member-icon-wrapper:hover .icon-overlay {
    opacity: 1;
}

/* アイコンアップロード中の表示 */
.uploading .member-icon-wrapper {
    opacity: 0.7;
}

.uploading::after {
    content: "アップロード中...";
    position: absolute;
    top: 50%;
    left: 120px;
    transform: translateY(-50%);
    margin-left: 15px;
    color: #0AA273;
    font-weight: bold;
}