/* ========================================
   サジェスト機能 - 共通スタイル
   ======================================== */

.suggest-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 0;
    transition: height 0.2s;
    overflow: hidden;
}

.suggest-item {
    padding: 2px 32px;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.suggest-item:last-child {
    border-bottom: none;
}

.suggest-item:hover,
.suggest-item.active {
    background-color: #f5f5f5;
}

.suggest-item-content {
    flex: 1;
    min-width: 0;
}

.suggest-insert-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    color: #222;
}

.suggest-insert-btn:hover {
    background: #333;
    border-color: #333;
    color: #fff;
    transform: scale(1.05);
}

.suggest-insert-btn:active {
    transform: scale(0.95);
}

.suggest-insert-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.suggest-item-main {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    display: inline;
}

.suggest-item-sub {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
    display: inline;
}

.suggest-item-binomen {
    font-size: 11px;
    color: #999;
    font-style: italic;
    margin-left: 4px;
    display: inline;

}

.suggest-loading {
    text-align: center;
    color: #999;
}


/* ========================================
   各検索ボックス用カスタムスタイル
   ======================================== */

/* ヘッダー用（PC・通常ヘッダー） */
/* フローティングヘッダー用（スクロール時の追従ヘッダー） */
.headerSearch .suggest-header {
    border: 2px solid black;
    border-top: none;
    max-width: 100%;
    font-size: 12px;
    padding-bottom: 8px;
    overflow: hidden;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.headerSearch .search-edit.suggest-open {
    border-bottom: none;
    border-radius: 16px 0 0 0;
}

.headerSearch .search-edit.suggest-open+.search-submit {
    border-bottom: none;
    border-radius: 0 16px 0 0;
}

.headerSearch .suggest-floating {
    border: 2px solid black;
    border-top: none;
    max-width: 100%;
    font-size: 13px;
    border-radius: 0 0 16px 16px;
    padding-bottom: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.headerSearch .suggest-item {
    padding: 2px 10px;
}

.headerSearch .suggest-item-main {
    font-size: 12px;
}

.headerSearch .suggest-item-sub {
    font-size: 10px;
}

.headerSearch .suggest-item-binomen {
    font-size: 10px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: -2px 0 4px;
    line-height: 1em;
}

.headerSearch .suggest-insert-btn {
    width: 24px;
    height: 24px;
    font-size: 13px;
    border-radius: 2px;
}


/* モーダル用（モバイル・タブレットの検索モーダル） */
#sbox4.suggest-open {
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.suggest-modal {
    border: 3px solid black;
    border-top: none;
    max-width: 100%;
    font-size: 14px;
    border-radius: 0 0 32px 32px;
    padding-bottom: 16px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.suggest-modal .suggest-item {
    padding: 16px 20px;
}

.suggest-modal .suggest-item-main {
    font-size: 14px;
}

.suggest-modal .suggest-item-sub {
    font-size: 12px;
}

.suggest-modal .suggest-item-binomen {
    font-size: 11px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: -2px 0 4px;
    line-height: 1em;
}

.suggest-modal .suggest-insert-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 4px;
}


/* トップページ用（ファーストビューの大きな検索ボックス） */
#sbox2.suggest-open {
    border-bottom: none;
    border-radius: 32px 32px 0 0;
}

.suggest-top {
    border: 3px solid black;
    border-top: none;
    max-width: 100%;
    font-size: 14px;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    padding-bottom: 16px;
}

.suggest-top .suggest-item {
    padding: 2px 32px;
}

.suggest-top .suggest-item-main {
    font-size: 14px;
}

.suggest-top .suggest-item-sub {
    font-size: 10px;
}

.suggest-top .suggest-insert-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 3px;
}

.suggest-top.suggest-loading {
    padding: 2px 32px;
    font-size: 14px;
}


/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .suggest-container {
        font-size: 14px;
    }

    .suggest-item {
        padding: 14px 16px;
    }

    .suggest-top .suggest-item {
        padding: 16px 18px;
    }
}