@charset "UTF-8";

/* ===========================================
   共通検索ボックスコンポーネント
   =========================================== */

/* 基本スタイル */
.sb-search-box {
    margin: 0 auto;
    margin-bottom: 40px;
    max-width: 700px;
    width: 100%;
    position: relative;
    z-index: 2000;
}

.sb-search-box__form {
    position: relative;
    margin-bottom: 20px;
}

.sb-search-box__container {
    display: flex;
    background: white;
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
}

.sb-search-box__container:focus-within {
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.sb-search-box__input {
    flex: 1;
    border: none;
    padding: 20px 30px;
    font-size: 18px;
    outline: none;
    background: transparent;
    color: #333;
    font-weight: 500;
}

.sb-search-box__input::placeholder {
    color: #999;
    font-weight: 400;
}

.sb-search-box__btn {
    background: transparent;
    color: #666;
    border: none;
    border-radius: 0 24px 24px 0;
    padding: 20px 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sb-search-box__btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 70%;
    background: #e0e0e0;
    border-radius: 1px;
}

.sb-search-box__btn:hover {
    background: #96bae8;
    color: white;
}

.sb-search-box__btn:hover::before {
    opacity: 0;
}

/* サジェスト */
.sb-search-box__suggestions {
    max-width: 40%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    z-index: 100;
    margin-top: 2px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.sb-search-box__suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sb-search-box__suggestion-item:hover,
.sb-search-box__suggestion-item--active {
    background: #f8f9fa;
}

.sb-search-box__suggestion-item--active {
    background: #e3f2fd;
}

.sb-search-box__suggestion-item:last-child {
    border-bottom: none;
}

.sb-search-box__suggestion-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* トップページ専用の調整 */
.sb-app.sb-top .sb-search-box {
    margin: 0 auto;
    margin-bottom: 40px;
    max-width: 700px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .sb-search-box {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .sb-search-box__container {
        border-width: 2px;
    }
    
    .sb-search-box__input {
        padding: 18px 25px;
        font-size: 16px;
    }
    
    .sb-search-box__btn {
        padding: 18px 30px;
        font-size: 18px;
    }
    
    .sb-search-box__btn::before {
        height: 60%;
    }
    
    .sb-search-box__suggestion-item {
        padding: 8px 14px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    
    .sb-search-box__suggestion-name {
        font-size: 13px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .sb-search-box {
        padding: 0 10px;
    }
    
    .sb-search-box__input {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .sb-search-box__btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .sb-search-box__suggestions {
        max-height: 160px;
    }
    
    .sb-search-box__suggestion-item {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .sb-search-box__suggestion-name {
        font-size: 12px;
    }
}