/**
 * 评论操作菜单样式
 * 
 * 提供统一的评论操作按钮和下拉菜单样式
 */

/* 评论操作按钮容器 */
.uap-comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

/* 操作按钮基础样式 */
.uap-comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    background: none;
    border: none;
    color: var(--uap-text-secondary, #64748b);
    font-size: 13px;
    cursor: pointer;
    border-radius: var(--uap-radius-sm, 6px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1;
}

.uap-comment-action-btn:hover {
    background: var(--uap-surface-hover, rgba(15, 23, 42, 0.05));
    color: var(--uap-text-main, #0f172a);
}

.uap-comment-action-btn:active {
    transform: scale(0.95);
}

.uap-comment-action-btn.active {
    color: var(--uap-danger, #ef4444);
}

.uap-comment-action-btn svg {
    flex-shrink: 0;
}

.uap-comment-action-btn span {
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* 更多菜单容器 */
.uap-comment-more-wrapper {
    position: relative;
    /* 移除 margin-left: auto，让按钮紧跟在回复按钮后面 */
}

.uap-comment-more-btn {
    padding: 4px;
}

.uap-comment-more-btn svg {
    /* 横向三个点的图标 */
    transform: rotate(0deg);
}

/* 下拉菜单 */
.uap-comment-dropdown {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 6px;
    min-width: 124px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--uap-radius-md, 12px);
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.96);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.uap-comment-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* 下拉菜单项 */
.uap-comment-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: var(--uap-radius-sm, 6px);
    color: var(--uap-text-main, #1e293b);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.uap-comment-dropdown-item:hover,
.uap-comment-dropdown-item:focus {
    outline: none;
    background: var(--uap-surface-hover, rgba(15, 23, 42, 0.05));
    color: var(--uap-text-main, #0f172a);
}

.uap-comment-dropdown-item.danger {
    color: var(--uap-danger, #ef4444);
}

.uap-comment-dropdown-item.danger:hover,
.uap-comment-dropdown-item.danger:focus {
    background: #fef2f2;
    color: #dc2626;
}

.uap-comment-dropdown-item svg {
    flex-shrink: 0;
}

.uap-comment-dropdown-item span {
    flex: 1;
}

/* 响应式适配 */
@media (max-width: 640px) {
    .uap-comment-actions {
        gap: 12px;
    }
    
    .uap-comment-action-btn {
        padding: 4px 6px;
        font-size: 12px;
    }
    
    .uap-comment-dropdown {
        min-width: 100px;
    }
    
    .uap-comment-dropdown-item {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 暗色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    .uap-comment-action-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .uap-comment-dropdown {
        background: #2a2a2a;
        border-color: #444;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .uap-comment-dropdown-item {
        color: #e5e5e5;
    }
    
    .uap-comment-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .uap-comment-dropdown-item.danger:hover {
        background: rgba(255, 71, 87, 0.1);
    }
}
