/* =====================================================
   bukken 検索ページ：body背景をダークに
   ===================================================== */
body.page-template-page-bukken-search-php {
    background: #111 !important;
    color: #fff;
}

/* =====================================================
   bukken 検索フォーム トグルボタン
   ===================================================== */

#bukken-search-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    letter-spacing: 0.08em;
    color: #fff;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background 0.15s ease;
}

#bukken-search-toggle:hover {
    background: #222;
    color: #fff;
}

.bukken-toggle-icon {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
}

#bukken-search-toggle[aria-expanded="true"] .bukken-toggle-icon {
    transform: rotate(45deg);
}

/* =====================================================
   bukken 検索フォーム
   ===================================================== */

.bukken-search-form {
    background: #000;
    border: 1px solid #333;
    padding: 24px;
    margin-bottom: 32px;
}

.bukken-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: none;
}

.bukken-filter-row:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* キーワード行のみ白点線（1px点・4px間隔） */
.bukken-filter-row:has([data-taxonomy="keyword_bukken"]) {
    background-image: repeating-linear-gradient(to right, #fff 0, #fff 1px, transparent 1px, transparent 5px);
    background-size: 100% 1px;
    background-position: bottom;
    background-repeat: no-repeat;
    padding-bottom: 33px;
}

.bukken-filter-label {
    flex-shrink: 0;
    width: 110px;
    font-size: 13px;
    color: #fff;
    padding-top: 6px;
    letter-spacing: 0.05em;
}

.bukken-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* タグボタン：通常状態 */
.bukken-tag-btn {
    display: inline-block;
    padding: 5px 14px;
    font-size: 12px;
    line-height: 1.6;
    color: #fff;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

/* エリア・広さ：左上のみ斜めカット（グラデーションで枠線を描画） */
.bukken-filter-buttons[data-taxonomy="area_bukken"] .bukken-tag-btn,
.bukken-filter-buttons[data-taxonomy="size_bukken"] .bukken-tag-btn {
    border: none;
    border-radius: 0;
    background-color: transparent;
    /* clip-path は背景塗りがあるホバー時・active時のみ適用する */
    background-image:
        linear-gradient(135deg, transparent 5px, #fff 5px, #fff 6px, transparent 6px),
        linear-gradient(#fff, #fff),
        linear-gradient(#fff, #fff),
        linear-gradient(#fff, #fff),
        linear-gradient(#fff, #fff);
    background-size:
        8px 8px,
        calc(100% - 8px) 1px,
        1px 100%,
        100% 1px,
        1px calc(100% - 8px);
    background-position:
        0 0,
        8px 0,
        right 0,
        0 bottom,
        0 8px;
    background-repeat: no-repeat;
}

.bukken-filter-buttons[data-taxonomy="area_bukken"] .bukken-tag-btn:hover,
.bukken-filter-buttons[data-taxonomy="size_bukken"] .bukken-tag-btn:hover {
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    background-image: none;
    background-color: #fff;
    color: #000;
}

.bukken-filter-buttons[data-taxonomy="area_bukken"] .bukken-tag-btn.active,
.bukken-filter-buttons[data-taxonomy="size_bukken"] .bukken-tag-btn.active {
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    background-image: none;
    background-color: #fff;
    color: #000;
    font-weight: bold;
}

.bukken-filter-buttons[data-taxonomy="area_bukken"] .bukken-tag-btn.active:hover,
.bukken-filter-buttons[data-taxonomy="size_bukken"] .bukken-tag-btn.active:hover {
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    background-image: none;
    background-color: #fff;
    color: #000;
}

/* キーワードのみ角丸 */
.bukken-filter-buttons[data-taxonomy="keyword_bukken"] .bukken-tag-btn {
    border-radius: 20px;
}

.bukken-tag-btn:hover {
    color: #000;
    border-color: #fff;
    background: #fff;
}

/* キーワード選択済み・hover も角丸を維持 */
.bukken-filter-buttons[data-taxonomy="keyword_bukken"] .bukken-tag-btn.active,
.bukken-filter-buttons[data-taxonomy="keyword_bukken"] .bukken-tag-btn.active:hover {
    border-radius: 20px;
}

/* タグボタン：選択済み状態 */
.bukken-tag-btn.active {
    color: #000;
    background: #fff;
    border-color: #fff;
    font-weight: bold;
}

.bukken-tag-btn.active:hover {
    background: #fff;
    border-color: #fff;
    color: #000;
}

/* 絞り込むボタン（統合デザイン） */
#bukken-search-btn.bukken-search-btn-unified {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 160px;
    padding: 14px 36px;
    margin-top: 24px;
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
    letter-spacing: 0.08em;
    color: #fff;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#bukken-search-btn.bukken-search-btn-unified:hover {
    background: rgba(255, 255, 255, 0.1);
}

#bukken-search-btn.bukken-search-btn-unified.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.bukken-search-text {
    display: block;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
}

#bukken-clear-btn.bukken-clear-icon {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    font-size: 12px;
    font-weight: normal;
    line-height: 1;
    color: #fff;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#bukken-clear-btn.bukken-clear-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 検索結果なし */
.bukken-no-results {
    text-align: center;
    color: #aaa;
    padding: 40px 0;
}


/* =====================================================
   検索結果エリア（/list/ に合わせたダーク背景・白文字）
   ===================================================== */
#bukken-search-results {
    background: #111;
    padding: 20px 0;
}

#bukken-search-results .column {
    color: #fff;
}

#bukken-search-results .fs16,
#bukken-search-results .link_b a,
#bukken-search-results a {
    color: #fff;
}

#bukken-search-results .line02 {
    border-bottom-color: #333;
}

#bukken-search-results .fs14 {
    color: #ccc;
}

/* =====================================================
   検索結果：共通案内
   ===================================================== */
.bukken-search-info {
    color: #8a8a8a;
    font-size: 13px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}
.bukken-search-info-waku {
    border: 1px solid #8a8a8a;
    padding: 5px;
}

/* =====================================================
   Mobile Responsive Fixes (Added 2026-03-26)
   ===================================================== */
@media screen and (max-width: 767px) {
    .bukken-filter-row {
        flex-direction: column !important;
        gap: 8px !important;
        padding-bottom: 24px !important;
        border-bottom: 1px dotted #333 !important;
    }

    .bukken-filter-row:last-of-type {
        border-bottom: none !important;
    }

    .bukken-filter-label {
        width: 100% !important;
        padding-top: 0 !important;
        font-weight: bold !important;
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }

    .bukken-filter-buttons {
        width: 100% !important;
    }

    .bukken-tag-btn {
        font-size: 13px !important;
        padding: 6px 12px !important;
    }
}