﻿/* General Styles */
body {
    font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.search-wrapper {
    top: 60px;
    position: fixed;
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 800px;
    background-color: #f5f5f5;
    padding: 20px;
    z-index: 1000;
}

/* Search Options */
.search-options {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 0 5px 10px 5px;
}

.search-option {
    flex: 1;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-right: 1px solid #eee;
}

    .search-option:last-child {
        border-right: none;
    }

.search-button {
    padding: 15px;
    background-color: #007aff;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .search-button:hover {
        background-color: #0056b3;
    }

.search-option-icon {
    margin-right: 8px;
    font-size: 16px;
    color: #666;
}

.search-option-text {
    color: #666;
    font-size: 14px;
}

.clear-icon {
    color: #999;
    cursor: pointer;
    font-size: 14px;
}

    .clear-icon:hover {
        color: #666;
    }

    .clear-icon.show {
        display: inline-block;
    }

/* Search Content */
.search-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-top: 10px;
    display: none;
}

    .search-content.active {
        display: block;
    }

/* New Search Options */
.new-search-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 5px 0;
    gap: 10px;
    background-color: transparent;
}

.new-search-option {
    position: relative;
    flex: 1;
    text-align: left;
    padding: 6px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .new-search-option .fa-chevron-down {
        font-size: 12px;
        color: #999;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .new-search-option:hover {
        background-color: #f8f8f8;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .new-search-option .clear-icon {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        cursor: pointer;
        font-size: 14px;
        display: none;
    }

    .clear-icon.show {
        display: block;
    }

    .new-search-option:hover .fa-chevron-down {
        display: none;
    }

/* 保存アイコンのコンテナ */
#save-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: transparent;
    transition: background-color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 保存アイコン */
#save-search-icon {
    font-size: 16px;
    color: #666;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0; /* 余白をリセット */
    padding: 0; /* パディングをリセット */
    line-height: 1; /* 行の高さをリセット */
}

/* ホバー時のスタイル */
#save-option:hover {
    background-color: #fff;
}

/* アクティブ時のスタイル */
#save-option:has(#save-search-icon.active) {
    background-color: #666;
    border-color: #666;
}

#save-search-icon.active {
    color: #fff;
}


/* Custom Select */
.custom-select {
    width: 100%;
}

    .custom-select .fa-chevron-down {
        font-size: 12px;
        color: #999;
    }

.select-selected {
    padding-right: 20px;
}

.select-items {
    position: absolute;
    background-color: #fff;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.select-hide {
    display: none;
}

.select-items div {
    padding: 10px;
    cursor: pointer;
    user-select: none;
}

    .select-items div:hover {
        background-color: #f0f0f0;
    }

/* Prefecture Select */
#prefectureSelect {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.tab {
    flex: 1;
    font-size: 14px;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #666;
}

    .tab.active {
        background-color: #fff;
        border-bottom: 2px solid #007aff;
        color: #007aff;
    }

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }



/* Page Content */
/* Page Content - 基本スタイル */
.page-content {
    display: none;
    height: 200px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
    /* Safari用のスクロール設定 */
    overflow-y: scroll;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

    .page-content.active {
        display: block;
    }


@supports (-webkit-touch-callout: none) {
    .page-content {
        height: 300px !important;
        max-height: 300px !important;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        min-height: 200px !important;
        padding-bottom: 20px;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

@supports not (-webkit-touch-callout: none) {
    .page-content {
        overflow-y: auto;
        overscroll-behavior: contain;
        scroll-behavior: smooth;
    }
}

/* タッチデバイス全般の設定 */
@media (hover: none) and (pointer: coarse) {
    .page-content {
        height: 350px;
        max-height: calc(100vh - 150px);
    
        /* スクロールの視覚的なフィードバック */
        scroll-padding: 10px;
        /* スクロールのスナップ動作 */
        scroll-snap-type: y proximity;
    }



    /* スクロール要素のスナップポイント */
    .selection-item {
        scroll-snap-align: start;
    }
}



/* スクロールバーのスタイリング */
.page-content::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 7px;
}

.page-content::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(0, 0, 0, .5);
    -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);
}

/* Firefoxのスクロールバー */
.page-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, .5) transparent;
}

/* Selection List */
.selection-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

    .selection-item:hover {
        background-color: #f0f0f0;
    }

    .selection-item.selected {
        background-color: #e6f2ff;
    }

.selection-item-text {
    flex-grow: 1;
}

.selection-item-icon {
    margin-left: 10px;
    color: #999;
}

.back-button {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding-top: 5px;
    padding-bottom: 10px;
    border: none;
    outline: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
}

    .back-button:hover {
        text-decoration: none;
    }

    .back-button i {
        margin-right: 5px;
    }


/* モーダルのスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1005;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}


.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    box-sizing: border-box;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

    .close:hover, .close:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }

/* Budget Selection */
.budget-selection {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.budget-type {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

    .budget-type button {
        flex: 1;
        padding: 8px 10px;
        margin: 0 5px;
        background-color: #f0f0f0;
        border: 1px solid #ddd;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s, color 0.3s;
    }

        .budget-type button.active {
            background-color: #007aff;
            color: white;
        }

        .budget-type button:first-child {
            margin-left: 0;
        }

        .budget-type button:last-child {
            margin-right: 0;
        }

        .budget-type button i {
            margin-right: 8px;
            font-size: 18px;
        }

.budget-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

    .budget-range select {
        flex: 1;
        padding: 10px;
        margin: 0 5px;
        min-width: 0;
        border: 1px solid #ccc;
        border-radius: 4px;
        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='%23333333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 12px;
    }

#budget-search-button {
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

    #budget-search-button:hover {
        background-color: #45a049;
    }

/* ユーザー検索のスタイル */
.user-search-container {
    margin-bottom: 20px;
    width: 100%;
}

.user-search-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd; /* 境界線の色を #ddd に変更 */
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
    color: #666;
}

.user-search-results {
    margin-top: 10px;
    padding: 0;
    list-style-type: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #fff;
}

.user-search-result {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #666;
}

    .user-search-result:hover {
        background-color: #f0f0f0;
    }

/* フォローユーザーのプルダウンメニュー */
#followers-dropdown-container {
    position: relative;
    display: inline-block;
    width: 94.3%;
    margin-bottom: 20px;
}

.dropdown-toggle {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: #666;
}

#followers-dropdown-label {
    color: #666;
    font-size: 16px;
}

.dropdown-toggle i {
    transition: transform 0.3s ease;
}

#followers-list {
    display: none;
    position: absolute;
    background-color: #fff;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    z-index: 1000;
    list-style-type: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    #followers-list li {
        padding: 10px;
        cursor: pointer;
        transition: background-color 0.3s;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #666;
    }

        #followers-list li:hover {
            background-color: #f0f0f0;
        }



/* 'Next' ボタンのスタイル */
#load-more-followers {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

    #load-more-followers:hover {
        background-color: #45a049;
    }

/* フォーカス時のスタイル */
.user-search-input:focus,
.dropdown-toggle:focus {
    outline: none;
    border-color: #aaa;
}




/* Range Select */
#range-select {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    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='%23333333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

    #range-select::-ms-expand {
        display: none;
    }

#range-option {
    display: none;
}

/* Current Location Button */
#current-location-button {
    width: 100%;
    margin-bottom: 15px;
}

.styled-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background-color: #007aff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

    .styled-button:hover {
        background-color: #0056b3;
    }

    .styled-button i {
        margin-right: 8px;
    }


/* Restaurant Item */
.restaurant-item {
    padding: 15px;
    margin-bottom: 10px;
    background-color: #fff;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.restaurant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.restaurant-name {
    font-size: 1.5em;
    margin: 0;
    color: #333;
}

.restaurant-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-button {
    padding: 3px 10px;
    background-color: #333;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    font-size: 12px;
}

.save-button {
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

    .save-button:hover {
        color: #007BFF;
    }

    .save-button.saved {
        color: #FFD700;
    }

/* Restaurant Item (続き) */
.restaurant-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

/* ビデオカルーセル */
.video-carousel {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}


    .video-carousel::-webkit-scrollbar {
        display: none;
    }

.carousel-item {
    flex: 0 0 auto;
    width: 250px;
    height: 320px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .carousel-item iframe {
        width: 100%;
        height: 200%;
        position: absolute;
        top: -30%;
    }

/* YouTubeショートコンテナ */
.youtube-shorts-container {
    width: 180px;
    height: 320px;
    position: relative;
}

    .youtube-shorts-container iframe {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
    }

/* YouTubeコンテナ */
.youtube-container {
    margin-bottom: 15px;
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9のアスペクト比 */
    height: 0;
    overflow: hidden;
}

    .youtube-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }


/* More Button */

/* もっと見るボタン */
.more-button-icon {
    font-size: 50px;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-decoration: none;
}


.more-button {
    display: block;
    width: 100%;
    max-width: 800px;
    padding: 10px 0;
    text-decoration: none;
    color: #333;
    text-align: center;
    margin: 0 auto;
    font-weight: bold;
}

#restaurant-list {
    padding-top: 170px;
}

#intro-message {
    display: none;
}

.intro-container {
    padding-top: 130px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}




.intro-features {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    padding: 30px;
    margin: 20px auto;
    position: relative;
}


.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding: 0 15px;
}

    .feature-title:after {
        content: "";
        position: absolute;
        bottom: -12px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background: linear-gradient(90deg, #FFA726, #FFB74D);
        border-radius: 3px;
    }


.feature-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 600px) {
    .feature-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-item {
    padding: 15px;
    border-radius: 12px;
    background-color: #f9f9f9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

    .feature-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    }

.feature-icon {
    font-size: 26px;
    color: #FFA726;
    margin-bottom: 10px;
}

.feature-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1rem;
}

.feature-desc {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.5;
}

.search-hint {
    margin-top: 30px;
    font-size: 0.95rem;
    color: #888;
    font-weight: 400;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
}

    .search-hint i {
        color: #FFA726;
        margin-right: 8px;
        animation: pulse 2s infinite;
    }

    .search-hint:after {
        content: "";
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 167, 38, 0.5), transparent);
    }

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Loading and Error Messages */
#loading {
    text-align: center;
    padding: 60px;
    font-weight: bold;
}

#error-message {
    color: red;
    text-align: center;
    padding: 60px;
}