/*
 * 职位搜索页面样式修复文件
 * 解决移动端侧边栏特定问题
 * @version 1.0.0
 * @date 2025-12-18
 */

/* 修复移动端侧边栏用户名文字颜色问题 */
@media (max-width: 991.98px) {
    /* 确保用户名文字在各种状态下都有良好的可读性 */
    .navbar-nav .dropdown-toggle {
        color: var(--text-primary) !important;
        background-color: transparent !important;
    }
    
    .navbar-nav .dropdown-toggle:hover {
        color: var(--primary-color) !important;
        background-color: rgba(0, 0, 0, 0.05) !important;
    }
    
    .navbar-nav .dropdown-toggle:active {
        color: var(--primary-color) !important;
        background-color: rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 修复下拉菜单样式 */
    .navbar-nav .dropdown-menu {
        position: static !important;
        box-shadow: none !important; /* 移除阴影以保持一致 */
        margin: 0 !important;
        margin-top: 0.25rem !important;
        margin-left: 0 !important; /* 移除左边距，使其占满宽度 */
        background: rgba(0, 0, 0, 0.02) !important; /* 使用极淡的背景色区分层级 */
        border: none !important; /* 移除边框 */
        border-left: 2px solid rgba(0, 0, 0, 0.05) !important; /* 添加微弱的左边框指示层级 */
        border-radius: 0 !important; /* 移除圆角以与侧边栏对齐 */
        min-width: auto !important;
        display: none !important;
        z-index: 1001 !important;
        opacity: 0 !important;
        transform: translateY(-5px) !important;
        transition: opacity 0.3s ease, transform 0.3s ease !important;
        width: 100% !important; /* 占满全宽 */
        /* 确保在职位搜索页面中有正确的定位 */
        top: auto !important;
        left: auto !important;
        /* 覆盖style-fixes.css中的冲突样式 */
        float: none !important;
        padding: 0.25rem 0 !important;
        font-size: 0.95rem !important;
        color: var(--text-primary) !important;
        text-align: left !important;
        list-style: none !important;
        background-clip: padding-box !important;
    }
    
    /* 下拉菜单显示时的样式 */
    .navbar-nav .dropdown.show .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        padding: 0.25rem 0 !important;
    }
    
    /* 下拉菜单项样式 */
    .navbar-nav .dropdown-menu .dropdown-item {
        color: var(--text-primary) !important;
        padding: 0.875rem 1.25rem 0.875rem 2.5rem !important; /* 增加左侧内边距以体现缩进 */
        transition: all 0.3s ease !important;
        font-size: 0.95rem !important;
        border-radius: 0 !important; /* 移除圆角 */
        margin-bottom: 0 !important;
        background-color: transparent !important;
        display: block !important;
        width: 100% !important;
        clear: both !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        border: 0 !important;
        border-left: 3px solid transparent !important; /* 与主菜单项一致的边框样式 */
    }
    
    .navbar-nav .dropdown-menu .dropdown-item:hover,
    .navbar-nav .dropdown-menu .dropdown-item.active {
        background-color: rgba(0, 0, 0, 0.05) !important; /* 与主菜单项一致的悬停背景 */
        color: var(--primary-color) !important;
        transform: none !important; /* 移除位移 */
        border-left-color: var(--primary-color) !important; /* 悬停时显示主色左边框 */
    }
    
    .navbar-nav .dropdown-menu .dropdown-item:active {
        background-color: rgba(0, 0, 0, 0.1) !important;
        color: var(--primary-color) !important;
    }
}

/* 引导提示样式 */
.initial-guide {
    background: var(--white-color, #fff);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 60px 20px;
    margin-top: 30px;
    text-align: center;
}

.guide-icon-wrapper {
    width: 100px;
    height: 100px;
    background: rgba(44, 90, 160, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.guide-icon-wrapper i {
    font-size: 40px;
    color: var(--primary-color, #2c5aa0);
}

.guide-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 12px;
}

.guide-content p {
    color: var(--text-muted, #6c757d);
    font-size: 16px;
    margin-bottom: 40px;
}

.guide-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 45px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.step-item {
    flex: 1;
    text-align: center;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--primary-color, #2c5aa0);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.step-item p {
    font-size: 14px;
    margin-bottom: 0 !important;
    color: var(--text-secondary, #495057);
}

.step-arrow {
    padding: 0 20px;
    color: var(--border-color, #dee2e6);
    font-size: 20px;
    margin-top: -25px;
}

.guide-suggestions {
    border-top: 1px solid var(--border-color, #f8f9fa);
    padding-top: 30px;
}

.suggestion-label {
    display: block;
    font-size: 14px;
    color: var(--text-muted, #adb5bd);
    margin-bottom: 15px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.suggestion-tags .badge {
    padding: 8px 16px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    background-color: var(--light-color, #f8f9fa);
    color: var(--text-secondary, #495057);
    border: 1px solid var(--border-color, #e9ecef);
}

.suggestion-tags .badge:hover {
    background-color: var(--primary-color, #2c5aa0);
    color: #fff;
    border-color: var(--primary-color, #2c5aa0);
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .guide-steps {
        flex-direction: column;
        gap: 20px;
    }
    .step-arrow {
        transform: rotate(90deg);
        margin-top: 0;
        padding: 10px 0;
    }
}

/* 搜索表单水平布局优化 */
.advanced-search-form .row {
    margin-left: -8px;
    margin-right: -8px;
}

.advanced-search-form [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

.search-buttons .btn {
    padding: 0.375rem 0.4rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.sort-select-inline {
    width: auto !important;
    display: inline-block !important;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 0.85rem !important;
}

/* 结果头部对齐优化 */
.results-header {
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color, #eee);
}

.results-info .results-count {
    font-size: 1rem;
    color: var(--text-secondary, #666);
    white-space: nowrap;
}

.results-stats-sort {
    min-width: fit-content;
    flex-shrink: 0;
}

.results-info .sort-wrapper label {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    white-space: nowrap;
}

.results-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

@media (min-width: 992px) {
    .results-info {
        flex-wrap: nowrap !important;
    }
}

@media (max-width: 991.98px) {
    .results-controls {
        justify-content: flex-start;
        margin-top: 15px;
    }
}