/* static/css/custom.css */

/* =========================== */
/* 基本レイアウト */
/* =========================== */
html, body {
    height: 100%;
    font-family: Meiryo, 'メイリオ', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* 背景色設定 */
    background-color: #F9F7F5; /* 薄いベージュ */
    color: #333333; /* ダークグレー文字 */
}

.content {
    flex: 1;
}

footer {
    margin-top: auto;
}

/* =========================== */
/* ヘッダー・フッターの背景色 */
/* =========================== */

/* ナビゲーションバーのスタイル調整 */
.navbar-info {
    background-color: #2C2C2C !important; /* ダークグレー */
}

.navbar-info .navbar-brand,
.navbar-info .nav-link,
.navbar-info .navbar-text {
    color: #FFFFFF !important;
}

.navbar-info .nav-link:hover {
    color: #E0E0E0 !important;
}

.navbar-info .btn-outline-light {
    border-color: #FFFFFF;
    color: #FFFFFF;
}

.navbar-info .btn-outline-light:hover {
    background-color: #FFFFFF;
    color: #2C2C2C;
}

/* フッターのスタイル調整 */
.bg-info {
    background-color: #2C2C2C !important; /* ダークグレー */
}

/* フッターの文字色を明示的に指定 */
footer.bg-info {
    background-color: #2C2C2C !important;
    color: #FFFFFF !important;
}

footer.bg-info p {
    color: #FFFFFF !important;
}

/* =========================== */
/* ナビゲーションバーの中央揃え調整 */
/* =========================== */

/* ナビゲーションバー全体の高さとアライメント */
.navbar {
    min-height: 60px;
}

.navbar .container {
    align-items: center;
}

/* ナビゲーションアイテムの中央揃え */
.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin: 0;
}

/* ブランドロゴの中央揃え */
.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

/* 設定ボタンの中央揃え */
.navbar .btn-outline-light {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    margin-left: 0.5rem;
}

/* =========================== */
/* コンポーネントのスタイル調整 */
/* =========================== */

/* カードの背景色を白に保つ */
.card {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* テーブルの背景色を白に保つ */
.table {
    background-color: #ffffff;
    color: #333333;
}

/* フォーム要素の背景色 */
.form-control,
.form-select {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #CCCCCC;
}

/* モーダルの背景色 */
.modal-content {
    background-color: #ffffff;
    color: #333333;
}

/* =========================== */
/* カスタムボタンスタイル */
/* =========================== */
.btn-primary {
    background-color: #4C5BAA;
    border-color: #4C5BAA;
    color: #FFFFFF !important;
}

.btn-primary:hover {
    background-color: #3A4688;
    border-color: #3A4688;
    color: #FFFFFF !important;
}

.btn-secondary {
    background-color: #6C757D;
    border-color: #6C757D;
    color: #FFFFFF !important;
}

.btn-secondary:hover {
    background-color: #5A6268;
    border-color: #545B62;
    color: #FFFFFF !important;
}

/* ===== 物件アクションボタンのスタイル（正しいセレクター版） ===== */

/* アクションボタンコンテナ */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

/* 詳細を見るボタン */
.action-buttons .btn-outline-secondary {
    width: 100%;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid #6c757d;
    color: #6c757d;
    background-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease-in-out;
    border-radius: 0.375rem;
    box-sizing: border-box;
}

.action-buttons .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

/* 内見希望・資料請求ボタンコンテナ */
.property-actions-group {
    display: flex;
    width: 100%;
    gap: 0.25rem;
    box-sizing: border-box;
}

/* 内見希望・資料請求ボタン（複数のクラスセレクターを使用） */
.property-action-btn,
.request-btn,
button.property-action-btn.request-btn {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 0.375rem 0.75rem !important; /* 詳細ボタンと同じパディング */
    font-size: 0.875rem !important; /* 詳細ボタンと同じフォントサイズ */
    font-weight: normal !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border: 1px solid #6c757d !important; /* 詳細ボタンと同じ薄いグレー */
    color: #6c757d !important; /* 詳細ボタンと同じ文字色 */
    background-color: transparent !important;
    transition: all 0.15s ease-in-out !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    border-radius: 0.375rem !important;
    box-sizing: border-box !important;
    height: auto !important;
}

/* ホバー時のスタイル（未押下時のみ） */
.property-action-btn:hover:not(.pressed),
.request-btn:hover:not(.pressed),
button.property-action-btn.request-btn:hover:not(.pressed) {
    background-color: #6c757d !important;
    color: white !important;
    border-color: #6c757d !important;
}

/* 押下済み状態のスタイル */
.property-action-btn.pressed,
.request-btn.pressed,
button.property-action-btn.request-btn.pressed {
    background-color: #6c757d !important;
    color: white !important;
    border-color: #6c757d !important;
}

/* 押下済み状態でのホバー効果を維持 */
.property-action-btn.pressed:hover,
.request-btn.pressed:hover,
button.property-action-btn.request-btn.pressed:hover {
    background-color: #6c757d !important;
    color: white !important;
    border-color: #6c757d !important;
}

/* レスポンシブ対応 */
@media (max-width: 576px) {
    .property-action-btn,
    .request-btn,
    button.property-action-btn.request-btn {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    .action-buttons .btn-outline-secondary {
        font-size: 0.8rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}
/* =========================== */
/* テーブルのスタイル改善 */
/* =========================== */
.table-responsive {
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead th {
    background-color: #2C2C2C;
    color: #FFFFFF;
    border-bottom: 2px solid #dee2e6;
}

/* =========================== */
/* アラートのスタイル調整 */
/* =========================== */
.alert {
    border-radius: 0.375rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    color: #333333;
}

/* =========================== */
/* フォームのスタイル改善 */
/* =========================== */
.form-control:focus,
.form-select:focus {
    border-color: #4C5BAA;
    box-shadow: 0 0 0 0.2rem rgba(76, 91, 170, 0.25);
}

/* =========================== */
/* メッセージ・コンテナの調整 */
/* =========================== */
.container {
    color: #333333; /* コンテナ内は黒文字 */
}

/* メインコンテンツの文字色 */
body {
    color: #333333;
}

/* =========================== */
/* ナビゲーションの追加調整 */
/* =========================== */
.navbar-toggler {
    border-color: #FFFFFF;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =========================== */
/* バッジのスタイル調整 */
/* =========================== */
.badge {
    color: #FFFFFF;
}

.badge.bg-secondary {
    background-color: #6C757D !important;
}

.badge.bg-success {
    background-color: #28A745 !important;
}

.badge.bg-info {
    background-color: #17A2B8 !important;
}

.badge.bg-warning {
    background-color: #FFC107 !important;
    color: #212529 !important;
}

.badge.bg-danger {
    background-color: #DC3545 !important;
}

/* =========================== */
/* その他のユーティリティ */
/* =========================== */
.shadow-sm-custom {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.border-radius-custom {
    border-radius: 0.375rem !important;
}

/* =========================== */
/* リンクの色調整 */
/* =========================== */
a {
    color: #4C5BAA; /* 紫系のリンク色 */
}

a:hover {
    color: #3A4688; /* ホバー時はより濃い紫 */
}

/* カード内のリンクは統一 */
.card a {
    color: #4C5BAA;
}

.card a:hover {
    color: #3A4688;
}

/* =========================== */
/* レスポンシブ対応 */
/* =========================== */
@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 0.5rem;
    }

    .navbar-nav {
        align-items: flex-start;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    body {
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .action-buttons .property-actions-group .property-action-btn {
        font-size: 0.65rem;
        padding: 0.25rem 0.1rem;
    }

    .action-buttons .btn-outline-secondary {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}