@charset "UTF-8";

/* style */
.search-filter{
    /**
    * 企業検索 カスタムドロップダウン CSS
    * 既存の .search クラスのスタイルを継承
    */

    /* カスタムドロップダウンのベース */
    .custom-dropdown {
        position: relative;
        width: 100%;
    }
    /* ドロップダウントリガー（既存の .select-style を継承） */
    .dropdown-trigger {
        min-height: 50px;
        display: flex;
        align-items: center;
        cursor: pointer;
        position: relative;
        /* appearance, background-color, border-radius, padding などは既存の .select-style から継承 */
    }
    .dropdown-trigger:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(63, 150, 72, 0.1);
    }
    .custom-dropdown.open .dropdown-trigger {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    /* タグ表示エリア */
    .selected-tags-inline {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
        min-height: 30px;
    }
    /* プレースホルダー（既存の placeholder-color を使用） */
    .placeholder {
        color: var(--placeholder-color, #B9B9B9);
        font-size: 14px;
    }
    /* ドロップダウンの矢印（既存の .select-wrap::after を上書き） */
    .select-wrap .dropdown-arrow {
        content: ""; 
        background-image: url('../img/icons/arrow-sp-icon.svg'); /* パスは環境に合わせて調整 */
        background-repeat: no-repeat;
        background-size: contain;
        width: 10px;
        height: 12px;
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: rotate(90deg) translateX(-25%);
        pointer-events: none;
        transition: transform 0.2s;
    }
    .custom-dropdown.open .dropdown-arrow {
        transform: rotate(270deg) translateX(25%);
    }
    /* 既存の .select-wrap::after を無効化 */
    .select-wrap:has(.custom-dropdown)::after {
        display: none;
    }
    /* タグのスタイル */
    .tag {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #3F9648;
        color: white;
        padding: 4px 10px;
        border-radius: 3px;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.4;
    }
    .tag-remove {
        background: none;
        border: none;
        color: white;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        padding: 0;
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.2s;
        line-height: 1;
    }
    .tag-remove:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    /* ドロップダウンメニュー */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 2px solid #3F9648;
        border-top: none;
        border-radius: 0 0 5px 5px;
        max-height: 300px;
        overflow: hidden;
        z-index: 800;
        display: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    .custom-dropdown.open .dropdown-menu {
        display: block;
    }
    /* 検索ボックス */
    .dropdown-search {
        padding: 10px;
        border-bottom: 1px solid #eee;
        background: #fafafa;
        position: sticky;
        top: 0;
        z-index: 1;
    }
    .search-input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 3px;
        font-size: 14px;
        background-color: var(--input-bg-color, #F5F5EC);
    }
    .search-input:focus {
        outline: none;
        border-color: #0073aa;
    }
    /* オプションリスト */
    .dropdown-options {
        max-height: 240px;
        overflow-y: auto;
    }
    .dropdown-option {
        padding: 12px 15px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: background 0.2s;
        border-bottom: 1px solid #f0f0f0;
    }
    .dropdown-option:hover {
        background: #f5fcf6;
    }
    .dropdown-option[data-selected="true"] {
        background: #f5fcf6;
    }
    .dropdown-option.hidden {
        display: none;
    }
    .option-name {
        flex: 1;
        font-size: 14px;
        color: var(--font-main-color, #333);
    }
    .option-count {
        color: #999;
        font-size: 13px;
    }
    .checkmark {
        color: #0073aa;
        font-weight: bold;
        font-size: 16px;
    }
    /* フィルターセクション */
    .filter-section {
        margin-bottom: 25px;
    }
    .filter-section h3 {
        margin-bottom: 15px;
        font-size: 18px;
        color: #333;
    }
    /* ボタン */
    .filter-buttons {
        margin-top: 20px;
        display: flex;
        gap: 10px;
    }
    .btn {
        padding: 12px 24px;
        border-radius: 4px;
        text-decoration: none;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s;
        border: none;
        font-size: 16px;
    }
    .btn-primary {
        background: #3F9648;
        color: white;
    }
    .btn-primary:hover {
        background: #418652;
    }
    .btn-secondary {
        background: #fff;
        color: #333;
        border: 1px solid #ccc;
    }
    .btn-secondary:hover {
        background: #f5f5f5;
    }
    /* 選択中の条件 */
    .active-filters {
        background: #e7f3ff;
        padding: 15px 20px;
        margin-bottom: 20px;
        border-radius: 4px;
        border-left: 4px solid #3F9648;
    }
    .active-filters h4 {
        margin-top: 0;
        margin-bottom: 10px;
    }
    .active-filters ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .active-filters li {
        display: inline-block;
        margin-right: 15px;
        padding: 5px 10px;
        background: white;
        border-radius: 3px;
    }
    /* 結果表示 */
    .results-header {
        margin-bottom: 20px;
    }
    .results-count {
        font-size: 16px;
        color: #666;
    }
    .company-list {
        display: grid;
        gap: 20px;
    }
    .company-item {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 20px;
        display: grid;
        grid-template-columns: 150px 1fr;
        gap: 20px;
        transition: box-shadow 0.3s;
    }
    .company-item:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .company-thumbnail img {
        width: 100%;
        height: auto;
        border-radius: 4px;
    }
    .company-title {
        margin-top: 0;
        margin-bottom: 10px;
    }
    .company-title a {
        color: #3F9648;
        text-decoration: none;
    }
    .company-title a:hover {
        text-decoration: underline;
    }
    .company-meta {
        margin-bottom: 15px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .meta-item {
        font-size: 14px;
        color: #666;
    }
    .company-excerpt {
        margin-bottom: 15px;
        line-height: 1.6;
    }
    .read-more {
        color: #3F9648;
        text-decoration: none;
        font-weight: bold;
    }
    .read-more:hover {
        text-decoration: underline;
    }
    .no-results {
        text-align: center;
        padding: 60px 20px;
        background: #f9f9f9;
        border-radius: 8px;
    }
    /* レスポンシブ対応 */
    @media (max-width: 768px) {
        .company-item {
            grid-template-columns: 1fr;
        }
        .filter-buttons {
            flex-direction: column;
        }
        .tag {
            font-size: 12px;
            padding: 3px 8px;
        }
    }
}