/* ==========================================================================
   スポキャリ新検索UI（プレグラ完全準拠・四角2px・影なし・モーションなし・フラット）
   ========================================================================== */
.spocari-search-section {
    width: 100%;
    margin-bottom: 24px;
}
.spocari-search-hero {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-top: 3px solid #105ea1;
    border-radius: 2px;
    padding: 20px 20px;
    box-shadow: none !important;
    position: relative;
    color: #0f172a;
    box-sizing: border-box;
}
.spocari-search-hero::before {
    display: none !important;
}
.search-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #105ea1;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 2px;
    margin-bottom: 8px;
}
.search-hero-title {
    color: #0f172a !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    margin: 0 0 4px 0 !important;
    line-height: 1.35 !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    text-shadow: none !important;
}
.search-hero-subtitle {
    color: #64748b;
    font-size: 12px;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

/* 3大カード (PC表示: 横3列 / スマホ表示: 縦1列) */
.search-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}
.search-card-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: none !important;
    transform: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    width: 100%;
    box-sizing: border-box;
}
.search-card-btn:hover {
    background: #f1f5f9;
    border-color: #105ea1;
    transform: none !important;
    box-shadow: none !important;
}
.card-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
    margin-bottom: 6px;
    transition: none !important;
    transform: none !important;
}
.search-card-btn:hover .card-btn-icon {
    transform: none !important;
}
.icon-area {
    background: #eff6ff;
    color: #105ea1;
}
.icon-sports {
    background: #f0fdf4;
    color: #16a34a;
}
.icon-role {
    background: #fff7ed;
    color: #ea580c;
}
.card-btn-texts {
    width: 100%;
    min-width: 0;
}
.card-btn-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.card-arrow-icon {
    display: none;
    font-size: 16px;
    color: #94a3b8;
}
.card-btn-sub {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-btn-selected-badge {
    display: inline-block;
    background: #eff6ff;
    color: #105ea1;
    border: 1px solid #bfdbfe;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* キーワード検索バー */
.search-keyword-row {
    display: flex;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    padding: 4px;
    box-shadow: none !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}
.keyword-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
    min-width: 0;
}
.keyword-input-wrapper .material-symbols-outlined {
    color: #64748b;
    font-size: 20px;
    flex-shrink: 0;
}
.keyword-input {
    width: 100%;
    border: none !important;
    outline: none !important;
    font-size: 13.5px;
    color: #0f172a;
    background: transparent !important;
    box-shadow: none !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    font-family: inherit;
}
.keyword-input::placeholder {
    color: #94a3b8;
}
.btn-search-submit {
    background: #f97316 !important;
    border: 1px solid #ea580c !important;
    color: #ffffff !important;
    padding: 9px 22px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    border-radius: 2px !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
    white-space: nowrap;
    text-shadow: none !important;
    height: auto !important;
    margin: 0 !important;
}
.btn-search-submit:hover {
    background: #ea580c !important;
    border-color: #c2410c !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 前回検索条件カード */
.search-history-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #475569;
    font-size: 11.5px;
    cursor: pointer;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
    position: relative;
    z-index: 2;
}
.search-history-card:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.history-card-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.history-tag {
    background: #eff6ff;
    color: #105ea1;
    border: 1px solid #bfdbfe;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    flex-shrink: 0;
}
.history-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #334155;
}

/* ==========================================================================
   モーダル共通UI (PC・スマホ両対応)
   ========================================================================== */
.search-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    transition: none !important;
}
.search-modal-backdrop.is-open {
    display: flex;
    opacity: 1;
}
.search-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    border-radius: 2px;
    border: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    box-shadow: none !important;
    overflow: hidden;
    transform: none !important;
    transition: none !important;
    box-sizing: border-box;
}
.search-modal-backdrop.is-open .search-modal-dialog {
    transform: none !important;
}
.modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}
.modal-title {
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    margin: 0;
    border: none;
    padding: 0;
}
.modal-close-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    width: 28px;
    height: 28px;
    border-radius: 2px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: none !important;
}
.modal-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.modal-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}
.modal-sec-title {
    font-size: 12px;
    font-weight: 700;
    color: #105ea1;
    margin: 14px 0 6px 0;
    border-left: 3px solid #105ea1;
    padding-left: 6px;
    border-bottom: none;
    padding-bottom: 0;
}
.modal-sec-title:first-child {
    margin-top: 0;
}
.checkbox-chips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
}
.chip-check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    font-size: 12px;
    cursor: pointer;
    transition: none !important;
    background: #ffffff;
    user-select: none;
    box-sizing: border-box;
    color: #334155;
    margin: 0;
}
.chip-check-label:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.chip-check-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #105ea1;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
    border-radius: 2px;
}
.chip-check-label.is-checked {
    background: #eff6ff;
    border-color: #105ea1;
    color: #105ea1;
    font-weight: 700;
}
.modal-footer {
    padding: 12px 18px;
    background: #f8fafc;
    border-top: 1px solid #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.modal-selected-count {
    font-size: 12.5px;
    font-weight: 700;
    color: #475569;
}
.modal-selected-count strong {
    color: #105ea1;
    font-size: 15px;
}
.modal-btn-row {
    display: flex;
    gap: 8px;
}
.btn-modal-clear {
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 2px;
    cursor: pointer;
    color: #64748b;
    transition: none !important;
}
.btn-modal-clear:hover {
    background: #f1f5f9;
    color: #334155;
}
.btn-modal-apply {
    padding: 7px 18px;
    background: #105ea1;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    border: 1px solid #0c487d;
    border-radius: 2px;
    cursor: pointer;
    transition: none !important;
}
.btn-modal-apply:hover {
    background: #0c487d;
}

/* 絞り込みアコーディオンヘッダー */
.searchHead {
    cursor: pointer;
    border-radius: 2px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13.5px;
}
.searchHead a {
    color: #105ea1 !important;
    text-decoration: none !important;
}

/* スマホ表示最適化 (768px以下) */
@media screen and (max-width: 768px) {
    .spocari-search-hero {
        padding: 16px 12px;
        border-radius: 2px;
    }
    .search-hero-title {
        font-size: 16px !important;
    }
    .search-cards-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .search-card-btn {
        flex-direction: row;
        text-align: left;
        padding: 10px 12px;
        gap: 10px;
    }
    .card-btn-icon {
        width: 34px;
        height: 34px;
        font-size: 20px;
        margin-bottom: 0;
    }
    .card-btn-label {
        justify-content: space-between;
    }
    .card-arrow-icon {
        display: block;
    }
    .search-keyword-row {
        flex-direction: column;
        padding: 6px;
        border-radius: 2px;
    }
    .keyword-input-wrapper {
        padding: 4px 6px;
        width: 100%;
        box-sizing: border-box;
    }
    .btn-search-submit {
        width: 100% !important;
        justify-content: center;
        padding: 10px !important;
    }
    .search-modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }
    .search-modal-dialog {
        max-width: 100%;
        max-height: 82vh;
        border-radius: 2px 2px 0 0;
        transform: none !important;
    }
    .search-modal-backdrop.is-open .search-modal-dialog {
        transform: none !important;
    }
    .checkbox-chips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}