/* ========================================
   검색창 위치, 스타일
======================================== */

.search-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}


.search-box {
    width: 500px;
    height: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    padding-left: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 28px;
    background: #fff;
    position: relative;
    z-index: 2;
}


/* ========================================
   셀렉트 박스
======================================== */

.search-select {
    position: relative;
    flex: 0 0 auto;
}


.search-select__button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--color-gray);
    font-size: var(--fs-14);
    white-space: nowrap;
    cursor: pointer;
}


.search-select__arrow {
    width: 5px;
    height: 5px;
    border-right: 1px solid #777;
    border-bottom: 1px solid #777;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}


.search-select.is-open .search-select__arrow {
    transform: rotate(225deg) translate(-1px, -1px);
}



/* 구분선 */

.search-divider {
    flex: 0 0 auto;
    width: 1px;
    height: 12px;
    margin: 0 14px;
    background: #ddd;
}


/* 셀렉트 옵션 */

.search-select__list {
    display: none;
    position: absolute;
    top: calc(100% + 16px);
    left: -20px;
    min-width: 128px;
    border: 1px solid #ddd;
    background: #fff;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.1);
    z-index: 10;
    border-radius: 12px;
    padding: 16px 0;

}


.search-select.is-open .search-select__list {
    display: block;
}


.search-select__list li button {
    width: 100%;
    text-align: left;
    color: var(--color-gray);
    font-size: var(--fs-14);
    cursor: pointer;
    padding: 6px 20px;
}


.search-select__list li button:hover {
    color: #111;
}


/* 입력창 */

.search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 10px;
    outline: none;
    background: transparent;
    font-size: var(--fs-14);
}


.search-input::placeholder {
    color: #aaa;
}


/* 검색 버튼  */

.search-button {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}


/* ========================================
  닫기 버튼
======================================== */

.search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #888;
    color: #fff;
    font-size: var(--fs-12);
    cursor: pointer;
    text-align: center;
}


/* 입력값 있을 때 */

.search-clear.is-visible {
    display: flex;
}




/* ========================================
   검색창 드롭다운
======================================== */

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 500px;
    padding: 36px 38px;
    border: 1px solid #222;
    border-radius: 16px;
    background: #fff;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.12);
    z-index: 1;
}


.search-dropdown.is-open {
    display: block;
}


.search-keyword-section {
    margin-bottom: 32px;
}


.search-keyword-section:last-child {
    margin-bottom: 0;
}


.search-keyword-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}






/* ========================================
   최근 검색어
======================================== */

.recent-keyword-list,
.recommend-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 6px;
}


.keyword-chip,
.recommend-chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #505050;
    font-size: var(--fs-14);
    cursor: pointer;
}



.keyword-chip__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #505050;
    font-size: var(--fs-12);
    font-weight: 300;

}


.recent-delete-all {
    color: #999;
    font-size: var(--fs-12);
    cursor: pointer;
}


/*  최근검색어 없을 때 */
.recent-keyword-empty {
    display: none;
    padding: 10px 0;
    color: #999;
    font-size: var(--fs-14);
    text-align: center;
}


.recent-keyword-list.is-empty+.recent-keyword-empty {
    display: block;
}



/* ========================================
   추천 검색어
======================================== */

.recommend-keyword-section .recommend-chip {
    border: 1px solid rgba(111, 48, 246, 0.3);
    color: var(--color-primary);
    background: rgba(111, 48, 246, 0.03);

}


.recommend-keyword-section .recommend-toggle {
    color: #999;
    font-size: var(--fs-12);
    cursor: pointer;
}


.recommend-keyword-section.is-disabled .recommend-keyword-list {
    display: none;
}



/* ========================================
  실시간 검색어
======================================== */

.realtime-keyword-list {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    column-gap: 50px;
    font-size: var(--fs-14);

}

.realtime-keyword-list a {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    height: 24px;
}


.realtime-keyword-list strong {
    flex: 0 0 24px;
    font-weight: 600;

}


.realtime-keyword-list span {
    flex: 1;
    overflow: hidden;
    color: #505050;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 20px;
}


.realtime-keyword-list .rank-same {
    width: 8px;
    height: 2px;
    background: #ccc;
}

.realtime-keyword-list .rank-up {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid #F27935;
}

.realtime-keyword-list .rank-down {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #008AEE;
}




/* ========================================
  자동 검색어
======================================== */

.search-dropdown__autocomplete {
    padding: 24px;
}


.autocomplete-list button {
    width: 100%;
    height: 24px;
    color: #505050;
    font-size: var(--fs-14);
    text-align: left;
}


.autocomplete-list button:hover {
    color: var(--color-text);
}