/* css/genre-search.css */
.genre-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px; /* コンテナ自体のパディング */
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* === モーダル外 (通常のジャンル検索ページ) の h3 スタイル === */
/* .dmm-genre-heading クラスを持つ h3 にスタイルを適用 */
body:not(.modal-open) .genre-search-container > h3.dmm-genre-heading {
    color: var(--text-color) !important;
    text-align: left !important;
    background-color: transparent !important;
    padding-top: 10px !important;
    padding-bottom: 8px !important;
    padding-left: 10px !important;
    padding-right: 0 !important;
    border-bottom: 1px solid #eee !important;
    margin-top: 40px !important;         /* 上のスペースを十分に確保 */
    margin-bottom: 5px !important;        /* 下のスペースを小さく */
    font-size: 1.1em !important;
    font-weight: bold !important;
    line-height: 1.5 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* モーダル外の最初のh3要素の上のマージンを少し小さくする */
body:not(.modal-open) .genre-search-container > h3.dmm-genre-heading:first-of-type {
    margin-top: 25px !important; /* 通常ページの最初のh3の上のマージン */
}


/* 各カテゴリー内のジャンルリストのコンテナ (モーダル内外共通) */
/* h3.dmm-genre-heading の直後の .checkbox-grid に適用される想定 */
.genre-search-container h3.dmm-genre-heading + .checkbox-grid {
    margin-top: 5px; /* h3 との間のスペースを調整（h3のmargin-bottomと合わせて） */
}
.genre-search-container .checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px; /* 次のh3との間のスペース */
}

/* ジャンルチェックボックスのラベル (モーダル内外共通) */
.genre-search-container .checkbox-grid label {
    font-size: 0.9em;
    margin: 0;
    padding: 2px 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: inline-block;
    cursor: pointer;
}

.genre-search-container .checkbox-grid label:hover {
    background-color: #f0f0f0;
}

/* リセットボタンのスタイル (モーダル内外共通) */
.reset-button {
    background-color: #aaa;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.reset-button:hover {
    background-color: #888;
    transform: translateY(-2px);
}


/* === モーダル内の h3 スタイル === */
/* .dmm-genre-heading クラスを持つ h3 にスタイルを適用 */
body .dmm-plugin-modal-content .genre-search-container h3.dmm-genre-heading {
    color: var(--text-color) !important;
    text-align: left !important;
    background-color: transparent !important;
    padding-top: 10px !important;
    padding-bottom: 8px !important;
    padding-left: 10px !important;
    padding-right: 0 !important;
    border-bottom: 1px solid #eee !important;
    margin-top: 30px !important;         /* 上のスペースを確保 */
    margin-bottom: 5px !important;        /* 下のスペースを小さく */
    font-size: 1.1em !important;
    font-weight: bold !important;
    line-height: 1.5 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* モーダル内の最初のカテゴリ見出し(h3)の上のマージンを調整 */
body .dmm-plugin-modal-content .genre-search-container > h3.dmm-genre-heading:first-child {
    margin-top: 20px !important; /* モーダル内の最初のh3の上のマージン */
}

/* --- ★★★ 新しく追加した「おすすめジャンル」下のボタン用のスタイル ★★★ --- */
.genre-search-container .search-buttons.recommended-buttons {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 20px; /* 他のセクションとの間に十分なスペースを確保 */
    padding-top: 10px; /* 上部に少しパディング */
    border-top: 1px dashed #ccc; /* 上に区切り線を追加 (任意) */
}

.genre-search-container .search-buttons.recommended-buttons button {
    /* 既存の検索ボタンのスタイルを継承または個別に設定 */
    padding: 10px 20px; /* パディングを調整 */
    margin: 0 5px; /* ボタン間のマージン */
    font-size: 1em; /* フォントサイズ */
    border-radius: var(--border-radius); /* 角丸 */
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    font-weight: var(--font-weight-bold);
}

/* おすすめジャンル下の「適用」ボタンの具体的なスタイル */
.genre-search-container .search-buttons.recommended-buttons #dmm-genre-search-apply-button-recommended {
    background-color: var(--search-color); /* shared.css の変数を使用 */
    color: #fff;
    border: none;
}

.genre-search-container .search-buttons.recommended-buttons #dmm-genre-search-apply-button-recommended:hover {
    background-color: #2c8f45; /* ホバー時の色を少し暗く */
    transform: translateY(-2px);
}

/* フォーム全体の検索ボタンコンテナのスタイル (既存) */
.genre-search-container .search-buttons:not(.recommended-buttons) { /* :not で recommended-buttons を除外 */
    text-align: center;
    margin-top: 20px;
}

/* フォーム全体の検索ボタンのスタイル (既存) */
.genre-search-container .search-buttons:not(.recommended-buttons) button {
    /* 既存の検索ボタンのスタイル */
    padding: 12px 24px;
    margin: 0 var(--spacing-small);
    font-size: 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    font-weight: var(--font-weight-bold);
}

.genre-search-container .search-buttons:not(.recommended-buttons) button[type="submit"] {
    background-color: var(--search-color);
    color: #fff;
}

.genre-search-container .search-buttons:not(.recommended-buttons) button[type="submit"]:hover {
    background-color: #2c8f45; /* 少し暗い色に変更 */
    transform: translateY(-2px);
}

