/* Find the FOX!! フィルター機能のスタイル (アコーディオン版) */

/* ページ幅の統一 - BizVektorテーマのcontentInnerに合わせる */
#fox-filter-container,
#fox-results-container {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

#fox-filter-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

/* 検索モード切り替え */
.filter-mode-switch {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 2px solid #e67e22;
    border-radius: 5px;
    text-align: center;
}

.filter-mode-switch label {
    display: inline-block;
    margin: 0 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

.filter-mode-switch input[type="radio"] {
    margin-right: 5px;
    transform: scale(1.2);
}

/* フィルターセクション */
.filter-section {
    margin-bottom: 25px;
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.filter-title {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e67e22;
    font-size: 18px;
    color: #333;
}

/* タグ検索ボックス */
.filter-search-box {
    margin-bottom: 15px;
}

#tag-search {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* アコーディオン */
#tag-accordion {
    margin-top: 15px;
}

.accordion-group {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: visible;
    background: #fff;
}

.accordion-header {
    width: 100%;
    padding: 12px 15px;
    background: #f5f5f5;
    border: none;
    border-bottom: 2px solid #e67e22;
    text-align: left;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
}

.accordion-title {
    flex: 1;
    color: #333;
}

.accordion-count {
    color: #666;
    font-size: 14px;
    margin-right: 10px;
}

.accordion-icon {
    display: none; /* 開閉アイコンを非表示 */
}

.accordion-content {
    max-height: none; /* 常時展開 */
    overflow: visible;
    display: block;
}

/* チェックボックスエリア - 横並び */
.filter-checkboxes {
    padding: 15px;
    background: #fafafa;
}

.accordion-content .filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 300px; /* グループ内でスクロール */
    overflow-y: auto;
    border: none;
}

.filter-checkbox {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    margin: 0;
    cursor: pointer;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #ddd;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-checkbox:hover {
    background: #fff3e0;
    border-color: #e67e22;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
    cursor: pointer;
}

.filter-checkbox span {
    font-size: 14px;
}

/* グループ未設定時の通知 */
.no-groups-notice {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
}

/* カテゴリーフィルター用（アコーディオンなし） */
#category-filters.filter-checkboxes {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* ボタンエリア */
.filter-buttons {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.filter-buttons .btn {
    padding: 12px 30px;
    margin: 0 10px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #e67e22;
    color: #fff;
}

.btn-primary:hover {
    background: #d35400;
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.selected-count {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

/* 検索結果エリア */
#fox-results-container {
    margin-top: 30px;
}

.fox-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #e67e22;
    font-weight: bold;
}

.results-count {
    margin-bottom: 20px;
    padding: 15px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    font-size: 16px;
}

.results-count strong {
    color: #2e7d32;
    font-size: 20px;
}

/* 検索結果グリッド */
.fox-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.fox-result-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.fox-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.fox-result-item a {
    text-decoration: none;
    color: #333;
}

.fox-result-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.fox-result-item .no-image {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.fox-result-item h4 {
    padding: 15px;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    min-height: 60px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #999;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .filter-mode-switch label {
        display: block;
        margin: 10px 0;
    }
    
    .filter-buttons .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .fox-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .fox-result-item img,
    .fox-result-item .no-image {
        height: 150px;
    }
    
    .accordion-header {
        font-size: 14px;
        padding: 12px;
    }
    
    .accordion-count {
        font-size: 12px;
    }
}
