@charset "utf-8";

.sec_book {
    display: block;
    position: sticky;
    top: calc(51.25px + 16px);
    height: fit-content;
}

.book_wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    line-height: 1.5em;
}

.book {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px 0px, rgba(0, 0, 0, 0.04) 0px 2px 6px 0px, rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(0, 0, 0, 0.01) 0px 0px 1.5px 0px;
    background-color: rgb(250, 250, 250);
    border-radius: 10px;
}

.input_item {
    width: 100%;
    gap: 8px;
    display: flex;
    flex-direction: column;
}

.book label {
    color: rgb(103, 103, 103);
}

label[for] {
    cursor: pointer;
}

.select_box_wrapper {
    display: flex;
    align-items: center;
    padding: 0;
    min-height: 40px;
    height: fit-content;
    border: solid 1px rgb(234, 234, 234);
    border-radius: 7.5px;
    background-color: #fff;
}

.select_box_over {
    display: flex;
    width: -webkit-fill-available;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    cursor: pointer;
    white-space: normal;
    padding: 0 .3rem;
    border: none;
    background-color: #fff;
}

select:focus {
    outline: none;
    box-shadow: none;
    border-color: initial;
}

.clear_btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    width: 25px;
    align-items: center;
    border-width: 0;
}

.input_item .search_menu_button {
    border: none;
    border-radius: 9999px;
    background-color: #a01b1f;
    color: white;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    height: 40px;
}

/* 検索モーダル */
.search-modal {
    display: none;
    position: absolute;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    pointer-events: none;
}

@media screen and (max-width: 767px) {
    .search-modal {
        background-color: rgba(0, 0, 0, 0.3);
        pointer-events: auto;
    }
}

.search-modal-content {
    position: absolute;
    left: 310px;
    top: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 300px;
    max-height: 70vh;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    overflow: hidden auto;
}

.search-modal-content.fading {
    opacity: 0.2;
}

@media screen and (min-width: 768px) {
    .search-modal-content {
        width: 800px;
    }
}

@media screen and (max-width: 767px) {
    .search-modal-content {
        position: absolute;
        left: 20px;
        right: 20px;
        width: auto;
        max-height: 60vh;
        overflow-y: auto;
    }
}

.search-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-modal-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
}

.search-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal-close:hover {
    color: #333;
}

.search-modal-body {
    padding: 10px 0 15px 0;
}

.modal-options {
    display: none;
}

.modal-options.active {
    display: block;
}

@media screen and (min-width: 768px) {
    .search-modal-body {
        display: block;
        padding: 10px;
    }

    .modal-options {
        flex-wrap: wrap;
    }
}

.modal-search-link {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.modal-search-link:hover {
    background-color: #f8f8f8;
    color: #a51b20;
}

.modal-search-link.current {
    background-color: #a51b20;
    color: #fff;
}

.modal-search-link.current:hover {
    background-color: #8a1519;
    color: #fff;
}

.modal-search-item {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    transition: background-color 0.2s;
}

.modal-search-item:hover {
    background-color: #f8f8f8;
}

@media screen and (min-width: 768px) {
    .modal-search-item {
        width: 230px;
        font-size: 12px;
        padding: 2px 10px;
    }
}

.modal-search-checkbox {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    transform: scale(1.2);
}

@media screen and (min-width: 768px) {
    .modal-search-checkbox {
        width: 12px;
        height: 12px;
    }
}

.modal-search-label {
    flex: 1;
    cursor: pointer;
    color: #a51b20;
    text-decoration: none;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.modal-search-label.current {
    font-weight: bold;
}

/* 地方ごとの都道府県表示 */
.modal-region-group {
    margin-bottom: 20px;
    width: 100%;
}

.modal-region-title {
    font-size: 14px;
    font-weight: bold;
    color: #666;
    margin: 0 0 10px 0;
    padding: 8px 20px;
    background-color: #f5f5f5;
    border-left: 3px solid #a51b20;
}

.modal-region-prefs {
    padding-left: 10px;
}

@media screen and (min-width: 768px) {
    .modal-region-prefs {
        display: flex;
        flex-wrap: wrap;
    }

    .modal-region-prefs .modal-search-item {
        width: 180px;
        margin-right: 10px;
    }
}

@media screen and (max-width: 767px) {
    .search-modal-header {
        padding: 12px 15px;
    }

    .modal-search-link {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* 人気エリア */
.popular_area_container {
    background-color: #fff;
    margin-top: 16px;
    border-radius: 10px;
    padding: 16px;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px 0px, rgba(0, 0, 0, 0.04) 0px 2px 6px 0px;
    overflow-y: auto;
    height: 200px;
}

.popular_area_container dl {
    display: grid;
    gap: 2px;
}

.popular_area_container dt {
    font-size: 14px;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0;
}

.popular_area_container dd {
    margin: 0;
    padding: 0;
}

.popular_area_container dd a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

.popular_area_container dd a:hover {
    background-color: #e9ecef;
    color: #a01b1f;
    transform: translateX(2px);
}

.popular_area_container_sp {
    display: none;
}

@media (max-width: 767px) {
    .popular_area_container {
        display: none;
    }

    .popular_area_container_sp {
        display: block;
        padding: 10px 5px;
        font-size: 16px;
        background-color: #f7f7f7;
    }

    .popular_area_wrapper {
        position: relative;
        display: flex;
        align-items: center;
        cursor: pointer;
    }

    .popular_area_icon {
        position: absolute;
        left: 10px;
        height: 18px;
        width: auto;
        z-index: 1;
    }

    .popular_area_icon::before {
        content: '📍';
        font-size: 18px;
    }

    .popular_area_select {
        width: 100%;
        border: none;
        height: 3rem;
        line-height: 3rem;
        font-size: 1rem;
        background-color: #fff;
        padding-left: 35px;
        padding-right: 35px;
        box-shadow: 0px 4px 4px 0px rgba(110, 110, 110, 0.35);
        color: #333;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .popular_area_text {
        flex: 1;
    }

    .popular_area_arrow {
        width: 16px;
        height: 16px;
    }
}

/* セレクトボックス改修 */
.select_box_wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.select_box_wrapper .select_box {
    flex: 1;
}

.select_box_wrapper > .clear_btn {
    position: absolute;
    right: 0;
    z-index: 10;
    cursor: pointer;
    width: 20px;
    height: 20px;
    padding: 0;
    margin-right: 5.5px;
}

.select_box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.select_box.modal-trigger {
    position: relative;
}

.select_box.modal-trigger::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 767px) {
    .select_box.modal-trigger::after {
        pointer-events: auto;
    }
}

.select_box_inner {
    display: flex;
    align-items: center;
}

.select_icon {
    max-width: 20px;
}

.select_text {
    margin: 0 20px 0 10px;
    font-size: 14px;
    color: #cecece;
    max-width: 300px;
    word-break: break-word;
}

.select_text.active {
    color: #000;
}

.select_box_over {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 40px);
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
