/* 📌 フィルターコンテナ（全体） - 横並び重視でコンパクト */
.persona-filter-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px 16px 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
}

/* 背景装飾を削除 */
.persona-filter-container::before {
    display: none;
}

/* フィルターヘッダー - シンプル化 */
.persona-filter-container::after {
    content: "🔍 絞り込み";
    position: absolute;
    top: -18px;
    left: 16px;
    background: #fff;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    z-index: 2;
}

/* フィルターグリッドレイアウト - 横並び最優先 */
.persona-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

/* 📌 ラベルとセレクトボックスをグループ化 - インライン&コンパクト */
.persona-filter-group {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.persona-filter-group:hover {
    border-color: #007bff;
    box-shadow: 0 1px 4px rgba(0,123,255,0.15);
}

/* 📌 ラベルのスタイル - インライン */
.persona-filter-label {
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.persona-filter-label::before {
    display: none;
}

.persona-filter-label::after {
    display: none; /* コロンを削除 */
}

/* 📌 セレクトボックス - コンパクト&インライン */
.persona-filter-container select {
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    background: #fff;
    color: #495057;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    max-width: 150px;
}

/* 📌 セレクトボックスのホバー時 */
.persona-filter-container select:hover {
    border-color: #007bff;
}

/* 📌 セレクトボックスのフォーカス時 */
.persona-filter-container select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* セレクトボックスの選択済み状態 */
.persona-filter-container select:not([value=""]) {
    background-color: #e3f2fd;
    border-color: #007bff;
    color: #0056b3;
    font-weight: 500;
}

/* 📌 画面サイズが狭くなったら調整 */
@media (max-width: 768px) {
    .persona-filter-container {
        gap: 6px;
        padding: 10px 12px;
    }
    
    .persona-filter-group {
        padding: 3px 6px;
        gap: 4px;
    }
    
    .persona-filter-container select {
        min-width: 70px;
        max-width: 120px;
        font-size: 12px;
    }
    
    .persona-filter-container::after {
        left: 12px;
        font-size: 12px;
        padding: 2px 6px;
    }
}

/* 📌 さらに狭くなったら縦積み */
@media (max-width: 500px) {
    .persona-filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 8px 10px;
    }
    
    .persona-filter-group {
        justify-content: space-between;
        padding: 4px 8px;
    }
    
    .persona-filter-container select {
        min-width: auto;
        max-width: none;
        flex: 1;
    }
}

/* 📌 結果数のスタイル（シンプルテキスト版） */
.persona-result-count {
    color: #495057;
    padding: 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
    white-space: nowrap;
    background: none;
}

.persona-result-count::before {
    content: "📊";
    font-size: 11px;
}

/* リセットボタンのスタイル - インライン版 */
.persona-reset-button {
    background: #dc3545;
    border: none;
    border-radius: 3px;
    color: white;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.persona-reset-button::before {
    content: "🔄";
    margin-right: 3px;
    font-size: 12px;
}

.persona-reset-button:hover {
    background: #c82333;
}

.persona-reset-button:active {
    background: #bd2130;
}

/* リセットボタンコンテナのスタイル */
.persona-filter-controls {
    margin: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* 📌 スライダーフィルター関連のスタイル - インライン版 */
.persona-slider-group {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.persona-slider-group:hover {
    border-color: #007bff;
    box-shadow: 0 1px 4px rgba(0,123,255,0.15);
}

.persona-slider-label {
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.persona-slider-label::before {
    display: none;
}

.persona-slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 150px;
}

.persona-slider-input {
    flex-grow: 1;
    height: 3px;
    background: #e9ecef;
    outline: none;
    border-radius: 2px;
    cursor: pointer;
    min-width: 80px;
}

.persona-slider-input::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: #007bff;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.persona-slider-input::-webkit-slider-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.persona-slider-input::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #007bff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    transition: all 0.2s ease;
}

.persona-slider-input:hover {
    background: #dee2e6;
}

.persona-slider-value {
    min-width: 50px;
    text-align: center;
    padding: 2px 6px;
    background: #007bff;
    color: white;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.persona-slider-range {
    display: none; /* 横並び時は範囲表示を非表示 */
}

/* モバイル時のスライダー調整 */
@media (max-width: 500px) {
    .persona-slider-group {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 8px;
    }
    
    .persona-slider-container {
        min-width: auto;
    }
    
    .persona-slider-range {
        display: flex; /* モバイル時は範囲表示を復活 */
        justify-content: space-between;
        margin-top: 4px;
        color: #6c757d;
        font-size: 10px;
    }
}

/* アニメーション効果を削除（シンプル化） */
.persona-filter-group {
    animation: none;
}

/* ローディング状態のスタイル - シンプル化 */
.persona-filter-loading {
    opacity: 0.6;
    pointer-events: none;
}

.persona-filter-loading::after {
    display: none;
}

/* 📌 チェックボックスフィルター関連のスタイル */
.persona-checkbox-group {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%; /* 横幅いっぱいに変更 */
    max-width: none; /* 最大幅の制限を解除 */
}

.persona-checkbox-group:hover {
    border-color: #007bff;
    box-shadow: 0 1px 4px rgba(0,123,255,0.15);
}

.persona-checkbox-label {
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 4px;
}

.persona-checkbox-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    max-height: none;
    overflow-y: visible;
}

.persona-checkbox-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer; /* クリック可能であることを示す */
    min-width: fit-content;
}

.persona-checkbox-input {
    display: none; /* チェックボックスの実際の表示を非表示にする */
}

.persona-checkbox-item:hover {
    background: #e3f2fd;
    border-color: #007bff;
}

.persona-checkbox-item-label {
    font-size: 11px;
    color: #495057;
    cursor: pointer;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.persona-checkbox-item-label:hover {
    color: #007bff;
}

/* チェックボックスの選択状態 */
.persona-checkbox-input:checked + .persona-checkbox-item-label {
    color: #007bff;
    font-weight: 500;
}

.persona-checkbox-item:has(.persona-checkbox-input:checked) {
    background: #e3f2fd;
    border-color: #007bff;
}

/* モバイル時のチェックボックス調整 */
@media (max-width: 768px) {
    .persona-checkbox-group {
        width: 100%;
        max-width: none;
        padding: 6px 10px;
    }
    
    .persona-checkbox-container {
        gap: 6px;
    }
    
    .persona-checkbox-item {
        padding: 4px 8px;
    }
    
    .persona-checkbox-item-label {
        font-size: 12px;
    }
}

@media (max-width: 500px) {
    .persona-checkbox-group {
        width: 100%;
        padding: 4px 8px;
    }
    
    .persona-checkbox-container {
        gap: 4px;
    }
    
    .persona-checkbox-item {
        padding: 3px 6px;
    }
    
    .persona-checkbox-item-label {
        font-size: 12px;
    }
}
