/* Search Container & Overlay */
.search-container {
    position: relative;
    z-index: 1000;
}

.suggest-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
}

/* Suggestion List */
.suggests {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
}

.suggests.show {
    display: block;
}

.suggest-subtitle {
    padding: 0.75em 1em;
    font-size: 1em;
    font-weight: bold;
    background: #ececec;
    border-top: solid 2px #666;
}   
/* Suggestion Items */
.suggest-item {
    display: flex;
    align-items: center;
    padding: 0.35em 1em;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.suggest-item:last-child {
    border-bottom: none;
}

.suggest-item:hover,
.suggest-item:focus {
    background-color: #f8f9fa;
}

/* Icon Styles */
.suggest-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-right: 12px;
    background: #f1f3f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #868e96;
}

.suggest-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.suggest-icon svg {
    width: 18px;
    height: 18px;
}

/* Text Content */
.suggest-content {
    flex-grow: 1;
}

.suggest-name {
    display: block;
    font-weight: 500;
    font-size: 1em;
    line-height: 1.4;
}

.suggest-meta {
    display: block;
    font-size: 0.75em;
    color: #adb5bd;
}
span.suggest-meta.text-danger {
    color: #f33;
}

/* Specific Item Types Customization (Optional) */

.search-box-smp .suggests {
    top: calc(100% - 16px);
}

#Global-navigation-smp .search-container {
    clear: both;
}

.header-search-box input {
    background: #F8F8F8;
    border-left: solid 1px #B9B9B9;
    color: #333;
    font-weight: bold;
}

.header-search-box input::placeholder {
    opacity: 1;
    color: #038549;
    font-weight: bold;
}

.header-search-box button {
    background: #038549;
}

.header-search-box button .kicn-search:before {
    color: #fff;
}

.search-box-smp input {
    background: #F8F8F8;
    border: solid 1px #B9B9B9;
    color: #333;
    border-radius: 3px;
    margin-right: 5px;
    width: calc(100% - 53px);
    font-weight: bold;
}

.search-box-smp input::placeholder {
    opacity: 1;
    color: #038549;
    font-weight: bold;
}

.search-box-smp button {
    background: #038549;
    border-radius: 3px;
}

.search-box-smp button .kicn-search:before {
    color: #fff;
    font-weight: bold;
}

/* Clear Button Styles */
.suggest-clear-btn {
    position: absolute;
    right: 55px; /* 検索ボタンの幅に合わせて調整 */
    top: calc(50% + 23px);
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #ccc;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    cursor: pointer;
    display: none; /* 初期状態は非表示 */
    z-index: 10;
    font-size: 14px;
    font-family: Arial, sans-serif;
    user-select: none;
}

.suggest-clear-btn:hover {
    background: #999;
}

.search-box-smp .suggest-clear-btn {
    right: 58px;
}

@media only screen and (max-width:949px) {
    .suggest-clear-btn {
        right: 70px;
        top: calc(50%);
    }
}
