/* ===================================
   Flexbox高さ問題の修正
   作成日: 2025-06-22
   更新日: 2025-06-22 - 高さ制限を削除
   =================================== */

/* フレックスボックスの高さ制限を削除 */
.d-flex {
    /* 高さ制限を完全に削除 */
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

/* 特定のケースでも高さ制限なし */
.navbar .d-flex,
.dropdown-menu .d-flex {
    max-height: none !important;
    overflow: visible !important;
}

/* モーダル内のFlexboxも制限なし */
.modal .d-flex,
.modal-dialog .d-flex {
    max-height: none !important;
    overflow: visible !important;
}

/* モーダル内の特定の組み合わせも制限なし */
.modal .d-flex.justify-content-between.align-items-center,
.modal-dialog .d-flex.justify-content-between.align-items-center {
    max-height: none !important;
    overflow: visible !important;
}

/* カード本体も制限なし */
.card-body .d-flex {
    max-height: none !important;
    overflow: visible !important;
}

/* align-items-centerの組み合わせも制限なし */
.d-flex.align-items-center {
    max-height: none !important;
    overflow: visible !important;
}

/* justify-content-betweenとの組み合わせも制限なし */
.d-flex.justify-content-between.align-items-center,
.d-flex.justify-content-between.align-items-start {
    max-height: none !important;
    overflow: visible !important;
}

/* DMM検索結果のヘッダーも制限なし */
#searchResults .d-flex.justify-content-between.align-items-center {
    max-height: none !important;
    overflow: visible !important;
}

/* mb-2との組み合わせも制限なし */
.d-flex.justify-content-between.align-items-start.mb-2 {
    max-height: none !important;
    overflow: visible !important;
    line-height: 1.5 !important;
}

/* フォームコントロール内のフレックスボックスも制限なし */
.form-group .d-flex,
.mb-2 .d-flex,
.mb-3 .d-flex,
.mb-4 .d-flex {
    max-height: none !important;
    overflow: visible !important;
}

/* エディタツールバーなど特定の要素は除外 */
.editor-toolbar,
.btn-toolbar,
.btn-group,
.nav,
.pagination {
    max-height: none !important;
}

/* ギャップの調整 */
.d-flex.gap-2 {
    gap: 0.5rem !important; /* 8px */
}

/* 垂直方向の余白を制御 */
.d-flex > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* デバッグ用（必要時にコメントアウトを解除） */
/*
.d-flex {
    border: 2px solid red !important;
    background-color: rgba(255, 0, 0, 0.1) !important;
}

.d-flex.align-items-center {
    border-color: blue !important;
    background-color: rgba(0, 0, 255, 0.1) !important;
}
*/

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .d-flex {
        max-height: none !important;
        overflow: visible !important;
    }
    
    .d-flex.align-items-center {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* 特定の問題箇所への対応 - 2025-06-22更新 */
/* 記事編集画面内 - 高さ制限を削除 */
.card-body .d-flex.justify-content-between {
    max-height: none !important;
    overflow: visible !important;
}

/* DMM記事生成画面 - 高さ制限を完全に削除 */
#searchResults .d-flex.justify-content-between.align-items-center {
    max-height: none !important;
    overflow: visible !important;
}

/* FTPモーダル内 - 高さ制限を削除 */
.modal-content .list-group-item .d-flex.justify-content-between.align-items-center {
    max-height: none !important;
    overflow: visible !important;
}

/* カードボディの高さ制限を削除 */
.card .card-body {
    max-height: none !important;
    overflow: visible !important;
}

.card .card-body.p-2 {
    max-height: none !important; /* 高さ制限を完全に削除 */
    overflow: visible !important;
}