/**
 * 移动端搜索框样式
 */

/* 移动端搜索图标容器 */
.header_search_mobile {
    position: relative;
    display: flex;
    align-items: center;
}

/* 搜索图标 */
.search-icon-toggle {
    cursor: pointer;
    padding: 0;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 搜索表单容器 - 显示在导航栏下方 */
.search-form-container {
    position: fixed;

    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 99;
    display: none;
    border-top: 1px solid #eee;
}

/* 搜索表单包装器 */
.search-form-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* 激活状态的搜索表单 */
.search-form-container.active {
    display: block;
}

/* 搜索表单样式 */
.search-form-container .search-form {
    display: flex;
    width: 100%;
    margin-right: 40px; /* 为关闭按钮留出空间 */
}

.search-form-container .search-field {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.search-form-container .search-submit {
    background-color: var(--suncell-green-dark);
    border: none;
    padding: 10px 12px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    right: auto;
    transform: none;
}

.search-form-container .search-submit svg path {
    fill: #fff;
}

/* 关闭按钮 */
.search-close-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 媒体查询 - 移动端样式 */
@media (max-width: 768px) {

    
    /* 确保移动端搜索框在点击前只显示图标 */
    .header_search_mobile .search-form {
        width: 100%;
    }
}

/* 媒体查询 - 桌面端隐藏移动搜索 */
@media (min-width: 769px) {
    .header_container_mobile,
    .search-form-container {
        display: none;
    }
    
    /* 确保桌面端不显示移动搜索组件 */
    .header_search_mobile {
        display: none;
    }
}