/*
Theme Name: SWELL Child
Template: swell
Description: SWELL子テーマ - u-intern求人サイト用カスタマイズ
Version: 1.0.0
Author: u-intern
Text Domain: swell-child
*/

/* タクソノミーページのh1スタイル（SWELLのpage.cssと同じ） */
.taxonomy-search .c-pageTitle {
    font-size: 1.3em;
    line-height: 1.4;
    position: relative;
}
.taxonomy-search .c-pageTitle:after {
    clear: both;
    content: "";
    display: block;
    height: 0;
    visibility: hidden;
}
.taxonomy-search .c-pageTitle[data-style=b_bottom] {
    border-bottom: 1px solid var(--color_border);
}
.taxonomy-search .c-pageTitle[data-style=b_bottom] .c-pageTitle__inner {
    border-bottom: 1px solid var(--color_main);
    float: left;
    margin-bottom: -1px;
    padding: .25em .5em;
}
.taxonomy-search .c-pageTitle__inner {
    display: block;
    padding-top: .5em;
}
@media (min-width: 600px) {
    .taxonomy-search .c-pageTitle {
        font-size: 1.5em;
    }
}

/* 検索ページスタイル */
.p-searchSection {
    margin-bottom: 32px;
}

.p-searchSection h2 {
    font-size: 1.2em;
    border-left: 4px solid #3498db;
    padding-left: 12px;
    margin-bottom: 16px;
}

.p-searchTerms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.p-searchTerm {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    transition: background 0.2s;
}

.p-searchTerm:hover {
    background: #e0e0e0;
}

/* 検索結果ページスタイル */
.p-resultCount {
    font-size: 0.95em;
    color: #666;
    margin-top: 24px;
    margin-bottom: 20px;
}

.p-termDescriptions {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.p-termDescription {
    margin-bottom: 16px;
}

.p-termDescription:last-child {
    margin-bottom: 0;
}

.p-termDescription h2 {
    font-size: 1em;
    color: #333;
    margin-bottom: 8px;
}

.p-termDescription p {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
}

/* 求人詳細フィールドスタイル */
.p-jobFields {
    margin: 24px 0;
}

.p-jobField {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.p-jobField__label {
    width: 150px;
    font-weight: bold;
    color: #333;
    flex-shrink: 0;
}

.p-jobField__value {
    flex: 1;
    color: #666;
}

/* 検索フォームスタイル */
.p-searchForm {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 32px;
    border: 1px solid #e9ecef;
}

.p-searchForm__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.p-searchForm__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.p-searchForm__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.p-searchForm__label {
    font-size: 0.85em;
    font-weight: bold;
    color: #495057;
}

.p-searchForm__select {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95em;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.p-searchForm__select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.p-searchForm__keyword {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.p-searchForm__input {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.95em;
    width: 100%;
    box-sizing: border-box;
}

.p-searchForm__input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.p-searchForm__input::placeholder {
    color: #adb5bd;
}

.p-searchForm__submit {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.p-searchForm__button {
    padding: 12px 48px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.p-searchForm__button:hover {
    background: #2980b9;
}

@media (max-width: 768px) {
    .p-searchForm {
        padding: 16px;
    }

    .p-searchForm__fields {
        grid-template-columns: 1fr;
    }

    .p-searchForm__button {
        width: 100%;
    }
}

/* ----------------------------------------
   GlobalSearchNav
---------------------------------------- */
.search-nav-wrapper {
    display: block;
    width: 100%;
}

.search-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 10px 0;
    width: 100%;
}

.search-nav__container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}

.search-nav__item {
    position: relative;
    flex: 0 0 140px;
    width: 140px;
}

.search-nav__trigger {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.2s;
}

.search-nav__trigger:hover {
    background: #fff;
    border-color: #3972cd;
}

.search-nav__item.is-active .search-nav__trigger {
    background: #fff;
    border-color: #3972cd;
    box-shadow: 0 0 0 2px rgba(57, 114, 205, 0.2);
}

.search-nav__label {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
    display: block;
}

.search-nav__value {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 90px;
}

.search-nav__arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 12px;
}

/* Dropdown Panel */
.search-nav__panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 20px;
    border: 1px solid #eee;
}

.search-nav__item.is-active .search-nav__panel {
    display: block;
    animation: searchNavFadeIn 0.2s ease-out;
}

@keyframes searchNavFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-nav__panel .panel-title {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.search-nav__panel .panel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.search-nav__panel .checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px;
}

.search-nav__panel .checkbox-item:hover {
    background: #f5f5f5;
    border-radius: 4px;
}

.search-nav__panel .checkbox-text {
    margin-left: 8px;
    font-size: 14px;
}

.search-nav__panel .panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.search-nav__panel .btn-primary {
    background: #3972cd;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.search-nav__panel .btn-primary:hover {
    background: #2d5ba8;
}

.search-nav__panel .btn-text {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 12px;
}

.search-nav__panel .btn-text:hover {
    text-decoration: underline;
}

/* Keyword input - 下段に配置 */
.search-nav__keyword {
    flex: 0 0 200px;
    width: 200px;
    order: 10;
    margin-top: 10px;
}

.search-nav__keyword input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.search-nav__keyword input:focus {
    outline: none;
    border-color: #3972cd;
}

/* Search button - 下段に配置 */
.search-nav__submit {
    order: 11;
    margin-top: 10px;
}

.search-nav .btn-search {
    background: #3972cd;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.search-nav .btn-search:hover {
    background: #2d5ba8;
}

/* Responsive */
@media (max-width: 768px) {
    .search-nav__item {
        flex: 1 1 calc(50% - 5px);
        width: auto;
    }

    .search-nav__value {
        max-width: 100%;
    }

    .search-nav__panel {
        width: 100%;
        left: 0;
        right: 0;
    }

    .search-nav__keyword {
        flex: 1 1 calc(100% - 100px);
        width: auto;
    }

    .search-nav__submit {
        flex: 1 1 100%;
    }

    .search-nav .btn-search {
        width: 100%;
    }
}

/* 検索ページ・タクソノミーページでスティッキーを無効化 */
.page-template-page-search .search-nav,
.taxonomy-search .search-nav {
    position: static;
}
