/* 作者フィルタリング用スタイル */
#author-filter-container {
    margin: 0 0 0 0;
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #61b3ff;
    display: flex;
    align-items: center;
}

#author-filter-container label {
    font-weight: normal;
    color: #333;
    margin-right: 10px;
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 10pt;
    line-height: 1.5;
    align-self: center;
}

/* フィルターラッパー */
.author-filter-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ドロップダウンボタン */
.author-dropdown-button {
    display: inline-block;
    padding: 4px 16px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10pt;
    min-width: 180px;
    position: relative;
}

.author-dropdown-button:hover {
    background: #f5f5f5;
}

@media (min-width: 769px) {
    .author-dropdown-button::after {
        content: '▼';
        position: absolute;
        right: 10px;
        font-size: 9px;
        color: #666;
    }
}

/* リセットボタン */
.author-reset-button {
    display: inline-block;
    padding: 4px 16px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10pt;
}

.author-reset-button:hover {
    background: #e0e0e0;
}

/* ドロップダウンメニュー */
.author-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 250px;
    max-height: 300px;
    overflow-y: auto;
}

.author-dropdown-menu.open {
    display: block;
}

/* 検索ボックス */
.author-search-box {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.author-search-box input {
    width: calc(100% - 8px);
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

/* チェックボックスリスト */
.author-checkbox-list {
    padding: 5px 0;
}

.author-checkbox-item {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 32px;
}

.author-checkbox-item:hover {
    background: #f5f5f5;
}

.author-checkbox-item input[type="checkbox"] {
    margin: 0 8px 0 0;
    cursor: pointer;
    flex-shrink: 0;
    vertical-align: middle;
}

.author-checkbox-item label {
    cursor: pointer;
    margin: 0;
    padding: 0;
    font-weight: normal;
    flex: 1;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

/* 選択された作者のタグ表示 */
.author-selected-tags {
    display: inline-flex;
    flex-wrap: wrap;
    margin-left: 10px;
    margin-top: 0;
    align-items: center;
    vertical-align: middle;
}

.author-tag {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    margin: 2px;
    font-size: 13px;
}

.author-tag-remove {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
}

.author-tag-remove:hover {
    color: #ffcccc;
}

/* 作者フィルタと他のフィルタの調整 */
#checkbox {
    margin-bottom: 5px;
}

#author-filter-container + * {
    margin-top: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    /* コンテナを横並びに */
    #author-filter-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        padding: 6px 8px 2px 8px !important;
        margin: 0 0 0 0 !important;
    }

    /* ラベル */
    #author-filter-container label {
        flex-shrink: 0;
        margin: 0;
        padding: 0;
        font-size: 12px;
        white-space: nowrap;
    }

    /* ボタンラッパー */
    .author-filter-wrapper {
        display: flex;
        flex-direction: row;
        flex: 1;
        gap: 6px;
        min-width: 0;
        margin: 0;
    }

    /* プルダウンボタン */
    .author-dropdown-button {
        flex: 0 0 auto;
        width: 160px;
        min-width: 0;
        padding: 6px 8px;
        margin: 0;
        font-size: 13px;
        height: auto;
        line-height: 1.2;
    }

    /* リセットボタン */
    .author-reset-button {
        flex-shrink: 0;
        padding: 6px 12px;
        margin: 0;
        font-size: 13px;
        height: auto;
        line-height: 1.2;
        white-space: nowrap;
    }

    /* ドロップダウンメニュー */
    .author-dropdown-menu {
        width: auto;
        min-width: 200px;
        max-width: 200px;
        max-height: 240px;
        left: auto;
        right: auto;
    }

    /* プルダウンの項目を小さく */
    .author-checkbox-item {
        padding: 5px 15px;
        min-height: 22px;
    }

    .author-search-box {
        padding: 8px;
    }

    .author-search-box input {
        padding: 5px 8px;
        font-size: 16px;
    }

    /* タグは次の行 */
    .author-selected-tags {
        width: 100%;
        margin-left: 0;
        margin-top: 0;
        min-height: 0;
    }

    .author-selected-tags:not(:empty) {
        margin-top: 6px;
    }
}