/* ========== 参会人员选择器 - 共享组件样式 ========== */
/* 从 setup-page.css 提取，供 client_view 和 meetings 页面复用 */

/* 切换器容器 - 胶囊滑块设计 */
.participant-selector {
    display: inline-flex;
    background: var(--neutral-100);
    border-radius: 12px;
    padding: 4px;
    position: relative;
    margin-bottom: 16px;
}

/* 滑动背景块 */
.participant-selector::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}

/* 选中"指定人员"时滑块右移 */
.participant-selector.specific::before {
    transform: translateX(100%);
}

/* 选项按钮 */
.participant-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-sub);
    position: relative;
    z-index: 1;
    transition: color 0.25s ease;
    user-select: none;
}

/* 隐藏原生 radio */
.participant-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 选中态文字颜色 */
.participant-option.active {
    color: white;
}

/* 选项图标 */
.participant-option .option-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.25s ease;
}

.participant-option.active .option-icon {
    opacity: 1;
}

/* 人员列表容器 - 展开动画 */
.participant-list {
    background: linear-gradient(180deg, var(--neutral-50) 0%, white 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease,
                visibility 0.3s ease,
                border-color 0.3s ease;
}

.participant-list.visible {
    max-height: 320px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border-color: rgba(99, 102, 241, 0.15);
}

/* 搜索框 - 玻璃态设计 */
.participant-search {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: none;
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.25s ease;
}

.participant-search:focus {
    background: white;
    border-bottom-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.participant-search::placeholder {
    color: var(--text-muted);
}

/* 搜索图标容器 */
.search-wrapper {
    position: relative;
}

.search-wrapper::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-size: contain;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.search-wrapper:focus-within::before {
    opacity: 1;
}

/* 人员列表滚动区域 */
.participant-checkboxes {
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
}

/* 自定义滚动条 */
.participant-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.participant-checkboxes::-webkit-scrollbar-track {
    background: transparent;
}

.participant-checkboxes::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 3px;
}

.participant-checkboxes::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
}

/* 人员项 - 卡片设计 */
.participant-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 4px 0;
    cursor: pointer;
    background: white;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: participantSlideIn 0.4s ease-out backwards;
}

/* 交错进入动画 */
@keyframes participantSlideIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.participant-checkbox:nth-child(1) { animation-delay: 0s; }
.participant-checkbox:nth-child(2) { animation-delay: 0.04s; }
.participant-checkbox:nth-child(3) { animation-delay: 0.08s; }
.participant-checkbox:nth-child(4) { animation-delay: 0.12s; }
.participant-checkbox:nth-child(5) { animation-delay: 0.16s; }
.participant-checkbox:nth-child(6) { animation-delay: 0.2s; }
.participant-checkbox:nth-child(7) { animation-delay: 0.24s; }
.participant-checkbox:nth-child(8) { animation-delay: 0.28s; }

/* 人员项悬停效果 */
.participant-checkbox:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.15);
    background: linear-gradient(135deg, white 0%, rgba(248, 250, 255, 0.8) 100%);
}

/* 人员项选中态 */
.participant-checkbox.selected {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.06) 0%, white 100%);
    border-left: 3px solid var(--brand-primary);
    padding-left: 11px;
}

/* 自定义复选框 */
.participant-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    background: white;
}

.participant-checkbox input[type="checkbox"]:hover {
    border-color: var(--brand-primary);
}

.participant-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    animation: checkboxPop 0.3s ease;
}

@keyframes checkboxPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.participant-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 头像 - 发光效果 */
.participant-checkbox .participant-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #8b5cf6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.participant-checkbox:hover .participant-avatar {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

/* 用户信息 */
.participant-checkbox .participant-info {
    flex: 1;
    min-width: 0;
}

.participant-checkbox .participant-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.participant-checkbox .participant-username {
    font-size: 0.78rem;
    color: var(--text-sub);
}

/* 空状态 - 居中设计 */
.participant-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.participant-empty::before {
    content: '';
    width: 48px;
    height: 48px;
    background: var(--brand-primary-soft);
    border-radius: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
    animation: emptyIconFloat 3s ease-in-out infinite;
}

@keyframes emptyIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* 已选择提示 - 徽章风格 */
.selected-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--brand-primary);
    background: var(--brand-primary-soft);
    padding: 6px 12px;
    border-radius: 20px;
    margin-top: 12px;
}

.selected-count::before {
    content: '✓';
    font-size: 0.7rem;
}
