/*
 * TF-1041 簡中站 Header 基礎樣式（layout_version = 2）
 *
 * 來源：繁中 public/css/style.css 中與新版 header 相關的規則。
 * 繁中的樣式分散在 style.css 與 header-v3-next.css 兩支，
 * 且 style.css 在 head 中排在前面，衝突時由 header-v3-next.css 勝出。
 * 簡中的 style.css 是較舊版本沒有這些規則，故抽成本檔，
 * 並比照繁中載入於 header-v2-next.css 之前，維持相同的覆蓋順序。
 */

/* site-header-top 的左右內距只在桌機套用；
   手機版由 header-v2-next.css 的 @media (max-width: 991px) 設為 0 */
@media (min-width: 992px) {
    .tf-hd2 .site-header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0px 48px;
    }
}

.tf-hd2 .header_search-container {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 100px;
    font-size: 14px;
    color: #495057;
    background-color: #fafafa;
}

.tf-hd2 .header_search-container ::placeholder {
    font-size: 14px;
    color: #495057;
}

.tf-hd2 .header_search-container:focus-within {
    border: 1px solid #75ae21;
}

.tf-hd2 .header_search-input {
    flex-grow: 1;
    padding-left: 10px;
    padding-right: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
    border: none;
    outline: none;
    background-color: transparent;
    max-height: 40px;
    width: 300px;
}

.tf-hd2 .header_search-recommand-box {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    background-color: #fff;
    box-shadow: 0px 8px 16px 0px #49505726;
    z-index: 999;
    padding: 24px;
    border-radius: 5px;
}

.tf-hd2 .header_search-recommand-box h4 {
    color: #495057;
    font-size: 14px;
}

.tf-hd2 .header_search-recommand-keyword {
    display: flex;
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 10px;
}

.tf-hd2 .header_search-clear {
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #333 !important;
    z-index: 1000;
    font-size: 20px;
}

.tf-hd2 .header_search-clear i {
    color: #5e5e5e !important;
}

.tf-hd2 .header_search-input:focus~.header_search-clear {
    display: block;
}

.tf-hd2 .header_search-clear i:hover {
    color: #666;
}

.tf-hd2 .header_navbar-link-text {
    color: #495057;
    font-weight: 600;
}

.tf-hd2 .header_mobile-display-none img {
    display: flex;
}

/* ---------------------------------------------------------------
   登入後的會員下拉選單

   來源：繁中 public/css/style.css 第 11605、11633-11740 行。
   簡中的 style.css 無這些規則，缺了會造成：
     - .header_account-content 沒有 display:none → 「会员中心／登出」變成常駐文字
     - .header_icon-group 沒有 position:relative → 絕對定位失去基準，版面跑掉
   --------------------------------------------------------------- */
.tf-hd2 .header_icon-group {
    position: relative;
}

.tf-hd2 .header_icon-group .header_account-container .social-icon {
    transition: opacity .15s;
}

.tf-hd2 .header_icon-group .header_account-container .social-icon:hover,
.tf-hd2 .header_icon-group .header_account-container .social-icon:focus {
    opacity: .7;
}

.tf-hd2 .header_icon-group .header_account-content {
    display: none;
    width: 250px;
    position: absolute;
    top: 50px;
    right: 0;
    flex-direction: column;
    background-color: #fff;
    z-index: 999;
    border: 1px solid #adb5bd;
    color: #212529;
}

.tf-hd2 .header_icon-group .header_account-content a {
    line-height: 1;
    margin: 0;
    padding: 15px 10px;
    text-align: center;
    font-size: 14px;
    box-shadow: 0px 1px 0px 0px #00000040;
    color: #212529;
}
