/* 寻找伙伴功能的CSS样式 */

/* 定义CSS变量 */
:root {
    --primary-color: #3b82f6;
    --primary-light: #dbeafe;
    --border-color: #d1d5db;
    --bg-light: #f3f4f6;
    --text-secondary: #6b7280;
    --transition: all 0.2s ease;
}

/* 伙伴标签样式 */
.buddy-tag-option {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.buddy-tag-option:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.buddy-tag-option.buddy-selected {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 主页面布局 */
.workbench-tab-content#buddy-finder-content {
    padding: 0;
}

/* 顶部筛选和搜索栏 */
.buddy-filter-header {
    padding: 1.5rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.buddy-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.buddy-filter-group {
    flex: 1;
    min-width: 150px;
}

.buddy-filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.375rem;
}

.buddy-filter-group select,
.buddy-search-wrapper input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.buddy-filter-group select:focus,
.buddy-search-wrapper input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.buddy-search-wrapper {
    flex: 2;
    position: relative;
}

.buddy-search-wrapper input {
    padding-left: 2.5rem;
}

.buddy-search-wrapper i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.buddy-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.buddy-filter-actions button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buddy-filter-actions .primary-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
}

.buddy-filter-actions .primary-btn:hover {
    background-color: #2563eb;
}

.buddy-filter-actions .secondary-btn {
    background-color: transparent;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.buddy-filter-actions .secondary-btn:hover {
    background-color: #f3f4f6;
}

/* 主内容区域 */
.buddy-main-content {
    padding: 1.5rem;
}

/* 智能推荐板块 */
.buddy-recommendation {
    margin-bottom: 2rem;
}

.buddy-recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.buddy-recommendation h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.buddy-recommendation-header .text-primary {
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.buddy-recommendation-header .text-primary:hover {
    color: #2563eb;
}

/* 伙伴卡片网格 */
.buddy-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* 伙伴卡片组件 */
.buddy-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.buddy-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.buddy-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.buddy-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: #3b82f6;
    margin-right: 1rem;
    position: relative;
}

.buddy-avatar.online::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0.75rem;
    height: 0.75rem;
    background-color: #10b981;
    border: 2px solid white;
    border-radius: 50%;
}

.buddy-card-header .buddy-info {
    flex: 1;
}

.buddy-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.buddy-card-header p {
    font-size: 0.875rem;
    color: #6b7280;
}

.buddy-matching {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background-color: #ecfdf5;
    color: #059669;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.buddy-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.buddy-tag {
    background-color: #f3f4f6;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.buddy-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buddy-card-actions button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
}

.buddy-card-actions button:first-of-type {
    background-color: #3b82f6;
    color: white;
}

.buddy-card-actions button:first-of-type:hover {
    background-color: #2563eb;
}

.buddy-card-actions button:last-of-type {
    background-color: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.buddy-card-actions button:last-of-type:hover {
    background-color: #f3f4f6;
}

/* 高级筛选面板 */
.advanced-filter-panel {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.advanced-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.advanced-filter-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.advanced-filter-header button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
}

.advanced-filter-header button:hover {
    color: #374151;
}

.advanced-filter-content {
    padding: 1.5rem;
}

.advanced-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.advanced-filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.375rem;
}

.advanced-filter-group select,
.advanced-filter-group input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.advanced-filter-group select:focus,
.advanced-filter-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.advanced-filter-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

/* 搜索结果和分页 */
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.search-results-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.search-results-header select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: white;
}

.search-results-count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.25rem;
}

.pagination button {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    background-color: white;
    border-radius: 0.375rem;
    color: #4b5563;
    transition: all 0.2s;
}

.pagination button:hover {
    background-color: #f3f4f6;
}

.pagination button.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:disabled:hover {
    background-color: white;
}

/* 伙伴详情模态框 */
#buddy-detail-modal {
    z-index: 1010;
}

#buddy-detail-modal .max-w-3xl {
    max-width: 48rem;
}

#buddy-detail-modal .sticky {
    position: sticky;
}

/* 空状态和加载状态 */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: #6b7280;
}

/* 只影响伙伴查找模块的图标，不影响全局 */
#buddy-finder-container .empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* 美化的空状态容器 */
.empty-state-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.empty-state-content {
    text-align: center;
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 600px;
    width: 100%;
    border: 1px solid #e2e8f0;
}

.loading-state {
    text-align: center;
    padding: 4rem 1.5rem;
}

.loading-spinner {
    border: 0.25rem solid #e5e7eb;
    border-top: 0.25rem solid #3b82f6;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .buddy-filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .buddy-filter-group,
    .buddy-search-wrapper {
        min-width: unset;
    }
    
    .buddy-card-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-filter-form {
        grid-template-columns: 1fr;
    }
    
    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    #buddy-detail-modal .max-w-3xl {
        max-width: 95vw;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .buddy-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .buddy-filter-actions button {
        justify-content: center;
    }
    
    .advanced-filter-footer {
        flex-direction: column;
    }
    
    .advanced-filter-footer button {
        width: 100%;
    }
}

/* 过渡动画 */
.transition-custom {
    transition: all 0.2s ease;
}

/* 缩小锁图标的大小 */
.small-lock-icon {
    font-size: 0.75rem;
    vertical-align: middle;
}

/* Application year class - 调整年份位置，减少缩进 */
.application-year {
    margin-left: -4px;
}

/* 隐藏类 - 使用更特定的选择器，避免与全局样式冲突 */
.buddy-hidden {
    display: none;
}